Post Reply 
[CAS] Detection of errors in the program editor
10-20-2016, 05:26 PM (This post was last modified: 10-20-2016 05:28 PM by toml_12953.)
Post: #5
RE: [CAS] Detection of errors in the program editor
(10-19-2016 12:29 PM)moonbeam Wrote:  
(10-19-2016 03:24 AM)Carlos295pz Wrote:  for CAS use a == 5

Good point. == and = are both relational operators. == is the actual test for equality. = works only in CAS and establishes an equation, which when used as an expression evaluates to true if and only if CAS can show that the left and right sides are the same.

<> and ≠ behave similarly.

A single = also works as a test for equality in non-CAS mode. Maybe it's not supposed to work but it does. Try it.

Code:
A:=5;
REPEAT
  PRINT(A);
  A:=A-1;
UNTIL A=0;
END;

Tom L

Tom L
Cui bono?
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread



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