![]() |
![]() |
Programming guide to Unibase | ![]() |
| var variable [as [static] type] | Create a new variable with default type string. |
| Static means that the contents of the variable will stay there till the next time that the routine is called. | |
| break | Stop the current statement. |
| case variable | Normal case statement. |
| { when value or value | |
| ... code ...} | Multiple values are allowed here. |
| [ otherwise | |
| ... code ...] | |
| endcase | |
| for variable = expression to expression | This is the normal for statement. |
| ... code ... | It create a loop for a fixed number of times. |
| next | |
| loop | Start an unending loop. |
| ... code ... | |
| break | The command to stop the loop again. |
| ... code ... | |
| do | |
| if condition then | Standard if statement. |
| ... code ... | |
| {elsif condition then | |
| ... code ...} | |
| [else | |
| ... code ...] | |
| endif | |
| output expression [to stream] | Write a string to a stream. Or by default to the standard output. |
| return [expression] | Returns a value in a function definition. This also stops the current routine. |
| In a normal routine the expression should be empty. | |
| separate string as variable by value | Loop through parts of the given 'string' separated by 'value'. |
| ... code ... | Inside the loop 'variable' has two fields: |
| [variable.first] | The field 'first' contains 'true' on the first part of the string. |
| ... code ... | |
| [variable.recnr] | Field 'recnr' contains the part number within the string. |
| ... code ... | |
| next | |