length ?
- Posted by Euman <euman at BELLSOUTH.NET> Jan 21, 2001
- 443 views
------=_NextPart_000_0009_01C0834B.FC1E3D80 charset="iso-8859-1" Hello all, I often have wondered if I use for x =3D 1 to length(something) is it actually faster (which I have become accustomed to doing) to save = the length value first? like: len =3D length(something) for x =3D 1 to len do It's probably buried in the docs and missed it, so dont crucify me Jiri.... euman ------=_NextPart_000_0009_01C0834B.FC1E3D80 charset="iso-8859-1" <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=3DContent-Type content=3D"text/html; = charset=3Diso-8859-1"> <META content=3D"MSHTML 5.50.4611.1300" name=3DGENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=3D#ffffff> <DIV><FONT face=3DArial size=3D2>Hello all,</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2>I often have wondered if I = use</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2>for x =3D 1 to = length(something)</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2>is it actually faster (which I have = become=20 accustomed to doing) to save the length value first?</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2>like:</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2>len =3D length(something)</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2>for x =3D 1 to len do</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2>It's probably buried in the docs and = missed it, so=20 dont</FONT></DIV> <DIV><FONT face=3DArial size=3D2>crucify me Jiri....</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2>euman</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> ------=_NextPart_000_0009_01C0834B.FC1E3D80--