enhanced the reader and compiler to treat the binop expression like a message-send expression
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
12
t/var-02.hcl
12
t/var-02.hcl
@ -14,24 +14,24 @@ if (eqv? j 20) {
|
||||
q := (x 30);
|
||||
};
|
||||
|
||||
if (/= a 900) { printf "ERROR: a is not 900\n" } \
|
||||
if (~= a 900) { printf "ERROR: a is not 900\n" } \
|
||||
else { printf "OK: %d\n" a };
|
||||
|
||||
if (/= b 60) { printf "ERROR: b is not 60\n" } \
|
||||
if (~= b 60) { printf "ERROR: b is not 60\n" } \
|
||||
else { printf "OK: %d\n" b };
|
||||
|
||||
if (/= c 840) { printf "ERROR: c is not 840\n" } \
|
||||
if (~= c 840) { printf "ERROR: c is not 840\n" } \
|
||||
else { printf "OK: %d\n" c };
|
||||
|
||||
[aa,bb,cc] := ((xx := x) 10)
|
||||
|
||||
if (/= aa 100) { printf "ERROR: aa is not 100\n" } \
|
||||
if (~= aa 100) { printf "ERROR: aa is not 100\n" } \
|
||||
else { printf "OK: %d\n" aa };
|
||||
|
||||
if (/= bb 20) { printf "ERROR: bb is not 20\n" } \
|
||||
if (~= bb 20) { printf "ERROR: bb is not 20\n" } \
|
||||
else { printf "OK: %d\n" bb };
|
||||
|
||||
if (/= cc 80) { printf "ERROR: cc is not 80\n" } \
|
||||
if (~= cc 80) { printf "ERROR: cc is not 80\n" } \
|
||||
else { printf "OK: %d\n" cc };
|
||||
|
||||
if (nqv? xx x) { printf "ERROR: xx is not equal to x\n"} \
|
||||
|
Reference in New Issue
Block a user