Menu

#12 Run Code at Runtime

open
nobody
None
5
2012-12-07
2003-08-05
No

The ability to run code (as a script) at runtime. For
example to run code written in a text document, like
using the Microsoft Script Control in Visual Basic 6. This
is a very usefull ability and helps to build Data Driven
Applications as you can execute customized code.

Discussion

  • Benoit Minisini

    Benoit Minisini - 2003-08-06

    Logged In: YES
    user_id=29457

    Welcome to Gambas viruses !

     
  • Nobody/Anonymous

    Logged In: NO

    I don't know if that's what you were looking for, but
    there's the EVAL function which (more or less) allows the
    execution of code at runtime.

     
  • George Chatzimanolis

    Logged In: YES
    user_id=693347

    No is not what i want. I know what EVAL function does. i
    mean a way that during runtime the program read a block of
    code (for example a sub from a text file) and then execute it.
    That sub it may uses other classes or functions.

    That help us to create fully Data Driven Programs. Like the
    EVAL function of the CLIPPER.

    If EVAL is doing what I mean then I am OK! ;)

     
  • Nobody/Anonymous

    Logged In: NO

    It seems that EVAL doesn't allow the execution of commands.

    I don't understand that. EVAL should treat data as code -
    including commands.

    If the problem is security, Gambas could have a "taint mode"
    like in Perl:

    You may not use data derived from outside your program to
    affect something else outside your program--at least, not by
    accident.

    Any variable set to a value derived from tainted data will
    itself be tainted, even if it is logically impossible for
    the tainted data to alter the variable.

    You can "untaint" data and then evaluate it - but you have
    to do that explicitly.

    More information about Perl's taint mode can be found here:

    http://www.perldoc.com/perl5.8.0/pod/perlsec.html

     
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.