BBS: Inland Empire Archive Date: 03-13-93 (22:27) Number: 340 From: QUINN TYLER JACKSON Refer#: NONE To: ALL Recvd: NO Subj: formula solver 7/7 Conf: (2) Quik_Bas
'>>> Start of page 7. Op$ = TOKEN$ IF fqjInOpList(POWER, Op$) THEN CALL sqjGetOp CALL sqjLevel4(h) CALL sqjApplyOp(Op$, r, h) END IF END SUB SUB sqjLevel5 (r) Op$ = "" IF TypeToken = OperatorClass AND (fqjInOpList(ADDSUB, TOKEN$)) THEN Op$ = TOKEN$ CALL sqjGetOp END IF CALL sqjLevel6(r) IF Op$ <> "" THEN CALL sqjNegative(Op$, r) END IF END SUB SUB sqjLevel6 (r) ' This level handles parentheses IF TOKEN$ = "(" AND TypeToken = OperatorClass THEN CALL sqjGetOp CALL sqjLevel1(r) CALL sqjGetOp ELSE CALL sqjPrimitive(r) END IF END SUB SUB sqjNegative (Op$, r) ' This sub handles numbers like -6 SELECT CASE Op$ CASE "-" r = -r END SELECT END SUB SUB sqjPrimitive (r) IF TypeToken = DigitClass THEN r = VAL(TOKEN$) CALL sqjGetOp ELSE PRINT "SYNTAX ERROR" END IF END SUB ________O_/________________________| SNIP |______________________\_O_______ O \ | HERE | / O --- Maximus/2 2.01wb * Origin: The Nibble's Roost, Richmond BC Canada 604-244-8009 (1:153/918)
Books at Amazon:
Back to BASIC: The History, Corruption, and Future of the Language
Hackers: Heroes of the Computer Revolution (including Tiny BASIC)
Go to: The Story of the Math Majors, Bridge Players, Engineers, Chess Wizards, Scientists and Iconoclasts who were the Hero Programmers of the Software Revolution
The Advent of the Algorithm: The Idea that Rules the World
Moths in the Machine: The Power and Perils of Programming
Mastering Visual Basic .NET