Re: Extentions to BASIC



Dr Dun Never wrote:

Here I will introduce you to a number of new BASIC statements
that add power to that language, and will hopefully make programming
easier for those of you who are used to discussing subjects on Usenet.


The first new statement we will address today is the BEFORE statement.

The BEFORE statement makes it easier for the programmer to correct a mistake
without changing the structure of the program.
Here is an example:

10 PRINT "ARE THE GREATEST"
20 END
50 BEFORE 10
60 PRINT "WE AT HILLVIEW"
70 ANYWAYS
80 PRINT "OUR SOFTWARE IS 100% BUG FREE"


When run, this code produces the following output:
WE AT HILLVIEW
ARE THE GREATEST
OUR SOFTWARE IS 100% BUG FREE


The ANYWAYS statement introduced above, terminates a BEFORE, BEFORE
statement are also terminated by a BTWWW (BackToWhereWeWhere) statement.
BTWWW and ANYWAYS have the same function, so

10 PRINT "ARE THE GREATEST"
20 END
50 BEFORE 10
60 PRINT "WE AT HILLVIEW"
70 BTWWW
80 PRINT "OUR SOFTWARE IS 100 % BUG FREE"
produces the same output as the first example:
WE AT HILLVIEW ARE THE GREATEST
OUR SOFTWARE IS 100 % BUG FREE


The next new statement I want to introduce you to, is the AFTER statement.
The AFTER statement makes it easier to execute things later, here and example of it's use:


10 PRINT "BASIC NEEDS TO BE EXTENDED WITH MORE USEFUL COMMANDS"
20 AFTER 100
30 PRINT "BECAUSE I SAY SO"
40 ANYWAYS
50 PRINT "TO MAKE PROGRAMMING EASIER FOR COMMON PEOPLE AND ENGINEERS"
100 PRINT
110 PRINT "AND IT IS SIMPLE"

This shall produce the following output:

BASIC NEEDS TO BE EXTENDED WITH MORE USEFUL COMMANDS
TO MAKE PROGRAMMING EASIER FOR COMMON PEOPLE AND ENGINEERS

BECAUSE I SAY SO
AND IT IS SIMPLE

The ANYWAYS statement is here again used to terminate an AFTER directive.



The last statement I will introduce you to today is the NEVER statement.
Here and example of the use of NEVER:

10 PRINT "OUR SOFTWARE IS THE BEST
20 PRINT "IS HAS SOME MINOR BUGS, BUT WE ARE WORKING VERY HARD TO FIX THESE"
30 PRINT "THIS ENDS OUR LESSON FOR TODAY"
40 NEVER 20
50 AFTER 20
60 PRINT "OUR SOFTWARE HAS NO BUGS"
70 BTWWW
80 END


The output for this example is:

OUR SOFTWARE IS THE BEST
OUR SOFTWARE HAS NO BUGS
THIS ENDS OUR LESSON FOR TODAY



Dr Dun Never
2028DIM Hillview Drive
Atlantis


I'm glad I don't use compiler languages with your thoughts in mind.

.



Relevant Pages

  • Re: Extentions to BASIC
    ... 60 PRINT "WE AT HILLVIEW" ... 80 PRINT "OUR SOFTWARE IS 100% BUG FREE" ... statement are also terminated by a BTWWW statement. ... 50 PRINT "TO MAKE PROGRAMMING EASIER FOR COMMON PEOPLE AND ENGINEERS" ...
    (sci.electronics.design)
  • Re: Extentions to BASIC
    ... 60 PRINT "WE AT HILLVIEW" ... 80 PRINT "OUR SOFTWARE IS 100% BUG FREE" ... statement are also terminated by a BTWWW statement. ... 50 PRINT "TO MAKE PROGRAMMING EASIER FOR COMMON PEOPLE AND ENGINEERS" ...
    (sci.electronics.design)
  • Re: Extentions to BASIC
    ... 60 PRINT "WE AT HILLVIEW" ... 80 PRINT "OUR SOFTWARE IS 100% BUG FREE" ... statement are also terminated by a BTWWW statement. ... 50 PRINT "TO MAKE PROGRAMMING EASIER FOR COMMON PEOPLE AND ENGINEERS" ...
    (sci.electronics.design)
  • Re: Extentions to BASIC
    ... 60 PRINT "WE AT HILLVIEW" ... 80 PRINT "OUR SOFTWARE IS 100% BUG FREE" ... statement are also terminated by a BTWWW statement. ... 50 PRINT "TO MAKE PROGRAMMING EASIER FOR COMMON PEOPLE AND ENGINEERS" ...
    (sci.electronics.design)
  • Re: Extentions to BASIC
    ... 60 PRINT "WE AT HILLVIEW" ... 80 PRINT "OUR SOFTWARE IS 100% BUG FREE" ... statement are also terminated by a BTWWW statement. ... 50 PRINT "TO MAKE PROGRAMMING EASIER FOR COMMON PEOPLE AND ENGINEERS" ...
    (sci.electronics.design)