| LC Basic
functions perform actions; they can also return values.
You may use LC Basic functions
as commands, functions or as parameters for other functions.
Use function as command:
MsgBox ("Hello Word")
If function is used as command (and only if function is
used as command), parentheses don't need to be included.
MsgBox "Hello Word"
Both examples are correct.
Use function as function which returns value:
result = MsgBox ("Yes or No ?","",MB_YESNO)
'result is now IDYES (6) or IDNO (7) according to answer
Use function as parameter of another function:
MsgBox ( MsgBox ("Yes or No ?","",MB_YESNO) )
This example put up the message "Yes or No"
and subsequently 6 or 7 according to answer.
Functions and commands hasn't effect on the arguments.
You may use any function as command and any command as function.
But no every functions doing something else than that returns
values and no every commands returns significant values.
For example - every String
Functions returns values - mostly anothers strings.
You may use String
Functions as commands, but this hasn't effect.
String = "Hello World"
MakeLower String
Has no effect - String is still "Hello
World" but -
String = MakeLower
String
String is now "hello
world"
And to the contrary:
Val = 1
Result = ValToPerm("Val")
Result is 0 because ValToPerm always
returns 0. |