BBS: Inland Empire Archive Date: 03-13-93 (22:26) Number: 337 From: QUINN TYLER JACKSON Refer#: NONE To: ALL Recvd: NO Subj: formula solver 4/7 Conf: (2) Quik_Bas

'>>> Start of page 4.SUBsqjApplyOp (Op$, r, h)' This is the meat of the operator section, and can bemodified to' includbyte symbol combination.ANYsymbol as an operator, or any two' Any symbol added has to be addedto the constant that sets its' level of precedence.SELECTCASEOp$CASE"-"' subtractionr = r - hCASE"+"' additionr = r + hCASE"*"' multiplicationr = r * hCASE"/"' divisionr = r / hCASE"\"' integer divisionr = r \ hCASE"%"' modulo divisionr = rMODhCASE"^", "**"' exponentationr = r ^ hCASE"]"' the rth root of hr = h ^ (1 / r)CASE"?"' random number from 0 to h, to r decimal placesr = (INT(RND * h * 10 ^ r)) / 10 ^ rCASE"<<"' bitshift left h by r bitsr = INT(h) * 2 ^ INT(r)CASE">>"' bitshift right h by r bitsr = INT(h) \ 2 ^ INT(r)CASE"<"' logical less than thanr = r < hCASE"<=", "=<"' logical less than or equal tor = r <= hCASE">"' logical greater thanr = r > hCASE">=", "=>"' logical greater than or equal tor = r >= hCASE"=="' logical equalityr = r = hCASE"<>"' logical inequalityr = r <> hCASE"&"' bitwise ANDr = rANDhCASE"|"' bitwise ORr = rORhCASE"~"' bitwise XORr = rXORhENDSELECTENDSUBSUBsqjAssignVar (VarName$, VarValue)' First we see if this variable is already in the listFORi% = 1TOVariPtrIFVarMem(i%).Nom = VarName$THEN' Since it was, just change its valueVarMem(i%).Valu = VarValuEXITSUBENDIFNEXTi%' Since it wasn't, put it thereVariPtr = VariPtr + 1 '>>> Continued on page 5. --- Maximus/2 2.01wb * Origin: The Nibble's Roost, Richmond BC Canada 604-244-8009 (1:153/918)

Echo Basic Postings

**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