go
go(
s_label
)
Description
Transfers control to the statement following the label argument. This is a syntax form.
The go statement is only meaningful when it is used inside a prog statement. Control can be transferred to any labeled statement inside any progs that contain the go statement, but cannot be transferred to labeled statements in a prog that is not active at the time the go statement is executed. Usually, using go is considered poor programming style when higher level control structures such as foreach and while can be used.
Arguments
Value Returned
Examples
The following example demonstrates how to use the go function form in a simple loop structure.
procedure( testGo( data )
prog( ()
start
print( car( data ))
data = cdr( data )
if( data go( start )) ; go statement to jump to start.
))
testGo( '(a b c))
abc ; Prints the variable data.
=> nil ; Returns nil.
Related Topics
Return to top