On the TI calculators, why are space and question mark included? Is it all for programming purposes, or do they serve some kind of purpose that I don't know about? Did they just want to have something for Alpha on most keys and they had a couple of extra keys?
I'd reply that space, exclamation mark, question mark and various other special characters are useful for displaying messages containing said characters. But I'm not sure I understand your questions correctly.
Lionel Debroux wrote:
I'd reply that space, exclamation mark, question mark and various other special characters are useful for displaying messages containing said characters. But I'm not sure I understand your questions correctly.

well the exclamation mark is used for factorials... the other ones I think are just useful for displaying text and stuff... They are just nice to have even tho they don't have a particular use... I mean, how lame would it be to try and display text and not have a space...
Almost the entire ASCII set of characters is included in the calculator; see http://tibasicdev.wikidot.com/83lgfont (this applies to the CSE, too, though it obviously has a different font). Some of these have tokens associated with them; see http://tibasicdev.wikidot.com/miscellaneous-tokens.
They're used in token names [χ²pdf(, for instance] and in TI's menus (The RESET ALL screen, as an example, uses the &/ampersand symbol).
The question mark and space are for some reason the only ones that you can access from the calculator's keyboard; you're correct in that they don't actually have a purpose for TI-BASIC programming other than insertion in strings.
It would be awesome if TI-BASIC had a ternary operator as a use for the ?. I wouldn't need a short-circuited one; just a regular ternary. Think of the possibilities:


Code:
Disp "You "+(W?"Win!":"Lose!")
Do you think TI will ever make it so that using Output can display more than one thing in one line without your program having to do calculations and stuff? An example would be for a factoring program, to display (1X+3)(1X+2) instead of (1 X+3 )(1 X+2 ) to make sure nothing is overwritten.
readroof2 wrote:
Do you think TI will ever make it so that using Output can display more than one thing in one line without your program having to do calculations and stuff? An example would be for a factoring program, to display (1X+3)(1X+2) instead of (1 X+3 )(1 X+2 ) to make sure nothing is overwritten.
You can use technique like number-to-string conversation and string concatenation to achieve this, or you can use simple logarithms to determine the length of a number.
How would I use the logarithms to find the length of the number? For example, if I did log(A) and A=54, how will a logarithm find the length once I get log(54) stored to Ans?
@readroof2 The number of digits in a positive integer A is equal to 1+int(log(A.
Oh. Cool. I never thought of that. I used to think I would just use about 10 If statements until I thought I had enough.
lirtosiast wrote:
@readroof2 The number of digits in a positive integer A is equal to 1+int(log(A.
And if you want the number of digits in a non-negative integer, I usually use 1+int(log(A+.1.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
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

 

Advertisement