I'm going to learn how to code, so if I have questions, I will ask you guys.
Welcome to Cemetech, JmANS2199. Do post your TI-BASIC programming questions here, wrapped in [code] tags when necessary, and we will be more than happy to answer. Also feel free to Introduce Yourself in the topic we have for the purpose. Finally, at Cemetech we value intelligence and clarity, so please make an effort to use proper spelling and punctuation. Good to have you with us!
Can Disp be used to display text in a specific location?
JmAN52199 wrote:
can disp be used to display text in a specific location?
Disp will displaying on the next line. If you're on the homescreen, use Output to display at a specific location:

Output(row,column,"TEXT") or Output(row,column,number)

Row can be 1-8 on monochrome calculators, or 1-10 on the TI-84+CSE. Column can be 1-16 on monochrome calculators, or 1-26 on the TI-84+CSE/
so im trying to write a basic program just to try and get used to basic so how would I make the starting text be in a graph
JmAN52199 wrote:
so im trying to write a basic program just to try and get used to basic so how would I make the starting text be in a graph
I'm not sure what you mean by "starting text", but the Text() command will put text on the graphscreen. The syntax is Text(row,column,text) for small, variable-width text, or Text(-1,row,column,text) for larger (homesceen-sized) text.
do I use " to start the text?
JmAN52199 wrote:
do I use " to start the text?
In TI-BASIC, you put quote marks (") around strings, so "TEXT" would be a string, as would "THIS IS A SENTENCE.". If you omit the quotes, the calculator assumes you're giving it a numerical expression, like 3+2 or 3X+2Y^2-1. It will try to simplify the numerical expression into a number, list, matrix, or similar data type.
how do I make text disappear from the graph after they press enter?
JmAN52199 wrote:
how do I make text disappear from the graph after they press enter?
You can clear the graphscreen using the ClrDraw command. In my book about calculator programming, I recommend starting and ending your program like this if you're using the graphscreen:
Code:
:StoreGDB 0
:FnOff :AxesOff:GridOff
:PlotsOff :ClrDraw
:...your program goes here...
:RecallGDB 0
I took the long way but I still got done what I wanted
is there a way to setup a gaol like you walk from one side of the screen to the other and advance to the next level?
JmAN52199 wrote:
is there a way to setup a gaol like you walk from one side of the screen to the other and advance to the next level?
Please do not double-post (reply to yourself) if it has been fewer than 24 hours since your previous post. Instead, hit the Edit button on your old post. A double-post after 24 hours is called a bump, and is an acceptable way of reminding people that you have an unanswered question in your topic.

What you're asking is more of a high-level game design question. I recommend looking at Chapter 5 of this book for where I've already written out a full explanation of how you should plan game structure. The short answer is that you'll need an inner loop where you allow the user to move the player, using While/Repeat, Text(, and getKey, and an outer loop that checks if the player has reached the goal yet.
... is there a way to make like a survey and the calculator would store the answers so that someone could look at the answers?
I am assuming ti-basic, here is a quick example:

Code:

prgmMAIN
:0►N
:ClrHome
:Disp "Weclome to the Exam!
:10►dim(ʟ1    ;10 is just an example number of questions
:;question 1
:"Is red a color?►str1    ;str1 will be the question
:"Yes►str2    ;str2-str9 will be possible answer strings to choose from
:"No►str3
:2►A
;A is the number of answers that the sub program will display,
:prgmQUESTN
:;Question 2
:"What is your favorite color?►str1
:"Black►str2
:"Blue►str3
:"Green►str4
:"Purple►str5
:"Red►str6
:5►A    ;5 possible choices
:prgmQUESTN
;etc blah blah questions go below

SubProgram:

Code:

prgmQUESTN
:N+1 ► N    ;this adds one to the question number
:0 ► C   ;Set the choice to 0, the user hasn't picked yet
:repeat C ≤ A and C > 0  ;The choice has to be in the bounds
:ClrHome
:Disp str1, "1: "+str2, "2: "+str3    ;we will always display these 3, the question and at least 2 answers
:If A > 2: Disp "3: "+str4
:If A > 3: Disp "4: "+str5
:If A > 4: Disp "5: "+str6
:If A > 5: Disp "6: "+str7
;Up to 6 answer choices
:input "Choice: ",C    ;The user chooses from the possible numbers
:end
;okay the user choice is now stored in C
;we need to store it to your list, so later on you can recall what answer they chose
:C ► ʟ1(N     ;Where N is the question number

If you have any questions about the above example, feel free to ask. Also there are other ways to do this, this is just an easy example that I think you can understand.
so thanks you guys for helping me out but I have another question how do would you display the time in a program... I know to do gettime but how do I display it in a program... the time doesn't have to auto-change if you understand what I'm saying
When you use getTime, the result you get is in form of a list. If you don't want to get the values from that list, you can get a string of the time instead by using getTmStr(getTmFmt. You can display that using Disp or Output or whatever.
hey so thanks for the time help I got it to work with disp but for some reason it wouldn't work on output( any thoughts?
Could you post the code you've tried with Output( so we can see what's failed with what you've done? Smile
It's hard for us to know what went wrong if we don't know in what way it didn't work. Did it display an error message (and in that case, which one)? Did it simply not display anything?
  
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 2
» 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