1. object and sequence
- Posted by =?iso-8859-2?B?qWtvZGE=?= <tone.skoda at SIOL.NET> May 03, 2000
- 398 views
- Last edited May 04, 2000
------=_NextPart_000_009E_01BFB53A.8B042AE0 charset="iso-8859-2" Content-Transfer-Encoding: quoted-printable we dont need sequences becuase you can allways use object instead of seuqence type is object type slower or what? ------=_NextPart_000_009E_01BFB53A.8B042AE0 charset="iso-8859-2" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META content=3D"text/html; charset=3Diso-8859-2" = http-equiv=3DContent-Type> <META content=3D"MSHTML 5.00.2614.3401" name=3DGENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=3D#ffffff> <DIV><FONT face=3D"Lucida Casual" size=3D2>we dont need = sequences</FONT></DIV> <DIV><FONT face=3D"Lucida Casual" size=3D2>becuase you can allways = use object=20 instead of seuqence type</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3D"Lucida Casual" size=3D2>is object type slower or=20 ------=_NextPart_000_009E_01BFB53A.8B042AE0--
2. Re: object and sequence
- Posted by Brian Broker <bkb at CNW.COM> May 04, 2000
- 434 views
On Wed, 3 May 2000 20:02:43 +0200, <tone.skoda at SIOL.NET> wrote: >we dont need sequences >becuase you can allways use object instead of seuqence type > >is object type slower or what? Think of an object as a generic container that can hold either atoms or sequences. I can't comment on any speed issues related to declaring a variable as an object or sequence (but I'd bet that working with sequences is faster than working with objects simply because it is more specific). If you have a function that can return either an atom or a sequence, then you should declare the receiving variable as an object. (See examples for 'gets' function in the reference manual... the variable 'line' is declared an object because 'gets' could return either a sequence or an atom.) If you want to make sure that your variable only holds a sequence, then you should declare it as a sequence (for error checking and possibly faster execution speed). -- Brian