AT&T 6300 Programmer's Manual page 666

Gwbasic by microsoft
Hide thumbs Also See for 6300:
Table of Contents

Advertisement

Converting Programs
IF...THEN...[ELSE...]
Not all BASICs feature the optional ELSE
clause which is performed in the event of a test
proving false.
For example, a BASIC statement may
originally be:
10 IF D=E THEN 30
20 PRINT "NOT EQUAL" : GOTO 40
30 PRINT "EQUAL"
40 REM CONTINUE
The above statement sequence will work
correctly, but it may be optimized in GWBASIC
as follows:
10 IF D=E THEN PRINT "EQUAL"
ELSE PRINT "NOT EQUAL"
20 REM CONTINUE
ColO

Advertisement

Table of Contents
loading

Table of Contents