Post Reply 
[CAS] Detection of errors in the program editor
10-19-2016, 12:16 AM
Post: #1
[CAS] Detection of errors in the program editor
Hello,

1: why the sentence "if ( (a:= 5) and true) then" this has the final state TRUE?, the left side of the comparison is an assignment, why evaluates to true?

PHP Code:
#cas
  
test( ):=
begin
  
print;
  
//print (5 != 6);
  //print (5 <> 6);
  //print (5 ≠ 6);

  
if ( (a:= 5) and truethen
    
print("yes");
  else
    print(
"no");
  
end;
  return 
"Done";
end;
#end 

test( ); returns "YES"
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
[CAS] Detection of errors in the program editor - compsystems - 10-19-2016 12:16 AM



User(s) browsing this thread: 1 Guest(s)