Re: Detecting the Eu version
- Posted by Jason Gade <jaygade at yahoo.com> Dec 15, 2004
- 575 views
Ferlin Scarborough wrote: > > Unkmar wrote: > > > > So many of you still don't understand the problem. > > > > What we need is a Version function added to Euphoria that works something like > this: > }}} <eucode> > version_message="This program requires Euphoria Version 2.5 or greater!" > > if version("2.5") = 0 then > abort_parse() > abort(0) > end if > </eucode> {{{ > <snip> Ferlin, the main pont is that version() will never be executed. The file is parsed entirely first, so if newer versions have any syntax changes a compile-time error will occur before any part of the program is executed. Some people think that an acceptable solution is to cause a deliberate syntax error that will then print a message and the end user will have to manually edit the source to fix it. The second solution is to add a 'stub' program that detects the interpreter version and either executes it or exits with a message. The best solution would be for RDS to include a compile-time directive to detect the version and let the program act accordingly. Can we let this thread die now? End users should get all proper files when a program is distributed to them. Developers should read the docs and be aware of what versions they need. > Ferlin Scarborough > > Learn To Program Games in Free Courses At > <a href="http://www.gameuniv.net">http://www.gameuniv.net</a> > > My Euphoria Home Page > <a > href="http://mywebpage.netscape.com/shadetreesoft">http://mywebpage.netscape.com/shadetreesoft</a> > ===================================== Too many freaks, not enough circuses. j.