13.07.2015 Views

Turbo Basic

Turbo Basic

Turbo Basic

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

MOTORThe cassette port has not proven to be the most popular attribute of the PC.USRThe CALL statement does USR's job and more.Statements Requiring ModificationCALL ABSOLUTECALL ABSOLUTE only accepts integer parameters and has been included forminimal compatibility with Interpretive <strong>Basic</strong>. <strong>Turbo</strong> <strong>Basic</strong> provides more powerfulCALL INTERRUPf and INLINE assembly procedures for complete assemblylanguage programming. (For more information, see Appendix C, '"Assembly LanguageInterface.")CHAINCHAINed programs must be compiled as either .EXE or .TBC files by selectingthe Compile to EXE or Compile to Chain switch in the compiler Options menu.COMMON statements in both the originating and chained-to programs must listcommon variables in the right order (although not necessarily with the samename). You cannot execute a CHAIN statement when running from within <strong>Turbo</strong><strong>Basic</strong>'s environment. You can only use CHAIN when running from DOS. TheMERGE and DELETE line-number-range options are not supported.DEFtype, TRON, TROFF, OPTION BASEThe performance of these statements differ subtly from Interpretive BASIC. <strong>Turbo</strong><strong>Basic</strong> considers each statement's physical position in the source program ratherthan its position in the execution path of the object program. In other words, it isthe position of these statements at compile-time rather than runtime that controlstheir effect. Using DEFtype as an example, consider this simple program:10 GOTO 3020 DEFINT X30 x = 2.340 PRINT xWhen Interpretive BASIC executes this program, it never sees the typing statementin line 20. Thus, it uses its default variable type (single precision) when itencounters variable x in line 30, and then prints out 2.3.<strong>Turbo</strong> <strong>Basic</strong>, on the other hand, gets typing considerations out of the way atcompile-time. Since the DEFINT statement physically precedes the first occurrenceof x, x becomes an integer variable, and the PRINT statement outputs 2.Comparing <strong>Turbo</strong> <strong>Basic</strong> and Interpretive BASIC 405

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

Saved successfully!

Ooh no, something went wrong!