04.03.2013 Views

Basic Micro Studio Syntax Manual

Basic Micro Studio Syntax Manual

Basic Micro Studio Syntax Manual

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

GOTO<br />

<strong>Syntax</strong><br />

goto label<br />

• Label - is a label the program will jump to.<br />

Supported<br />

• BA - Supported<br />

• BAN - Supported<br />

• BAP - Supported<br />

• BAP40 - Supported<br />

Description<br />

The GOTO command tells the program to jump to some label.<br />

Notes<br />

1. Reserved words or variables can not be used as label names.<br />

Commands<br />

Examples<br />

Connect to the following program with the terminal window set to 9600 baud. The following program is<br />

a simple loop using GOTO that will repeat forever.<br />

;Demo Program - GOTO.bas<br />

basic<br />

Pause 800<br />

serout s_out,i9600,[0, “<strong>Basic</strong>”]<br />

pause 800<br />

goto micro<br />

goto basic<br />

micro<br />

serout s_out,i9600,[2, “ <strong>Micro</strong>”]<br />

pause 800<br />

Goto rules<br />

goto basic<br />

rules<br />

serout s_out,i9600,[2, “ Rules!”]<br />

pause 800<br />

goto basic<br />

114

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!