Difference between revisions of "MC-Basic:CALL"

From SoftMC-Wiki
Jump to: navigation, search
m (1 revision)
m
Line 4: Line 4:
  
 
|SYNTAX=
 
|SYNTAX=
Call ''<subprogram name>''
+
Call <''subprogram name''>
  
 
|AVAILABILITY=
 
|AVAILABILITY=
Line 10: Line 10:
  
 
|DESCRIPTION=
 
|DESCRIPTION=
The CALL command transfers execution of the task from the point at which the CALL appears, to the subprogram being referenced. When the subprogram has completed, execution returns to the point in the task from which the subprogram had been called.
+
The CALL command transfers execution of the task to the subprogram being referenced. When the subprogram has completed, execution returns to the point in the task at which the subprogram was called.
  
 
|TYPE=
 
|TYPE=
Line 32: Line 32:
 
|EXAMPLE=
 
|EXAMPLE=
 
Program<br>
 
Program<br>
       …<br>
+
…<br>
       Call Move_X                                       ‘Do 10 incremental moves<br>
+
Call Move_X     ‘Do 10 incremental moves<br>
       …<br>
+
…<br>
  
 
End Program
 
End Program

Revision as of 11:00, 20 March 2014

The CALL command transfers execution of the task to the subprogram being referenced. When the subprogram has completed, execution returns to the point in the task at which the subprogram was called.

Syntax

Call <subprogram name>

Availability

All versions

Scope

Task

Examples

Program

Call Move_X     ‘Do 10 incremental moves

End Program

See Also