Thanks to everyone who quickly replied my message. So the issue has
been there a long time, and I just discovered it (shame on me, I suppose). The
short answer is: grow used to the second version, unless Insightful decides
this is a bug instead of a feature.
----
Jeffrey Wang
Ronin Capital LLC
Chicago, IL 60604
Tel: (312) 244-5768
Fax: (312) 244-5836
-----Original Message-----
From: Jeffrey Wang
Sent: Monday, August 18, 2003 10:07 AM
To: s-news@wubios.wustl.edu
Subject: [S] Stupid question on if ... else ...
For all my life, I used if ... else ... in the following syntax:
if (length(2) == 1) {
tmp = 1
}
else {
tmp = 2
}
However recently, this stopped working for me if this is sourced in as
a part of file (it still works if I run it from the script window). I had to
change it as follows in my file:
if (length(2) == 1) {
tmp = 1
} else {
tmp = 2
}
Can someone explain this to me what might be the cause? Thanks for any
hints in advance.
P.S. I am using S+ 6.1 release 1 on Windows 2000 if it helps.
----
Jeffrey Wang
Ronin Capital LLC
Chicago, IL 60604
Tel: (312) 244-5768
Fax: (312) 244-5836
--------------------------------------------------------------------
This message was distributed by s-news@lists.biostat.wustl.edu. To
unsubscribe send e-mail to s-news-request@lists.biostat.wustl.edu with
the BODY of the message: unsubscribe s-news
|