Re: New pre-processor interface added to Euphoria

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

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

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

Search



Quick Links

User menu

Not signed in.

Misc Menu