Product Documentation
Cadence SKILL Language Reference
Product Version IC23.1, November 2023

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

s_label

Label you want to transfer control to inside a prog.

Value Returned

None

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

Flow Control Functions

foreach

return

while


Return to top
 ⠀
X