mid__c=US%a=_%p=CompuServe%l=TECHDEVA-971030164557Z-16387@techdeva.web.compuse
rve.com 49c20001
From: Scott Abbott
Option 1 seems more correct to me, but I could live with Option 2.
Scott Abbott
-----Original Message-----
From: tsepro@semware.com [SMTP:tsepro@semware.com]
Sent: Thursday, October 30, 1997 10:59 AM
To: 'tsepro@semware.com'
Subject: multiple assignments (ADVANCED USAGE). Opinions.
Sender: ProAdmin@semware.com
Received: from 206.65.52.161 (www.semware.com [206.65.52.161])
by dub-img-10.compuserve.com (8.8.6/8.8.6/2.7) with SMTP id KAA29499
for ; Thu, 30 Oct 1997 10:53:02 -0500
(EST)
Resent-Date: Thu, 30 Oct 1997 10:53:02 -0500 (EST)
Received: from steve.semware.com (unverified [206.65.52.170]) by
semware.com
(EMWAC SMTPRS 0.83) with SMTP id ;
Thu, 30 Oct 1997 10:52:17 -0500
Received: by steve.semware.com with Microsoft Mail
id ; Thu, 30 Oct 1997 10:54:26
-0500
Message-ID:
From: Steve
To: "'tsepro@semware.com'"
Subject: multiple assignments (ADVANCED USAGE). Opinions.
Date: Thu, 30 Oct 1997 10:54:25 -0500
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Sender: tsepro-request@semware.com
Resent-Message-Id:
Resent-From: tsepro@semware.com
Suppose... I repeat suppose... that SC32 allowed multiple assignments
of variables such as
n = m = p = 1
I would assume that the variables n,m, and p are all set to 1.
(For those of you who have already found this advanced feature....
ignore it for now)
But how would you expect the following to work?
string s[20], t[10], u[4]
s = t = u = "12345678901234"
Would you expect ? (OPTION 1)
u = "1234"
t = "1234567890"
s = "12345678901234"
the longhand version would be:
u = "12345678901234" // which truncates to "1234" since u is only 4
characters in size
t = "12345678901234" // which truncates to "1234567890" since t is
only 10 characters in size
s = "12345678901234" // which does not truncate at all since s is 20
characters in size
or would you expect ? (OPTION 2)
u = "1234"
t = "1234"
s = "1234"
whose longhand is
u = "12345678901234" // which truncates to "1234" since u is only 4
characters in size
t = u // which sets t to "1234" since u
is "1234"
s = t // which sets s to "1234" since t
is "1234"
Put the string slice issue aside for now... Also, ignore the issue of
BYTE or WORD types which could possibly be added for additional
numeric storage... I'll bring that issue up later if need be...
What's your opinion? Should multiple assignments cause the right-hand
value to be assigned to each left-handle variable (OPTION 1) or should
the right-hand expression be assigned to each left-hand variable as it
passes right to left (OPTION 2)?
Steve
SemWare
---
---------------
* Origin: apana>>>>>fidonet [sawasdi.apana.org.au] (3:800/846.13)
|