TI-89 HomeGames ArchiveTitanium GamesGames How ToProgramsFAQForumTI-89 WikiLinks

2 Problems Home Disp, and Newline

 
Post new topic   Reply to topic    Your TI-89 Resource Forum Index -> BASIC Programming
Author Message
Vispo



Joined: 27 Apr 2007
Posts: 1

PostPosted: April 27, 2007 3:03 AM    Post subject: 2 Problems Home Disp, and Newline Reply with quote

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
View user's profile Send private message
mellamokb



Joined: 10 May 2007
Posts: 100

PostPosted: May 17, 2007 3:40 PM    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:    View previous topic : View next topic  
Post new topic   Reply to topic    Your TI-89 Resource Forum Index -> BASIC Programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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

Contact Us | Privacy Policy | Disclaimer | Trademarks

Copyright ©2006 All rights reserved.


Free Greeting Cards | Girly Myspace Layouts | Myspace Unblocker |