logmessage( i + " " + j );
}
or:-
for ( var f = new Enumerator( selection ); ! f.atEnd(); f.moveNext() ) {
}
I think I'm confortable with those things now but sometimes vbs code seems
easier to read than Jscript (in spite of what other people said...).
[kim aldis]
you should be aware, though, that what appears to be the case now will
change as your skill increases. Larger scripts just aren't possible to
manage in vbscript.
Use what you're comfortable with. :-)
------=_NextPart_000_0097_01C56DDF.0600D6A0
Content-Type: text/html;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dus-ascii">
<META content=3D"MSHTML 6.00.2900.2627" name=3DGENERATOR></HEAD>
<BODY>
<DIV><SPAN class=3D343234415-10062005></SPAN><FONT face=3DArial =
color=3D#0000ff=20
size=3D2><SPAN class=3D343234415-10062005>Opinions are always going to =
differ on=20
this. However, see below for a couple of points.</SPAN></FONT></DIV>
<DIV><FONT face=3DArial><FONT color=3D#0000ff><FONT=20
size=3D2></FONT></FONT></FONT> </DIV>
<DIV><FONT face=3DArial><FONT color=3D#0000ff><FONT size=3D2><SPAN=20
class=3D343234415-10062005></SPAN></FONT></FONT></FONT> </DIV>
<DIV><BR></DIV>
<BLOCKQUOTE=20
style=3D"PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px =
solid; MARGIN-RIGHT: 0px">
<DIV class=3DOutlookMessageHeader lang=3Den-us dir=3Dltr align=3Dleft>
<HR tabIndex=3D-1>
<FONT face=3DTahoma size=3D2><B>From:</B> owner-xsi(at)Softimage.COM=20
[mailto:owner-xsi(at)Softimage.COM] <B>On Behalf Of </B>guillaume=20
laforge<BR><B>Sent:</B> 10 June 2005 16:04<BR><B>To:</B>=20
XSI(at)Softimage.COM<BR><B>Subject:</B> Re: A netview =
question.<BR></FONT></DIV>
<DIV><FONT face=3DTahoma size=3D2></FONT> </DIV>
<DIV>From my point a view, vbs seems interesting for severals points =
:</DIV>
<DIV>- No need to deal with "output arguments" as =
in jscript/python=20
etc.<BR><SPAN class=3D343234415-10062005><FONT face=3DArial =
color=3D#0000ff=20
size=3D2>[kim aldis] </FONT></SPAN></DIV>
<DIV><SPAN class=3D343234415-10062005><FONT face=3DArial =
color=3D#0000ff=20
size=3D2>Output arguments can make for unclear =
code:-</FONT></SPAN></DIV>
<DIV><SPAN class=3D343234415-10062005><FONT face=3DArial =
color=3D#0000ff=20
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D343234415-10062005><FONT face=3DArial =
color=3D#0000ff size=3D2>foo(=20
a,b,c ) // which one is the return argument? How many are there,=20
even</FONT></SPAN></DIV>
<DIV><SPAN class=3D343234415-10062005><FONT face=3DArial =
color=3D#0000ff size=3D2>var=20
a =3D foo( a,b ) //is much =
clearer,=20
much more intuitive.</FONT></SPAN></DIV>
<DIV><SPAN class=3D343234415-10062005><FONT face=3DArial =
color=3D#0000ff size=3D2>If=20
there's going to be more than one return value then it's time to think =
of an=20
object.</FONT></SPAN></DIV>
<DIV><SPAN class=3D343234415-10062005><FONT face=3DArial =
color=3D#0000ff=20
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D343234415-10062005> </SPAN></DIV>
<DIV>- "for oObject in oObjects" is simple to understand compared =
to "for=20
i=3D0;i<oObjects.count;i++"<BR><SPAN =
class=3D343234415-10062005><FONT=20
face=3DArial color=3D#0000ff size=3D2>[kim =
aldis] </FONT></SPAN></DIV>
<DIV><SPAN class=3D343234415-10062005><FONT face=3DArial =
color=3D#0000ff size=3D2>At=20
least 50% of legibility is what you're used to, how your eyes scan for =
known=20
patterns so the jscript loop does become more familiar with use. but =
yes,=20
the VBS loop is easier to scan. It is, though, limited in =
what it=20
can achieve and</FONT></SPAN></DIV>
<DIV><SPAN class=3D343234415-10062005><FONT face=3DArial =
color=3D#0000ff=20
size=3D2> the jscript loop is way more flexible, more powerful. =
Consider=20
this one:-</FONT></SPAN></DIV>
<DIV><SPAN class=3D343234415-10062005><FONT face=3DArial =
color=3D#0000ff=20
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D343234415-10062005><FONT face=3DArial =
color=3D#0000ff size=3D2>var=20
j=3D0;</FONT></SPAN></DIV>
<DIV><SPAN class=3D343234415-10062005><FONT face=3DArial =
color=3D#0000ff size=3D2>for=20
( var i=3D0; i<10; i +=3Dj ) {</FONT></SPAN></DIV>
<DIV><SPAN class=3D343234415-10062005><FONT face=3DArial =
color=3D#0000ff=20
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D343234415-10062005><FONT face=3DArial =
color=3D#0000ff=20
size=3D2>j++;</FONT></SPAN></DIV>
<DIV><SPAN class=3D343234415-10062005><FONT face=3DArial =
color=3D#0000ff=20
size=3D2>}</FONT></SPAN></DIV>
<DIV><SPAN class=3D343234415-10062005><FONT face=3DArial =
color=3D#0000ff=20
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D343234415-10062005><FONT face=3DArial =
color=3D#0000ff=20
size=3D2>or:</FONT></SPAN></DIV>
<DIV><SPAN class=3D343234415-10062005><FONT face=3DArial =
color=3D#0000ff size=3D2>var=20
a =3D new Array( 1,2,3,4,5,6,7 ) // (can't do this =
in vbs, by=20
the way)</FONT></SPAN></DIV>
<DIV><SPAN class=3D343234415-10062005><FONT face=3DArial =
color=3D#0000ff size=3D2>for=20
( var i=3D0; a[i] !=3D 4; i++ ) {</FONT></SPAN></DIV>
<DIV><SPAN class=3D343234415-10062005><FONT face=3DArial =
color=3D#0000ff=20
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D343234415-10062005><FONT face=3DArial =
color=3D#0000ff=20
size=3D2>}</FONT></SPAN></DIV>
<DIV><SPAN class=3D343234415-10062005><FONT face=3DArial =
color=3D#0000ff=20
size=3D2></FONT></SPAN><SPAN class=3D343234415-10062005><FONT =
face=3DArial=20
color=3D#0000ff size=3D2>or:-</FONT></SPAN></DIV>
<DIV><SPAN class=3D343234415-10062005>
<P><FONT face=3DArial color=3D#0000ff size=3D2>for ( i=3D5,j=3D1; =
j<i &&=20
i<100; i++,<SPAN =
class=3D343234415-10062005> </SPAN>j+=3D2 )=20
{</FONT></P>
<P><FONT face=3DArial color=3D#0000ff size=3D2>logmessage( i + " " + j =
);</FONT></P>
<P><FONT face=3DArial color=3D#0000ff =
size=3D2>}</FONT></P></SPAN></DIV>
<DIV><SPAN class=3D343234415-10062005><FONT face=3DArial =
color=3D#0000ff=20
size=3D2>or:-</FONT></SPAN></DIV>
<DIV><SPAN class=3D343234415-10062005><FONT face=3DArial =
color=3D#0000ff size=3D2>for=20
( var f =3D new Enumerator( selection ); ! f.atEnd(); f.moveNext() )=20
{</FONT></SPAN></DIV>
<DIV><SPAN class=3D343234415-10062005><FONT face=3DArial =
color=3D#0000ff=20
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D343234415-10062005><FONT face=3DArial =
color=3D#0000ff=20
size=3D2>}</FONT></SPAN></DIV>
<DIV><SPAN class=3D343234415-10062005> </SPAN></DIV>
<DIV>I think I'm confortable with those things now but sometimes vbs =
code=20
seems easier to read than Jscript (in spite of what other people=20
said...).<BR><SPAN class=3D343234415-10062005><FONT face=3DArial =
color=3D#0000ff=20
size=3D2>[kim aldis] </FONT></SPAN></DIV>
<DIV><SPAN class=3D343234415-10062005><FONT face=3DArial =
color=3D#0000ff size=3D2>you=20
should be aware, though, that what appears to be the case =
now will change=20
as your skill increases. Larger scripts just aren't possible to =
manage in=20
vbscript.</FONT></SPAN></DIV>
<DIV><SPAN class=3D343234415-10062005><FONT face=3DArial =
color=3D#0000ff=20
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D343234415-10062005><FONT face=3DArial =
color=3D#0000ff size=3D2>Use=20
what you're comfortable with. :-)</FONT></SPAN></DIV>
<DIV><SPAN class=3D343234415-10062005><FONT face=3DArial =
color=3D#0000ff=20
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN=20
class=3D343234415-10062005></SPAN> </DIV></BLOCKQUOTE></BODY></HTML>=
------=_NextPart_000_0097_01C56DDF.0600D6A0--
---
Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body:
unsubscribe xsi