IB Statements/end

From CometWiki

(Difference between revisions)
Jump to: navigation, search
Badge (Talk | contribs)
(New page: '''END statement''' '''Syntax:''' END '''Discussion:''' The END statement serves two purposes. First, the END statement signals the Internet Basic compiler to stop compiling the cur...)
Newer edit →

Revision as of 12:06, 20 May 2009

END statement

Syntax: END

Discussion: The END statement serves two purposes. First, the END statement signals the Internet Basic compiler to stop compiling the current program (even if there are additional source program lines following the END statement). Therefore, END should be placed as the last physical line in an Internet Basic source program.

Note: If you omit the END statement from a source program, it is automatically inserted by the Internet Basic compiler as the last instruction in the object program.

Second, the END statement may be used in a usefile (also known as an include file) to separate one section of code from another. (This feature was added in Build 292.)

Example 1:

 LENGTH 2 & LOCAL FLAG$
 LENGTH 5 & LOCAL CUSTNO$
.
 100 FORMAT (ET);(CS)
 .
 CLEAR
OPEN (1) "C1A", EXCP=9000
 .
 END

This example shows that the END statement is the last physical line in a source program. Example 2:  ! This is the first section of a usefile (aka include file) . . . END ! This is the second section . . . END ! This is the third section . . . END

This example shows that the END statement separates sections within a usefile (also known as an include file). For more information, see the USE and INCLUDE directives.

Personal tools