Announcement

Collapse
No announcement yet.

How I can know the name of variable in runtime and evaluate expression

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • jcfuller
    replied
    Here is some dos code for expression evaluation that shouldn't be too hard to convert.
    www.jcfuller.com/ARDAF152.ZIP

    James


    ------------------




    [This message has been edited by jcfuller (edited December 30, 2000).]

    Leave a comment:


  • Lance Edmonds
    replied
    because powerbasic compiles source code into pure machine code, variable names and tokens are simply not present in the compiled code.

    therefore, it is not possible to perform runtime parsing on named variables in your code. a neat side-effect of the compilation process is that it makes decompilation virtually impossible.

    however, there are 3rd-party tools available that can perform arbitary expression evaluation. i found one reference in the 3rd-party forum, and i seem to recall seeing some code in the source code forum too.


    i hope this helps!

    ------------------
    lance
    powerbasic support
    mailto:[email protected][email protected]</a>

    Leave a comment:


  • How I can know the name of variable in runtime and evaluate expression

    Please I need know the name of variable in runtime. This is because i am making a pseudo code.
    Also I need know how evaluate expression. for example:
    C10=5
    C25=4.5
    a$="C10*1+(C25/10)"
    RESULT=EVALUATE$(A$)
    Please help me.


    Israel Vega

    ------------------
Working...
X