Start from a main routine: Difference between revisions
Content added Content deleted
mNo edit summary |
|||
Line 67: | Line 67: | ||
=={{header|BASIC}}== |
=={{header|BASIC}}== |
||
==={{header|GWBASIC}}=== |
|||
{{works with|GWBASIC}} |
|||
As is well known, GWBASIC cannot refer to anything with a name. Also, does not require an executable program to have a main() procedure. |
|||
However, as in the other instances, there's nothing to stop you creating a subprocess and then calling it by its line number to start the program: |
|||
<syntaxhighlight lang="qbasic">10 'SAVE "MAIN",A |
|||
20 GOSUB 100 ' Main |
|||
30 END |
|||
100 ' Sub Main |
|||
110 CLS |
|||
120 PRINT "This is the Main sub!" |
|||
130 RETURN</syntaxhighlight> |
|||
==={{header|QBasic}}=== |
==={{header|QBasic}}=== |
||
{{works with|QBasic|1.1}} |
{{works with|QBasic|1.1}} |