another EU 2.5 feature request

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

How about having the EUINC environmental variable changed to a Euphoria
source statement, eg:
with euinc="c:\\euphoria\\custom_include;c:\\euphoria\\include"
That way, you don't have conflicts with various Euphoria programs needing
different includes.

The following workaround attempt doesn't work( can't find test01.e):

global procedure set_euinc(sequence path)
     system("set EUINC=" & path,2)
     puts(1,"EUINC now points to " & path & "\n")
end procedure

set_euinc("c:\\temp1")

include test01.e  -- in c:\\temp1
-- global procedure dummy1()
--    puts(1,"Dynamic included procedure 1 called\n")
-- end procedure

procedure dummy0()
   puts(1,"Simple inline procedure called\n")
end procedure

procedure main()
   dummy0() -- usual procedure call
   dummy1() -- from included c:\\temp1
   -- conditional include attempt
   if 1 = 1 then
      set_euinc("c:\\temp2")
      include test02.e -- in c:\temp2
      -- global procedure dummy2()
      --    puts(1,"Dynamic included procedure 1 called\n")
      -- end procedure
      dummy2() -- from included c:\\temp2
   end if
end procedure

main()

I guess for simplicity reasons that the euinc contents are captured at the
euphoria
executable call only, and not refreshed for the duration?
Conditional includes are not supported at all either, but thats another
issue.

Cheers
Alan

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

Search



Quick Links

User menu

Not signed in.

Misc Menu