Re: version() function
- Posted by Pete Lomax <petelomax at blueyonder.co.uk> Nov 21, 2004
- 531 views
On Thu, 18 Nov 2004 17:30:46 -0800, Derek Parnell <guest at RapidEuphoria.com> wrote: >I'm now wishing there was some obvious way of telling at runtime >which version of Euphoria I'm running with. > >Currently I'm doing this, but I'm open to suggestions... > > >include machine.e >global function eu_version() >if routine_id("crash_routine") = -1 then > return 2.4 >else > return 2.5 >end if >end function Looks good to me. I might also suggest misc.e: pretty_print (2.4) (couldn't find anything for 2.3) sleep (2.2) reverse (2.1) misc.e was introduced in 2.0 Unfortunately, I can't suggest a check for 2.6! Maybe, if Rob does not think a version() routine is warranted, he could at least reserve say 65 as an opcode for machine_func. On a personal note, Derek, if you do wander off, I hope you find what you're looking for and remember to stop by once in a while. I can't in all honesty ask you to stay since it is clearly making you unhappy. I wouldn't be here without your efforts on win32lib. You'll certainly be missed. All the best, Pete