Re: variables of different classes

2008-04-30 Thread Bob Smith
Jack Andrews wrote: hi guys, in the typical calculator example that allows statements like: a=2+3 it is fairly easy to parse and interpret code like b=a+1 but what if you could assign '+' to a variable: p=+ now that a variable could be an number or an operator, it's hard to parse eg. how ca

variables of different classes

2008-04-30 Thread Jack Andrews
hi guys, in the typical calculator example that allows statements like: a=2+3 it is fairly easy to parse and interpret code like b=a+1 but what if you could assign '+' to a variable: p=+ now that a variable could be an number or an operator, it's hard to parse eg. how can i parse string "a p b"