...
Code Block |
---|
PUB Main | Temp Temp := DoSomething 'Call DoSomething, set Temp to return value PUB DoSomething <do something here> result := 100 'Set result to 100 |
You can also provide an alias name for a method's RESULT variable in order to make it more clear what the method returns. This is highly recommended since it makes a method's intent more easily discerned. For example:
Code Block |
---|
PUB GetChar : Char
<do something>
Char := <retrieved character> 'Set Char (result) to the character |
...