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.

ExampleConsider PROGI that chains to PROG2:PROG1.BAS, declare variables to be passed, to the chained program:, single precision scalar variables a and b,, and integer array c%DIM c%(3000)a = 65 : b = 13 : c%(2000) = 12COMMON a, b, c%(l), specify # of dimensions in arrayCHAIN IPROG2"PROG2.BAS, declare variables to be ~eceived, from the invoking program, they must be in the same order, have the same, type, but don't need the same nameCOMMON x, y, z%(l)PRINT x, y, z%(2000)When PROGl.EXE is invoked from DOS, it will automaticallybring in module PROG2.TBC and execute it, printing out thevalues assigned inPROGl. When PROG2 ends, it returns to DOS,not to ·PROGl.146<strong>Turbo</strong> <strong>Basic</strong> Owner's Handbook

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

Saved successfully!

Ooh no, something went wrong!