| Author |
Message |
Vispo
Joined: 27 Apr 2007 Posts: 1
|
Posted: April 27, 2007 3:03 AM Post subject: 2 Problems Home Disp, and Newline |
|
|
Hello,
im writting some programms that will help me solve some Mathematical problems.
But i have 2 major problems.
1.)
If i display my results they are printed on the IO display.
How can i switch to the Home display?
2.)
i have a long string for the result, and wanna add some Newlines into the String variables what is the newline constant?
does it exist?
Thx for your help
Vispo |
|
| Back to top |
|
 |
mellamokb
Joined: 10 May 2007 Posts: 100
|
Posted: May 17, 2007 3:40 PM Post subject: |
|
|
Hi Vispo,
If your mathematical calculation spits out only one number, you can use a function instead of a program and run in from the home screen--your answer will also be displayed on the home screen. For example, a function that calculates the volume of a cube given side length:
** on the home screen
| Code: |
Define cubevol(s) = s^3
cubevol(4)
|
You would get the result (64) on the home screen. If you want multiple results return a list instead of a single value.
AFAIK, there is no such thing as a newline on TI-89 strings. You can however use your cursor to scroll the text and read the whole string on the home screen. If you are printing the screen to the IO or graph, use multiple lines of code to print pieces of the string to "simulate" using newlines:
| Code: |
Disp "This is my really long "
Disp "message that cannot "
Disp "fit in one line of the "
Disp "I/O screen so I have used "
Disp "multiple calls to the DISP "
Disp "command."
|
If you need to break up the long string into pieces before displaying, look into the "left(", "mid(", and "right(" commands for manipulating strings.
Hope this helps!
~ mellamokb |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|
Saphic 1.5 // Theme created by Sopel
|
|