Phix : is not used

new topic     » topic index » view thread      » older message » newer message

Hi Pete,

While converting an eu library to Phix, I got the following error

type is_integer(object s) 
     ^  is not used. 

Having worked out that is_ was not the issue (!), I narrowed it to (much clipped)

type is_integer(object s) 
      --code 
end type 
ifdef WINDOWS then 
      --code 
else ifdef LINUX then 
      --code 
      some functions 
      in one of the functions 
         if is_integer(....) then 
         end if 
end ifdef 

Running on windows the Linux ifdef is never used, so Phix halted.

Adding

ifdef Linux then 
type is_integer(object s) 
     --code 
end type 
end ifdef 
 

solved the issue, but does this fall in the category of bug (should Phix stop if a type isn't used), poor coding on the lib authors part (no disrespect intended), or a tip when using Phix (if you define a type, always use it at least once)

Cheers Chris

Ps

type is_integer(object s) 
     --code 
end type 
if is_integer(1) then end if 

also works

PPS

I also note that t_digit, a predefined type in Eu isn't defined in Phix, which doesn't necessarily need to be phixed, but worthwhile noting that there are several predifined types not included by Phix. Could add types.e to Phix programs on an adhoc basis as the user needed them (although I haven't checked this for compatability)

Cheers Chris

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu