--* From postmaster%watson.vnet.ibm.com@yktvmv.watson.ibm.com  Wed Nov 10 10:01:58 1993
--* Received: from yktvmv.watson.ibm.com by leonardo.watson.ibm.com (AIX 3.2/UCB 5.64/4.03)
--*           id AA14383; Wed, 10 Nov 1993 10:01:58 -0500
--* X-External-Networks: yes
--* Received: from watson.vnet.ibm.com by yktvmv.watson.ibm.com (IBM VM SMTP V2R3)
--*    with BSMTP id 8875; Wed, 10 Nov 93 10:08:27 EST
--* Received: from YKTVMV by watson.vnet.ibm.com with "VAGENT.V1.0"
--*           id <A.SANTAS.NOTE.YKTVMV.6969.Nov.10.10:08:27.-0500>
--*           for asbugs@watson; Wed, 10 Nov 93 10:08:27 -0500
--* Received: from bernina.ethz.ch by watson.ibm.com (IBM VM SMTP V2R3) with TCP;
--*    Wed, 10 Nov 93 10:08:25 EST
--* Received: from neptune by bernina.ethz.ch with SMTP inbound id <1760-0@bernina.ethz.ch>; Wed, 10 Nov 1993 16:08:07 +0100
--* From: Philip Santas <santas@inf.ethz.ch>
--* Received: from rutishauser.inf.ethz.ch (rutishauser-gw.inf.ethz.ch) by neptune id AA26237; Wed, 10 Nov 93 16:08:01 +0100
--* Date: Wed, 10 Nov 93 16:07:58 +0100
--* Message-Id: <9311101507.AA14582@rutishauser.inf.ethz.ch>
--* Received: from vinci.inf.ethz.ch.rutishauser by rutishauser.inf.ethz.ch id AA14582; Wed, 10 Nov 93 16:07:58 +0100
--* To: smwatt@watson.ibm.com
--* Subject: assign and define the same var
--* Cc: bronstei, asbugs@watson.ibm.com

--@ Fixed  by:  SSD   Fri Nov 11 12:14:03 EST 1994 
--@ Tested by:  none 
--@ Summary:    See the detailed description at the end of the file. 
-- PI: this is not a bug. Probably the error msg should be more clear, saying:
-- "cannot both define and assign x in the same scope". Ask SMW

This is about the co-existence of variables and constants.

The program:
--------------------
#include "aslib.as"
SI ==> SingleInteger

a:String == "asd"
a:SI := 1
---------------------
does not compile, because
 (Error) Cannot both assign and define `a'.
    Choose `==', `:=', or use as a `for' variable

However, the program:
-------------------
a:String == "asd"
foo():SI ==
    a:SI := 1
    a
-------------------
compiles (I have both assigned and defined 'a')

However, the program:

-------------------
a:String == "asd"
foo():String ==
    a:SI := 1
    a
-------------------
does not compile, because the last line reports:
  (Error) 1 meanings for `a' in this context.

What is the problem?

Philip

 
