Suggested new BASIC functions
DIEUnconditional machine stop, all registers lost
IF MOTIVATEDCase structure, where the case selected is purely dependent on the CPU's motivation and internal temperature, rather than on any currently executing code.
OBFUSCATE(str)Translate the string str (maximum length 1.872 half-words) into Swahili, and display the translated message on the system operator's console.
OPTIONALLY(ff)Quasi-conditional branch. Branch is only sometimes dependent on the floating point trinary variable ff. When executed, program branches to line number 11 in your source code.
SCRAMBLE(mat,m,n)Rearrange the order of specified n-by-m matrix double precision matrix mat based on the system's time-of-day clock. Comparable to the old IBM JCL command "Drop the of of cards before sequencing them.
SAT(p1,p2,...)Past tense of SET. Permits you to set those environment parameters that you forgot to set during your last job run, without having to re-run the job. This is the only function that is hardware-dependent. It requires the Apple II Time-Domain DeConvolver to be installed in your system, operating with DEC BASIC+2.
THRASHSets up a conditional test after every memory access. After each memory read cycle, the system's time-of-day clock is read. If the clock is still running, the time is written to the system error log. This is usually implemented by a non-maskable interrupt, and should efficiently emulate a paging system with a near-infinite paging rate
TRASH(ii)Wreaks havoc on the hardware. Integer parameter ii sets the level of damage. Negative values of ii cause reversible troubles and soft errors, positive values are irreperable hardware damage. Cost of damage is directly proportional to the anti-logarithm of ii.
NCHECKAdds a random number to the cyclic redundancy check word for all subsequent hard-disk writes. On a 32-bit machine it will force approximately 2,147,483,648 wasted read attempts to occur for every one proper read.
WHYCARE(str)Where str is any string of any length. It doesn't care about what it is. The function often returns to the calling routine.
ZAP(ff)Applies a DC voltage to the currently logged-in console equal to the floating-point parameter ff (where 0 < ff < 9.999) Voltage is applied for 2,048 machine memory cycles.
WHAT IF Branches before evaluating the test conditions
OR ELSE Conditional threat, as in "Add these two numbers OR ELSE!"
WHY NOT Executes the code that follows in a devil-may-care fashion
WHO ELSE Used for polling during I/O operations
ELSEWHERE This is where your program really is when you think it's here
GOING GOING GONE For writing unstructured programs, takes a random branch to another part of the program. Does the work of ten GOTOs
DON'T DO WHILE NOT This loop is not executed if the test condition is not false, or if it's Friday afternoon
DIDN'T DO The loop executes once and then hides all traces
CAN'T DO The loop is naffed
WON'T DO The CPU halts because it doesn't like the code inside the loop. It can be resumed by typing "MAY I" at the console
MIGHT DO Depends on how the CPU is feeling. The loop is executed if the CPU is "up", not executed if the CPU is "down" or its feelings have been hurt
DO UNTO OTHERS Used to write the main loop for timesharing systems so that they will antagonize the users in a uniform manner
DO WAH DIDDY Used to write timing loops for computer-generated music
JUST IN CASE For handling afterthoughts and fudge factors. Allows you to multiply by zero to correct for accidentally dividing by zero.
BRIEF CASE To encourage portable software
OPEN AND SHUT CASE No proof of correctness is required with this statement
IN ANY CASE This statement always works
HOPELESS CASE This statement never works
BASKET CASE This statement is a really hopeless case
This operator compares two floating point numbers and takes the worry out of being close