Re: Euphoria vs. C and OOP
- Posted by c.k.lester <euphoric at cklester.com> Jan 05, 2007
- 712 views
jacques deschĂȘnes wrote: > The only addition would be enum declaration > enum {first_name, last_name, street, town} > sequence addresse > address = repeat(0,5) > address[first_name] = "Don" > address[last_name] = "Cole" > etc... > this would reduce typing compared to > constant first_name=1, last_name=2, town=3 > and those enum could only be used to access sequence elements Or something like this: newSequence("addresse") -- newDatabase define_elements( -- define_fields "addresse" , { "name_first", "name_last", "street", "town" } ) set("addresse","name_first","Don") set("addresse","name_last","Cole") That's a simple example and makes the code infinitely flexible.