Post Reply 
Help with a program
06-24-2021, 10:56 PM (This post was last modified: 06-24-2021 10:58 PM by matalog.)
Post: #1
Help with a program
I have been trying to make a program to leave the leading zeroes on a number, just to get a quick look at them, and experiment with the calculator.

I have got this far, and it seems that at the first reference to Ans() is being taken from Home mode, not CAS, and the second use of Ans() is being taken from CAS. So, if the number in history in home screen, and CAS are of the same order, then it actually works fine.

Can anyone offer any guidance as to how I can get it to correctly use the number in the CAS history, to set the length

Code:
EXPORT CDEC()
BEGIN
LOCAL f:=STRING(Ans(1));
LOCAL g:="";
LOCAL h:="";
LOCAL i:=0;
g:=RIGHT(f,2);
i:=EXPR(g);
i:=i+2;
h:="f"+STRING(i);
MSGBOX(format(Ans(1),h));
END;
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Help with a program - matalog - 06-24-2021 10:56 PM
RE: Help with a program - cext104 - 09-26-2021, 09:25 PM
RE: Help with a program - pinkman - 09-27-2021, 03:53 PM
RE: Help with a program - Albert Chan - 09-27-2021, 05:24 PM



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