Hyundai HI4 operation manual Program Flow Control Goto Command, Gosub ∼ Return Command

Models: HI4

1 427
Download 427 pages 29.73 Kb
Page 381
Image 381

11.Robot Language Explanation

------------------------------------------------------------------------------------------------

11.2.4Program Flow Control

11.2.4.1 GOTO Command

Description Jumps to the specified address.

Syntax

GOTO <Address>

 

 

 

 

 

Parameter

Address

Address to be jumped.

 

 

 

 

 

 

example

GOTO

99

 

 

GOTO

*ERRHDL

 

11.2.4.2 GOSUB RETURN Command

Description

Calls for the address specified by GOSUB.

 

 

 

 

When met with RETURN command, returns to the next line of GOSUB command.

 

 

 

 

 

 

 

 

Syntax

GOSUB <Address>

RETURN

 

 

 

 

 

 

 

 

 

 

Parameter

Address

Address to call

 

 

 

 

 

 

 

 

 

 

 

 

 

GOSUB 150

 

 

 

 

 

END

 

 

 

 

 

example

150 REM ---- Subroutine for testing ----

 

 

PRINT #0, "Subroutine Start"

 

 

 

 

 

 

 

 

PRINT #1, "Subroutine End"

 

 

 

 

RETURN

 

 

 

 

 

 

 

 

 

 

 

11.2.4.3 JMPP Command

 

 

 

 

 

 

 

 

 

 

 

Description

 

Jumps to the specified program

 

 

 

 

 

 

 

 

 

Syntax

 

JMPP <Program Number>

 

 

 

 

 

 

 

 

 

 

 

Parameter

 

Program

 

Positive integer, Program number to call

 

1999

 

Number

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

IF DI29=1 THEN

REM --- subprogram 909 - ERROR STOP

 

 

example

 

JMPP 909

 

 

PRINT #0, "Unrecoverble Error!!!", TIME$

 

 

ENDIF

 

 

END

 

 

 

 

 

 

 

 

 

 

----------------------------------------------------------------------------------------

11 - 16

Page 381
Image 381
Hyundai HI4 operation manual Program Flow Control Goto Command, Gosub ∼ Return Command