The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 795 - File: showthread.php PHP 7.4.33 (FreeBSD)
File Line Function
/showthread.php 795 errorHandler->error





Post Reply 
ELSE IF END --> ELIF?
07-21-2014, 12:08 PM (This post was last modified: 07-21-2014 12:09 PM by Joe Horn.)
Post: #1
ELSE IF END --> ELIF?
If you type the following code into a CAS program...

Code:
(x)->BEGIN
  IF 1==2 THEN x:=3;
  ELSE IF 4==4 THEN x:=5; END; END;
  RETURN(x);
END;

... then exit the program editor, then edit the program again, you'll see that it has turned into this:

Code:
(x)->BEGIN  
  IF 1 = 2 THEN x:=3; 
  ELIF (4==4) THEN x:=5;  END ;  
  RETURN(x);  
END;

The ELSE IF turned into ELIF, and one of the ENDs is gone. I don't see ELIF mentioned in any of the docs. Is this new in rev 6030? Borrowed syntax from C or C++ perhaps?

<0|ΙΈ|0>
-Joe-
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
ELSE IF END --> ELIF? - Joe Horn - 07-21-2014 12:08 PM
RE: ELSE IF END --> ELIF? - Helge Gabert - 07-21-2014, 07:42 PM
RE: ELSE IF END --> ELIF? - htom trites - 07-23-2014, 03:40 AM



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