When I have one output, say for instance123.456 and I want to see only the whole figures.
In this case 123 how to code that?
I can only get 123. always with the decimal point, how to ommit the decimal point??
Regards
Herman
1: Since I see that you're new here, welcome to TI-Basic Developer, HermanD! I recommend that you check out the rules and Starter Kit, which serves as a "boot camp" to TI-Basic programming.
2: The ipart command should remove the decimal point.
Hello Myles,
Yes I am new, I have never used Basic coding before.
A week ago i discovered a ,for me interesting, Basic program for a Voyage 200.
I typed it on my TI-89 ti, but the screen is smaller then the 200 so lost info.
I stated fiddeling with the code until it fitted on the TI-89 screen.
But the output has always the decimal point behind it.
I used al the commands I could find "include ipart()" but the decimal point
never disapperead.
That's my problem.
regards
Herman
Battlesquid is the only one here (that I know of) who has a TI-89 Titanium, so he should be around to help you shortly. This is the page for the 68k ipart() command. Hopefully this helps, and if not,
Battlesquid may be able to help.
I have one too!
Try:
exact(int(123.456))
Z80 Assembly>English>TI-BASIC>Python>French>C>0
YAY!!! I'm not the only one who has a TI-89 Titanium!
*high fives Xeda
You could also try this code:
:string(iPart(123.456))->Str1
:dim(Str1)-1->A
:expr(left(Str1,A))
For this to work, your calculator must be in the mode FLOAT, found by pressing [MODE][DOWN][DOWN][RIGHT][E]
I rarely use it since I have an Nspire and I use it primarily for math. But for games, the TI-89t has a fantastic BASIC language.
Z80 Assembly>English>TI-BASIC>Python>French>C>0
Problem : Ommitting the decimal point, after one integer value, on the screen output.
I want on the outputscreen Hc=123 Hc is a value from a calculation.
I tried a lot off commands without succes.
Solution: Ipart() is advised by different people, but does not work.
Xeda Elnara advised: exact(int(123.456))->x this works it gives x=123
But do not make my second mistake to use it in a Disp command with &format(x)
If you use “Hc=” &format the decimal point is back. Gives output Hc=123.
You have to use “Hc=” &String(x) Gives output Hc=123 Yippee this works!!
Thanks Xeda you gave a short, and simple solution, to this problem without extra coding.
HermanD
My Dad has an 89 Titanuim… ;)