Incompatible assignment
-
- Posts: 1700
- Joined: Tue Sep 17, 2013 12:21 am
- Location: Russia
Incompatible assignment
I forgot, did we discuss this issue?
- Attachments
-
- incass.png (6.43 KiB) Viewed 10224 times
- DGDanforth
- Posts: 1061
- Joined: Tue Sep 17, 2013 1:16 am
- Location: Palo Alto, California, USA
- Contact:
Re: Incompatible assignment
I think we did but I find that behavior very annoying. Why should one beIvan Denisov wrote:I forgot, did we discuss this issue?
forced to add the "syntactic sugar" of
Code: Select all
TYPE
X = ARRAY 3 OF REAL;
VAR
a: X;
b: X;
-
- Posts: 204
- Joined: Wed Sep 18, 2013 10:06 pm
- Contact:
Re: Incompatible assignment
You are not forced to do that. It is perfectly adequate to declare both variables in the same list:DGDanforth wrote:Why should one be
forced to add the "syntactic sugar"
Code: Select all
MODULE Anonymous;
VAR
a: ARRAY 3 OF REAL;
b: ARRAY 3 OF REAL;
c, d: ARRAY 3 OF REAL;
BEGIN
c := d; (* OK *)
a := b
END Anonymous.
- DGDanforth
- Posts: 1061
- Joined: Tue Sep 17, 2013 1:16 am
- Location: Palo Alto, California, USA
- Contact:
Re: Incompatible assignment
Chris,
Good point. I'll remember that.
Good point. I'll remember that.