1. How does crash_routine() work?
- Posted by Funkbrat <funkbrat1 at yahoo.com> Feb 11, 2006
- 396 views
I have three procedures in my program, and I want the third one to initiate when an error occures in my program. In order to do that, I must call crash_routine() with a number instead of a procedure. According to the notes in machine.e, the number represents the routine id of a procedure in my program. How do I know which procedure has which routine id?
2. Re: How does crash_routine() work?
- Posted by Jason Gade <jaygade at yahoo.com> Feb 11, 2006
- 397 views
Funkbrat wrote: > > I have three procedures in my program, and I want the third one to initiate > when an error occures in my program. In order to do that, I must call > crash_routine() with a number instead of a procedure. According to the > notes in machine.e, the number represents the routine id of a procedure > in my program. How do I know which procedure has which routine id? See this: http://www.rapideuphoria.com/lib_c_d.htm#crash_routine and this: http://www.rapideuphoria.com/lib_p_r.htm#routine_id But basically to get a routine_id, you call it with the string name of your function, like this: crash_routine(routine_id("my_crash")) my_crash has to be defined before you execute this statement. Like normal calling conventions in Euphoria, routine_id() does not work with forward references. -- "Any programming problem can be solved by adding a level of indirection." --anonymous "Any performance problem can be solved by removing a level of indirection." --M. Haertel j.
3. Re: How does crash_routine() work?
- Posted by Greg Haberek <ghaberek at gmail.com> Feb 11, 2006
- 412 views
> I have three procedures in my program, and I want the third one to initia= te > when an error occures in my program. In order to do that, I must call > crash_routine() with a number instead of a procedure. According to the > notes in machine.e, the number represents the routine id of a procedure > in my program. How do I know which procedure has which routine id? With routine_id()!
-- note: name is passed as a sequence, no parentheses ProcID = routine_id("ProcedureName") FuncID = routine_id("FunctionName")
It really is that easy. ~Greg