OK
Look this small program with strings
how is possible that have such big mem footprint?
'Parser -Eval -o2- by Aurel 2018
$ filename "ParseEval.exe"
#lookahead
string token,crlf= chr(13)+chr(10),buff
'test expression -> 2+3*4
string TokenList[] = {"2","+","3","*","4"}
string OperatorList[] = {"-","+","*","/","^","("} '6
string op
'get size of list?
print spanof(TokenList) ' size of array -> 5 ...count of tokens
int tokCount = spanOf(TokenList)
int prec
string opStack
string opPLUS,opMULTI
string cell
'
'loop trough tokens
For t = 1 to tokCount
token = TokenList[t]
If instr("+-*/^(",token) <> 0
op = token
print "OP:" + op
End if
if token <> op
buff = buff + tokenlist[t]
end if
'select token
'case "("
'.........................
'case "^"
'.........................
'case "/"
'..........................
if token = "*"
buff = buff + tokenlist[t] + crlf
end if
'.........................
if token = "+"
buff = buff + tokenlist[t] + crlf
end if
'.........................
'end select
'buff = buff + token
'print "BUFF: " buff + " N:" + str(t)
' i instr(token,"+-*/^(",op) = 0
'buff = buff + token + crlf
'end if
Next t
'show operator buffer
print buff