IFTE CMD & IFT new CMD
|
02-26-2017, 03:53 PM
(This post was last modified: 02-26-2017 04:53 PM by compsystems.)
Post: #1
|
|||
|
|||
IFTE CMD & IFT new CMD
HELLO
I'm trying to port a code, to replace IF THEN ELSE END, by IFTE 1: in many cases you must enclose the field to true and false between (), when you try it in history view fail PHP Code: ifte( type(expr2) <> DOM_SYMBOLIC , partn:=string(expr2), partn:=conv2RPN3(expr2) ); ok PHP Code: ifte( type(expr2) <> DOM_SYMBOLIC , ( partn:=string(expr2) ), ( partn:=conv2RPN3(expr2) ) ); Original Code PHP Code: #pragma mode( separator(.,;) integer(h32) ) PHP Code: // convToRPN3(x^3); 2: A new IFT command is required, on a future firmware The field for the false condition, I put an empty string, but this is rubbish and when running in the history view it looks bad PHP Code: ifte( partJ > 1 , ( rpnStr:=rpnStr + " " ), "" ); -> PHP Code: ift( partJ > 1 , ( rpnStr:=rpnStr + " " ) ); 3: Now if the field of true or false have more than one statement the compiler generates an error, how to solve this?, I try to group sentences between [], but fails =( PHP Code: ifte( type(expr1) <> DOM_SYMBOLIC, [ rpnStr:=string(expr1), return(rpnStr) ], "" ); All of the above for the purpose of running a CAS program step by step, placing each instruction in the history view |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 2 Guest(s)