475 49 BASIC II This chapter details differences between BASIC II and the original version of BBC BASIC, and as such is mainly intended for those who are already familiar with the latter language. Two new keywords are introduced by BASIC II: OPENUP and OSCLI . These are described in chapter 33. BASIC II makes available the following alterations and extensions to existing BASIC keywords. ABS The unary minus operator may be used, for example PRINT -ABS(-1) will give the value -1. In BASIC this gave a Type mismatch error. COUNT This has been altered so that COUNT is reset to zero after a change of MODE , as shown by the following example program:
10 PRINT "Hello"; 20 MODE 3 30 PRINT "Goodbye"; 40 PRINT COUNT In BASIC this would leave the screen showing: Goodbye 12 With BASIC II the following is obtained: Goodbye 7 ELSE In BASIC, ON...GOTO...ELSE or ON...GOSUB...ELSE could not be used inside procedures or functions – only the ON...GOTO (or ON...GOSUB ) part was available. This limitation is not present in BASIC II. EVAL In addition to its BASIC functions, in BASIC II EVAL can be used to evaluate the pseudo-variables COUNT , ERL , ERR , HIMEM , LOMEM , PAGE , TIME and TOP .