RE: Mathew's interpreter

new topic     » topic index » view thread      » older message » newer message

> -----Original Message-----
> From: Kat [mailto:gertie at PELL.NET]

> Say, Mathew,, can the routine_id()s for vars in your 
> interpreter be *assigned* 
> or just looked up?

I'm not sure what you mean.  You have no control over what the actual id for
any variable is.  The working of variable_id is almost identical to
routine_id.  Any variable in scope when variable_id is called should return
a valid variable_id.

You can, however, *create* variables on the fly.  In fact, you can create a
variable, and then refer to it directly:

-- silly example...
include variable.em
integer foo_id
foo_id = create_variable( "foo", TYPE_SEQUENCE, "bar")
puts(1, foo )
write_variable( foo_id, "\n")
puts(1, read_variable( foo_id) )

I hope this answers your question.

Matt Lewis

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu