Re: New pre-processor interface added to Euphoria
- Posted by jeremy (admin) Aug 05, 2009
- 1774 views
For the fun of it, I browsed through the archives and found the first OO pre-processor that I came by. It was o4 by Karl Bochert, http://www.rapideuphoria.com/o4_32.zip ... It was written for 3.x and it used a variable "switch" which is a new 4.x keyword. I changed that to _switch, I then changed the command line parameters to accept -i input_filename -o output_filename and then gave it a try with 4.0...
--_def.eo4 test dot notation -- include o4runtm.e :Class A extends NONE :Public sequence s :Endclass A :Class B extends A -- An effective class :Public sequence s :Public procedure set() this.s = "Hi " -- local member ..s = "Bye" -- parent's member puts (2, .s) -- alternate local reference puts (2, ..s) end procedure :Endclass :Instance x of B x.set () include get.e puts (2, "\n--Press Any Key to Exit--") abort (wait_key ())
C:\Euphoria> eui -p eo4:eo4.ex _dot.eo4 Hi Bye
Pretty exciting, I think.
Jeremy