|
|
(3 intermediate revisions by one other user not shown) |
Line 7: |
Line 7: |
| name[(''argList'')] | | name[(''argList'')] |
|
| |
|
| == Example (Basic) == | | == Example == |
|
| |
|
| <pre> | | <tabber> |
| | JavaScript= |
| | <syntaxhighlight lang="JavaScript"> |
| | //Call Example |
| | //Call explicitly executes a procedure |
| | |
| | Welcome(); |
| | Message("AppStudio is excellent."); |
| | Wave(); |
| | function Welcome() { |
| | NSB.Print("Hello World!"); |
| | } |
| | function Message(Text) { |
| | NSB.Print("Message: " + Text); |
| | } |
| | function Wave() { |
| | NSB.Print("Goodbye! "); |
| | } |
| | </syntaxhighlight> |
| | |-| |
| | BASIC= |
| | <syntaxhighlight lang="vb.net"> |
| Rem Call Example | | Rem Call Example |
| | 'Call explicitly executes a procedure |
|
| |
|
| 'Call explicitly executes a procedure
| |
| Call Welcome() | | Call Welcome() |
| Call Message("AppStudio is excellent.") | | Call Message("AppStudio is excellent.") |
Line 25: |
Line 46: |
| Print "Goodbye! " | | Print "Goodbye! " |
| End Sub | | End Sub |
| </pre> | | </syntaxhighlight> |
| | | </tabber> |
| == Example (JavaScript) ==
| |
| | |
| <pre>
| |
| //Call Example
| |
| | |
| //Call explicitly executes a procedure
| |
| Welcome();
| |
| Message("AppStudio is excellent.");
| |
| Wave();
| |
| function Welcome() {
| |
| savethefunction_rvar="";
| |
| NSB.Print("Hello World!");
| |
| return savethefunction_rvar;
| |
| }
| |
| function Message(Text) {
| |
| savethefunction_rvar="";
| |
| NSB.Print("Message: " + Text);
| |
| return savethefunction_rvar;
| |
| }
| |
| function Wave() {
| |
| NSB.Print("Goodbye! ");
| |
| }
| |
| </pre> | |
|
| |
|
| == Output == | | == Output == |
Latest revision as of 13:41, 24 July 2019
Call procedurename[(argList)]
Description
Call is an explicit method of executing a FUNCTION procedure or a SUB procedure. The required component, procedurename, is any procedure name. The optional component, argList, is a comma-delimited list of variables to pass to the called procedure. The Call keyword is optional, procedures can be executed without the keyword, as
name[(argList)]
Example
//Call Example
//Call explicitly executes a procedure
Welcome();
Message("AppStudio is excellent.");
Wave();
function Welcome() {
NSB.Print("Hello World!");
}
function Message(Text) {
NSB.Print("Message: " + Text);
}
function Wave() {
NSB.Print("Goodbye! ");
}
Rem Call Example
'Call explicitly executes a procedure
Call Welcome()
Call Message("AppStudio is excellent.")
Wave()
Function Welcome()
Print "Hello World!"
End Function
Function Message(Text)
Print "Message: " & Text
End Function
Sub Wave()
Print "Goodbye! "
End Sub
Output
Hello World!
Message: AppStudio is excellent.
Goodbye!
Related Items
Sub, Function