Re: Well I did it! (variable_id, etc..)
- Posted by Greg Haberek <ghaberek at gmail.com> Nov 25, 2004
- 629 views
Geeze, once you start altering that interpreter, its really easy to keep adding stuff. I altered '=' to return true/false for sequences, but only in an 'if' statement. Example:
? "this" = "that" -- prints {1, 1, 0, 0} if "this" = "that" then -- prints 0 or 1 ? 1 else ? 0 end if
~Greg same site: http://www.merkur.000k2.com/euw.zip On Thu, 25 Nov 2004 01:55:21 -0500, Greg Haberek <ghaberek at gmail.com> wrote: > > > Sorry, scratch variable_type() for now, I've still got to work on that one... > > On Thu, 25 Nov 2004 01:51:02 -0500, Greg Haberek <ghaberek at gmail.com> > wrote: > > Here's the moment everyone's been waiting for: > > > > I've alted eu.ex to include the following features: > > > > s = routine_name( i ) -- returns a routine name given an id > > s = routine_list() -- all routines registered with routine_id() > > i = variable_id( s ) -- returns a unique variable id > > s = variable_name( i ) -- returns a varable name given an id > > s = variable_list() -- all variables registerd with variable_id() > > i = variable_type( i ) -- returns a variable's type given an id > > o = read( i ) -- reads a variable's value > > write( i, o ) -- writes a variable's value > > > > I hope all of you are happy. I'm still looking into routine ids for > > built-in routines. Like Rob said, its a little difficult to implement. > > I'm not including source code at this point, just a translated > > executable and a demo program. I'll be updating these features with > > the beta and official releases of 2.5, or giving them to RDS. > > > > Go here to download: > > http://www.merkur.000k2.com/euw.zip > > > > > > ~Greg > > >