Re: "eval()" commands/crash callbacks/ect. for Euphoria 2.5?

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

----- Original Message ----- 
From: "CoJaBo" <cojabo at suscom.net>
To: <EUforum at topica.com>
Subject: "eval()" commands/crash callbacks/ect. for Euphoria 2.5?



> In the first example, even if it did include the file, when it is bound
> the line 'eval_commands = include incl_file.e' whould look like
> 'eval_commands = (The entire file as a sequence or something).
   Personaly I like the current include method. all include file
   routines are declared at top level.

  In the second example, useing poke, peek and call can do the same thing.

  However I agree on the last example but I would like to see it more like
this.
  n.b. Where 'exist' is a low level machine proc.

  integer a
  -- lots a code.
  -- more code.
  -- for some reason 'a' has still not been declared.
  if  exist(a) then
    -- do something
  end if      -- In this case 'exist' would return 'False'.

I think a command like this could be used to catch
unexpected runtime errors in AI Intelligence programming,
unassighned variables etc.. and the boolen returned from
'exist' could be pased to a funtion to deal with the runtime error.


> CoJaBo wrote:
> Some of the following is missing from Euphoria and would be very
> helpful to me and many other programmers. I would like to see this in
> Eu 2.5. Please take these into consideration.
>
> <Snip>

> eval_commands="
> include incl_file.e--should allow including(This could be used
> --instead of complex "dynamic includeing" libraries)
> if a then
> ?a
> end if"
>
> a=7
> var_type=1
>
> ?eval(eval_commands,global_type,0)
> Displays:
> 7(value of a)
> 0(eval encountered no errors)
>
>
> routine_id() for variables
> I would like to see a varible_id systym (like routine id)
> example:
> integer a,a_id a=3
> a_id=var_id("a")
> ?get_var(a_id)
> --displays 3
> set_var(a_id,4)
> --a now is 4
> --1 because a is set
>
> ?is_var_set("b")
> --0 because b exists, but is not set
>
> ?is_var_set("c")
> -- -1 because c doesn't exist
>
>
>
> TOPICA - Start your own email discussion group. FREE!
>
>
> -- 
> Incoming mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.558 / Virus Database: 350 - Release Date: 2/01/04
>


---



--

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

Search



Quick Links

User menu

Not signed in.

Misc Menu