Re: What difference (object and sequence)
- Posted by Daniel Berstein <danielberstein at USA.NET> Aug 21, 1997
- 808 views
On 20 Aug 97 , Eduardo Uemura Okada wrote: > Hi Doug, a variable declared as object can hold both atom values or > sequences, and a variable declared as sequence can hold just sequences. ^^^^^^^^^^^^^^^^^^^^^^^^ I think your explanation isn't very acurate Eduardo: In Euphoria you have just two types of data: -Atoms (an indivisible value, such as 'A', 255 or #ff) -Sequences(kind of dinamic-flexible array, can contain either atoms of sequences) A variable declared as type object can behave as an atom or a sequence upon requirement. Example: object test test = 100 --Now test is an atom type variable test = {1,2,3,4} --Now test is a sequence! An object can't be an atom and a sequence at the same time, but a sequence element may be an atom or a sequence. Hope this little explanation helps. Regards, Daniel Berstein danielberstein at usa.net http://www.geocities.com/SiliconValley/Heights/9316