Re: EU script
- Posted by Irv Mullins <irvm at ellijay.com> Aug 12, 2001
- 466 views
From: Chris Bensler <bensler at telus.net > Has anyone written an EU scripting engine? > I didn't see it in the archives. > I'm surprised in fact that there isn't one there already. > It would solve quite a few problems. > Like variable execution, dynamic includes, plugin applications. > > I have started on one, but I thought I would ask in case it's already out > there somewhere and I overlooked it. Chris: Have you thought about imbedding Lua? That's exactly what it was designed for, and Lua looks so much like euphoria it's spooky. Even down to the -- comments. Example follows: -------------------------------- -- 99 bottles of beer ~ Lua 4.0 -------------------------------- function bottle(n) if n==0 then return 'no more bottles' elseif n==1 then return '1 bottle' else return n..' bottles' end end n=99 while (n > 0) do print (bottle(n)..' of beer on the wall,') print (bottle(n)..' of beer.\nTake one down,\npass it around,') n = n - 1 print (bottle(n)..' of beer on the wall.\n') end Regards, Irv