|
||||||||
|
||||||||
| Example, identical to the previous one |
|
house { wall { window. door { window. doorknob. }. }. floor. roof. }. |
| Extended example with the house object: |
|
house `My little sweet house´ { colour `red´. owner `not very rich´ `Mc Douglas´ wall { colour `green´. window. Door { window. doorknob. }. }. floor. roof. }. |
| Example sentence: |
![]() |
| Example verb definition |
![]() |
| Format of the parameters object |
![]() |
| Example of adverbs using sub objects to the verb |
![]() |
| Predefined verbs | ||
| Verb | Subjects/adjectives/pronouns | Explanation/usage |
| Do |
DO object IF condition DO object WHILE condition DO object UNTIL condition |
Executes the subject condition. If the result is a value larger than or equal to 0 and the pronoun while or if is used, or the result is lesser than 0 and the pronoun until is used, the subject object is executed. Then the subject condition is re-executed and the procedure is redone again and again, unless the pronoun if is used, until the result of condition is a value lesser than 0 if the pronoun while is used, and equal to or larger than 0 if the pronoun until is used. Returns: Result from last execution of object. |
| Delete | DELETE object |
Deletes the specified object. Returns: 0 if object existed, otherwise -1. |
| Make |
MAKE LINK object1 TO object2 MAKE COPY object1 OF object2 |
Turns object1 into a link to or copy of object2. When creating a copy, all sub objects to object2 are also copied to sub objects to object1. Returns: 0 if object2 exists, otherwise -1. |
| Insert | INSERT name IN object |
Creates a new object with the name name as a sub object to object. Returns: Undefined. |
| Not | NOT value | Returns 0 if the value is lesser than 0, and -1 if the result is equal to or larger than 0 as result. |
| Add | ADD value1 AND value2 | Returns the value of value1 plus value2 as result. |
| Subtract | SUBTRACT value1 from value2 | Returns the value of value2 minus value1. |
| Multiply | MULTIPLY value1 AND value2 | Returns the value of value1 multiplied with value2. |
| Divide | DIVIDE value1 WITH value2 | Returns the value of value1 divided with value2. |
| Additional common optional predefined verbs | ||
| Verb | Subjects/adjectives/pronouns | Explanation/uaseg |
| PRINT value ON object | Concatenates the text string value of object with the value value. Intended to print values on a screen object. Returns: 0 if object object exists, otherwise -1. |
|
| Read | READ object | Returns the first line of text from the value of object and removes the returned line. If object does not exist, an empty string is returned. |