SourceForge.net RDS Incompatible Features

RDS Incompatible Features
Table of Contents

eval, var_id, etc


These are features that have been added to OOEU that emit IL code that is not compatible with RDS Euphoria. This means that you cannot use the preprocessor function with any code that uses these features.

If you would like for routine_id() to be able to do forward referencing, change the value of the constant FORWARD_ROUTINE_ID to TRUE (it's located near the bottom of global.e). Doing this doesn't produce incompatible IL code, but causes different behavior than RDS Euphoria, so your application might not run the same way on OOEU and RDS Euphoria.

  • keyword continue   
  • func dump_vars()   
  • func eval( sequence code )   
  • func eval_error()   
  • func find_from( object x, sequence s, integer i )   
  • func match_from( sequence x, sequence s, integer i )   
  • func read_var( integer vid )   
  • func var_id( sequence name )   
  • proc write_var( integer vid, object val )     
     
    Subtopics:
  • Pass by reference
  • Using Gotos

    RDS Incompatible Features
    Table of Contents

    [keyword]
    continue

    Category: RDS Incompatible Features

    Used within loops to cease execution of the current loop and jump back to the begining of the loop. Be careful when used in while loops, since the loop variable isn't automatically changed for each execution of a loop (as for variables are), and you could create an infinite loop.

    See Also: dump_vars, eval, eval_error, find_from, match_from, read_var, var_id, write_var


    RDS Incompatible Features
    Table of Contents

    [func]
    dump_vars
    ()

    Category: RDS Incompatible Features

    Returns a sequence containing information on all variables in the application. Each element describes one variable, where the sub elements are:

    See Also: continue, eval, eval_error, find_from, match_from, read_var, var_id, write_var


    RDS Incompatible Features
    Table of Contents

    [func]
    eval
    ( sequence code )

    Category: RDS Incompatible Features

    Returns 1 if parsing was successful, and the code was executed, or zero if the code had errors. You cannot have an eval() statement inside of another eval() statement. Code within an eval statement is treated like top level code, except that if you call eval from within a procedure, the toplevel code will be able to access any loop and private variables that are within scope.

    You can define procedures, functions and euclasses within an eval, and you can also include an entirely new file. Files included through eval will be dynamically added to the interactive debugger. Anything defined within an eval will only be in scope inside of another eval, except that you can set a routine_id so that dynamic routines may be called from outside of an eval:

       integer rid, ok
       ok = eval( "procedure foo()\n" &
                  "    puts(1,\"foo!\\n\")\n" &
                  "end procedure\n" &
                  "rid = routine_id(\"foo\")")
       call_proc( rid, {} )
    

    See Also: continue, dump_vars, eval_error, find_from, match_from, read_var, var_id, write_var


    RDS Incompatible Features
    Table of Contents

    [func]
    eval_error
    ()

    Category: RDS Incompatible Features

    Returns the text of a compile-time error that occured parsing the eval statement.

    See Also: continue, dump_vars, eval, find_from, match_from, read_var, var_id, write_var


    RDS Incompatible Features
    Table of Contents

    [func]
    find_from
    ( object x, sequence s, integer i )

    Category: RDS Incompatible Features

    Extends the native find() function by allowing the specification of an index at which to start searching. This function avoids the need to slice the sequence and adjust the returned index.

      ? find_from( x, s, i )  -- this is equivalent to ? find( x, s[i..$] )
    

    See Also: continue, dump_vars, eval, eval_error, match_from, read_var, var_id, write_var


    RDS Incompatible Features
    Table of Contents

    [func]
    match_from
    ( sequence x, sequence s, integer i )

    Category: RDS Incompatible Features

    Extends the native match() function by allowing the specification of an index at which to start searching. This function avoids the need to slice the sequence and adjust the returned index.

      ? match_from( x, s, i )  -- this is equivalent to ? match( x, s[i..$] )
    

    See Also: continue, dump_vars, eval, eval_error, find_from, read_var, var_id, write_var


    RDS Incompatible Features
    Table of Contents

    [func]
    read_var
    ( integer vid )

    Category: RDS Incompatible Features

    Returns the value of the variable with the variable id vid.

    See Also: continue, dump_vars, eval, eval_error, find_from, match_from, var_id, write_var


    RDS Incompatible Features
    Table of Contents

    [func]
    var_id
    ( sequence name )

    Category: RDS Incompatible Features

    Returns a variable id that can be used with read_variable() and write_variable(). Unlike routine_id(), var_id() can forward reference variables. This is necessary in order to expose variables created in a call to eval().

    See Also: continue, dump_vars, eval, eval_error, find_from, match_from, read_var, write_var


    RDS Incompatible Features
    Table of Contents

    [proc]
    write_var
    ( integer vid, object val )

    Category: RDS Incompatible Features

    Sets the value of the variable with variable id vid to val.

    See Also: continue, dump_vars, eval, eval_error, find_from, match_from, read_var, var_id