Incompatible assignment
Posted: Tue Mar 14, 2017 1:42 pm
I forgot, did we discuss this issue?
I think we did but I find that behavior very annoying. Why should one beIvan Denisov wrote:I forgot, did we discuss this issue?
Code: Select all
TYPE
X = ARRAY 3 OF REAL;
VAR
a: X;
b: X;
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.