1. Phix : what's unrecognised

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

new topic     » topic index » view message » categorize

2. Re: Phix : what's unrecognised

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.

new topic     » goto parent     » topic index » view message » categorize

3. Re: Phix : what's unrecognised

Ok, thanks, will give it a go.

Cheers

Chris

new topic     » goto parent     » topic index » view message » categorize

4. Re: Phix : what's unrecognised

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

new topic     » goto parent     » topic index » view message » categorize

5. Re: Phix : what's unrecognised

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  
new topic     » goto parent     » topic index » view message » categorize

6. Re: Phix : what's unrecognised

Ah, thanks

So PHIX is defined? What other hidden DEFS lurk?

Cheers

Chris

new topic     » goto parent     » topic index » view message » categorize

7. Re: Phix : what's unrecognised

ChrisB said...

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.

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu