Unlike most DOS versions of BASIC, PB/CC
requires that all executable code be contained inside a Sub
or Function.
Only scanned statements (such as metastatements,
constant declarations, and
The following PB/DOS program:
PRINT "At the tone the time will be "; TIME$
BEEP
simply needs to be placed inside a Function called PBMAIN in order to execute:
FUNCTION PBMAIN
PRINT "At the tone the time will be "; TIME$
BEEP
END FUNCTION
When your program is loaded, the function PBMAIN (or WINMAIN) is executed automatically. This is where the main code of your application should be placed. The program stops when there are no more statements in PBMAIN, or an EXIT FUNCTION is encountered within PBMAIN.
See Also