1. Phix : what's unrecognised
- Posted by ChrisB (moderator) in January
- 477 views
hi Pete
Phix 1.04, an error
D:\EuProgramming\Phix\demo\ide104\IDE.exw:9896 local = addProperty("Local:", 0, ptCheckBox) ^ unrecognised
Is the = unrecognised?
I'm assuming that local is unrecognised, but as a feature request can we have a bit more specificity
Cheers
Chris
2. Re: Phix : what's unrecognised
- Posted by petelomax in January
- 452 views
I added/allowed the use of "local" as an optional logical counterpart to "global" in 1.0.2.
Minimal impact on legacy code, apart from some uses of the identifier "local" now being prohibited,
and in particular you can no longer assign it in top-level code (but you still can within a routine).
In my copy of IDE.exw, slightly different from yours, I changed "local" to "plocal" (you could use "local_property" if preferred)
on lines 3618, 4395, 9826/7, 10303, 11506, 12047/9/51 (so 9 times in total).
Maybe I should prohibit the declaration of a variable named "local", and make it a proper (but still optional) keyword...
Alternatively/additionally I could easily add with/without local, without being the default, so such issues don't occur...
PS IDE.exw rejected my IDE.cfg, so I've just fixed get() and value() to cope with backtick strings and (eg) 100'd' - let me know if you need that.
3. Re: Phix : what's unrecognised
- Posted by ChrisB (moderator) in January
- 428 views
Ok, thanks, will give it a go.
Cheers
Chris
4. Re: Phix : what's unrecognised
- Posted by ChrisB (moderator) in January
- 427 views
Other issues raised, but I'll get them.
Is there any way for a program to know what interpreter is running it.
For instance Phix has version() and get_interpreter, but these error out on eu.
Is there a cross interpreter way to tell the program whether eu of Phix is running it?
Cheers
Chris
5. Re: Phix : what's unrecognised
- Posted by petelomax in January
- 422 views
command_line(), perhaps? I'm sure you could also do something with:
ifdef PHIX then puts(1,"this is Phix\n") elsedef puts(1,"this is Eu\n") end ifdef
6. Re: Phix : what's unrecognised
- Posted by ChrisB (moderator) in January
- 409 views
Ah, thanks
So PHIX is defined? What other hidden DEFS lurk?
Cheers
Chris
7. Re: Phix : what's unrecognised
- Posted by petelomax in January
- 390 views
So PHIX is defined? What other hidden DEFS lurk?
All of these (both sets) should be compatible with Eu, which obviously skips PHIX:
WIN32, WINDOWS, LINUX, UNIX, WIN32_GUI, WIN32_CONSOLE, BITS32, BITS64, PHIX
Note that WIN32 === WINDOWS and neither mean 32-bit. Ignored aka omitted by Phix:
FREEBSD, SUNOS, OPENBSD, OSX, SAFE, DATA_EXECUTE, UCSTYPE_DEBUG, CRASH, EU4_0, EU4_1
In other words eg "ifdef FREEBSD" is treated as "if false".
All other ifdefs (currently) trigger a compilation error.
Note that Phix normally abandons parsing when it finds a top-level abort(), however the first ifdef
triggers a preprocessing stage that replaces all ifdef and selected branches with blank lines, and
that can suffer new compilation errors that did not occur with no ifdef before such an abort statement.