RE: My not-quite obsolete namespace parser
- Posted by Derek Parnell <ddparnell at bigpond.com> May 14, 2002
- 407 views
Robert Craig wrote: > Derek Parnell writes: > > In file 'a.e' enter these three lines... > > > > global myval > > myval = 1 > > ? 1 > > > > In the file 'b.ex' enter these two lines... > > > > include ./a.e > > include a.e > > > > Now execute b.ex. When I do this I get ... > > > > 1 > > 1 > > If I correct "global myval" to "global integer myval", > and I correct "./a.e" to ".\a.e", then > it correctly prints a single "1" on DOS or Windows. > > Or if I use "./a.e" on Linux or FreeBSD it also > correctly prints a single "1". > > Euphoria assumes "\" in file paths on DOS and Windows, > and "/" and Linux and FreeBSD. If you have something else > it just passes it through to the O/S. It looks like DOS and Windows > will accept "/" in some cases (but not all). > Linux and FreeBSD never accept "\". I humbly apologise. I can now see that this is a feature and not a bug. At the MS-DOS prompt when I type: type ./b.ex I get the message: G:\MYDOCS~1>type ./b.ex The syntax of the command is incorrect. Then I enter : type "./b.ex" and I get ... G:\MYDOCS~1>type "./b.ex" include .\a.e include ..\mydocs~\a.e So it would seem that DOS accepts either type of 'slash' symbol when it is is clearly a part of the file-path string. On this basis, it could be argued that Euphoria is not compliant with MS-DOS systems. However, I *would *never *say *that, because Euphoria is perfect in every way ------------ Derek.