http://calcg.org/newlogo2.png Not Logged in.
Login | Register

General Discussion Board \ Calculator Programming \ another question from that stupid kid who keeps aking all those questions.

Click here to log in (you must be logged in to post comments).

AuthorComment
bjcrunner
Marine
Posted: 31 Jan 2008
17:40 GMT
Total Posts: 27
im just JUST getting into programming and did this quirky tutorial.
http://tifreakware.net/tutorials/multi/bphg.htm

is this program flawed or is it just me?
the part under Seattle under where it says "if t=3, goto yw" is totally skipped and it goes straight to the YOU WIN!

also when i press on at the you win, it says ERROR:BREAK and goes to the end of the second to last line.

please tell me if i made an error or its a bad tutorial.
Xphoenix
Ultralisk
avatar
Posted: 31 Jan 2008
17:52 GMT
Total Posts: 210
[ON] breaks the program to stop by default. There's no way to prevent it besides through asm. (ON is the only way to stop a BASIC program in some situations, implemented so that no one crashes their calculator or something through BASIC)

As for the tutorial, I haven't looked at the program, but most of it seems to be unoptimized and sloppy code. You're better off learning TI-BASIC at a better site, such as the TI-Basic Developer.

And about the title of this thread, remember that everyone had to start somewhere, so don't feel too bad if it seems hard, it'll get easier.

---
~Xphoenix
bjcrunner
Marine
Posted: 1 Feb 2008
11:31 GMT
Total Posts: 27
thx. really appreciate the help you guys are giving me. i think im close, after nearly 3 weeks, to making mario show up on mirage, but no success yet.
bjcrunner
Marine
Posted: 2 Feb 2008
09:46 GMT
Total Posts: 27
another question if you see this. how do you put a picture (for example a title screen) into a program. i made one on a sketchpad program i found and would like tp paste it into a program. i think i saved it as pic 1. is there a command for that?
john777
Ultralisk
avatar
Posted: 2 Feb 2008
09:50 GMT
Total Posts: 289
Hey I don't know if any one has told you this yet, I kind of looked and it didn't look like anyone had. But make sure that you are sending the .8xp files not the .83p files of mario to the calculator. It should work with those. Also I remember back a while ago there was some news about the nagel files not working, or being incompatable, and there was a link to download a fixed version. I coulden't find the topic again but if you're interested just send me a PM with you email and I will sen it to you.

Hmm... maybe I will upload that, the author of the nagel files was Bill Nagel right?
bjcrunner
Marine
Posted: 2 Feb 2008
12:19 GMT
Total Posts: 27
i understand what you're saying john. i have been putting the .8xp files on my ti84+se. I think i've seen the nagel thread. the problem isn't that u can't get the nagel files to work (i actually haven;t even loaded them), its that i can't get mario to appear in mirage. its a very strange problem. if you have any ideas, see my other thread- ti84 se help withe shells. thanks.
Vectris
Ultralisk
avatar
Posted: 2 Feb 2008
14:20 GMT
Total Posts: 375
actually the nagel file thing gave me an idea. i think im wrong but you might have to have at least one mario level set for mario to start, idk try loading on onto it (or making one, have you at least gotten the editor to work?)

and about the title screen yes, its really simple to make a "splash screen" or a title picture. In your basic program just put the following commands.

(ignore the __ i couldn't get spaces to work)

:AxesOff______________Turns of the x and y axis
:ClrDraw______________Clears the screen
:RecallPic X__________Displays picture were x=picture number

only the third command is necessary but the 1st 2 are also important so that your title screen is clear.

bjcrunner
Marine
Posted: 3 Feb 2008
08:06 GMT
Total Posts: 27
sweet thanks. ill try the mario thing.
I'm starting to get into some low level basic programming and am starting this program where i can plug in my homework assignments in a form like manner. however, i have some problems.
I'd like top prompt the user to enter the numbers to the assigned questions for the homework but these numbers are often mixed up like- 26-34,39,40. i'd like to prompt the user to enter those numbers and then store them so i can edit them later. but if i use the - symbol it will subtract them. any ideas?
john777
Ultralisk
avatar
Posted: 3 Feb 2008
09:43 GMT
Total Posts: 289
Try using a string, go into vars and down to 7. That lets you enter a line of text or numbers if you put it in parenthes. I'm not sure about editing it though.
Vectris
Ultralisk
avatar
Posted: 3 Feb 2008
14:15 GMT
Total Posts: 375
I wouldn't use prompt (well for personal use it's different). Using Input is a lot easier as you can display the question to. Prompt just displays ?= or something like that. Use Input like this.

:Input "Numbers:",Str1______w/e is in quotes is displayed and then once you type stuff in and hit enter, it stores it to string 1.

Use strings because strings can store text, variables (A-Z) cannot. Now you are just using numbers like page numbers, but if you ever wanted text it would be easier to make it with strings ahead of time.
bjcrunner
Marine
Posted: 5 Feb 2008
13:07 GMT
Total Posts: 27
thanks a ton. i thought it would be something along those lines. what if you wind up needing to store more than 10 strings?
Xphoenix
Ultralisk
avatar
Posted: 5 Feb 2008
15:57 GMT
Total Posts: 210
Then you're out of luck.

You know, haveacalc keeps proving me wrong. There must be some conspiracy . . . =P


Edit by haveacalc: Nonsense! ;)

---
~Xphoenix
haveacalc
Guardian
avatar
Posted: 5 Feb 2008
19:18 GMT
Total Posts: 1111
Wrong... You just start storing to expressions instead. Use the String>Equ( and Equ>String( functions from the catalog. To store Str1 to Y1, do this:

:String>Equ(Str1,Y1)

And, presumably, you can use Equ>String( to get it back. One thing to note is that expressions, unlike strings, evaluate their contents. For example, if X=5, Str1="4X2-7X", and you run the line of code shown above, consider these following lines:

:Disp Str1

:Disp Y1

The first of those two lines would display "4X2-7X", while the second would display 65. Because of this, expressions are most practically used for storage, among all things. Here are some expressions, from what I can remember off the top of my head:Y1, Y2, Y3, Y4, Y5, Y6, Y7, Y8, Y9, Y0, Y1T, Y2T, Y3T, Y4T, Y5T, Y6T, X1T, X2T, X3T, X4T, X5T, X6T, r1, r2, r3, r4, r5, r6, u, v, and w.

If you somehow need more expressions (that can't be switched around with strings), try lists.

---
-quoted directly from most movies that don't exist (and some that do).
Vectris
Ultralisk
avatar
Posted: 5 Feb 2008
20:02 GMT
Total Posts: 375
actually i've worked on a program that transfers strings to lists and vice versa, nvr really finished though. You never really need more than ten strings (if you know how to do it right =)
haveacalc
Guardian
avatar
Posted: 5 Feb 2008
20:56 GMT
Total Posts: 1111
A multitude of strings can be useful when dealing with large chunks of memory that would cause memory errors if stored to a smaller number of strings.

---
-quoted directly from most movies that don't exist (and some that do).
john777
Ultralisk
avatar
Posted: 6 Feb 2008
09:21 GMT
Total Posts: 289
I found the nagel file it ws in the FAQ. FAQ 77 I knew it was somewhere.
bjcrunner
Marine
Posted: 9 Feb 2008
20:29 GMT
Total Posts: 27
i'm writing a program that uses a form-like set up to plug in information about my homework, for example the page number, etc., and then display them somewhere else. since i have 7 subjects and each and there are 2 things that need to be stored and then displayed again somewhere else, i'm going to need to more than 10 strings. i'm still trying to comprehend haveacalc's post. i'll get it eventually.

a few questions for haveacalc:
1. so if Str1=3 and i store Str1 into an expression, i can store something else into Str1 and still have 3 stored into an expression?
2. something i need to store in this specific program is a range of page numbers (ex. 235-237). since i do not want to subtract 237 from 235 do i have to leave these as strings and not use them in an expression? is there another way to store this without evaluating it?
haveacalc
Guardian
avatar
Posted: 10 Feb 2008
14:39 GMT
Total Posts: 1111
What a compliment.

1. It depends on how you do it.
"Str1→w
You probably know that the value outputted from w will change with the contents of Str1 from that line of code.
String>Equ(Str1,w
Here, w is independent.
2. Try using lists (known as arrays in most programming languages. A list is an ordered collection of number variables with properties almost identical to the ones that are individually addressed (mainly A-Z and θ). Each number variable in the list is called an element. The syntax for storing a list with the numbers 2, 7, and 586.9 to L1 (press [2nd], [1] on the keypad) is as follows:
{2,7,586.9→L1
To access the 3rd element of that list do this:
L1(3
There's a lot more to know about lists, but it's all in the manual.To generate a predictable list of numbers, use seq(:
seq(A,A,235,237→L1


---
-quoted directly from most movies that don't exist (and some that do).
Vectris
Ultralisk
avatar
Posted: 12 Feb 2008
13:41 GMT
Total Posts: 375
wow, haveacalc u lost me
how do you store Str1 to w???
also if w changes when Str1 changes, w is dependent and Str1 is independent

and how do the Equ things work?

anyways ya bj if your just using numbers you don't need to use strings, just use lists





Portal | My Account | Register | Lost Password or Username | TOS | Disclaimer | Help | Site Search | File Archives Copyright © 2002-2019 CalcG.org