forum-msg-id-132457-edit

Original date:2018-04-17 11:45:29 Edited by: jmduro Subject: Re: Very First Language to Learn: Phix or Euphoria?

There may be a better way to do this but ifdef does the job.

global constant 
  EU_4_1_LNX_64 = 1, EU_4_1_LNX_32 = 2, EU_4_0_LNX = 3, PHIX_LNX_64 = 4, PHIX_LNX_32 = 5, 
  EU_4_1_WIN_64 = 6, EU_4_1_WIN_32 = 7, EU_4_0_WIN = 8, PHIX_WIN_64 = 9, PHIX_WIN_32 = 10 
 
ifdef BITS64 then   
  address_length = 8 
  ifdef PHIX then 
    ifdef WINDOWS then 
      eu_version = PHIX_WIN_64 
    elsifdef LINUX then 
      eu_version = PHIX_LNX_64 
    end ifdef 
  elsedef 
    ifdef WINDOWS then 
      eu_version = EU_4_1_WIN_64 
    elsifdef LINUX then 
      eu_version = EU_4_1_LNX_64 
    end ifdef 
  end ifdef 
elsedef   
  address_length = 4 
  ifdef PHIX then 
    ifdef WINDOWS then 
      eu_version = PHIX_WIN_32 
    elsifdef LINUX then 
      eu_version = PHIX_LNX_32 
    end ifdef 
  elsedef 
    ifdef WINDOWS then 
      ifdef EU4_0 then 
        eu_version = EU_4_0_WIN 
      elsifdef EU4_1 then 
        eu_version = EU_4_1_WIN_32 
      end ifdef 
    elsifdef LINUX then 
      ifdef EU4_0 then 
        eu_version = EU_4_0_LNX 
      elsifdef EU4_1 then 
        eu_version = EU_4_1_LNX_32 
      end ifdef 
    end ifdef 
  end ifdef 
end ifdef 

This can be reduced by applying Pete's patch for EU4_0.

Jean-Marc

Not Categorized, Please Help

Search



Quick Links

User menu

Not signed in.

Misc Menu