Re: Suggestions for ESL (was: Euphoria Standard Library on UBoard)

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

On Sun, 24 Jul 2005 10:32:49 -0700, Bernie Ryan
<guest at RapidEuphoria.com> wrote:

>  const1 = enum(10), -- skip 4-9 set enumerate to 10

Why don't you just set it directly to 10? Besides, using an arbitrary
value like this is suspect anyway - your program will come a cropper
if you insert enough new items in the lower segment to cross over with
the high order segment, and your code is littered with meaningless
10's. It is better to enumerate a separating constant, eg
constant Kand=enum(),
		...
		Klast=enum(),
		Batom=enum().
		...
	if x<Klast then	-- handle keywords
	elsif x>Klast then	-- handle builtins


Pete

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

Search



Quick Links

User menu

Not signed in.

Misc Menu