Call: Difference between revisions
Jump to navigation
Jump to search
Line 37: | Line 37: | ||
Wave(); | Wave(); | ||
function Welcome() { | function Welcome() { | ||
NSB.Print("Hello World!"); | NSB.Print("Hello World!"); | ||
} | } | ||
function Message(Text) { | function Message(Text) { | ||
NSB.Print("Message: " + Text); | NSB.Print("Message: " + Text); | ||
} | } | ||
function Wave() { | function Wave() { |
Revision as of 05:47, 2 May 2013
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 (Basic)
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
Example (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! "); }
Output
Hello World! Message: AppStudio is excellent. Goodbye!