| The United-TI Forum is Read-Only. | |
| Goto page Previous 1, 2, 3, 4, 5 Next |
| 20 Sep 2005 09:19:04 pm by Ductapemaster | ||
| Are you talking about having it scroll page by page or scroll like the menu( command? | ||
| 20 Sep 2005 09:39:33 pm by Ductapemaster | ||
| OK tried your code, but the pointer doesn't move, adn when I click [2nd] to view the definition, it just pauses the program on the menu! I looked over the code and I think I can figure how it works. I think the first problem lies in the text( command for the pointer. It reads text(A6+1,1,">. I don't quite see the A6+1 thing...it it A*6+1 or what? I see you're trying to change the line by the of pixels, but the calculation is off. Not to sure about the secdond problem though...Oh and what does the 1 stand for in the third line? Is it lbl 1? | ||
| 21 Sep 2005 01:39:34 am by Weregoose | ||||||
| Starting off, I can't say that I approve of the extensive use of [font="courier new"]Goto and [font="courier new"]Lbl. They make a terrible mess, and there's usually a cheaper method in terms of speed, size, and control. For the most part, conditionals and strategic loops will knock out the need for labels.
Especially, no circumstances should ever require a [font="courier new"]Goto jump from within any kind of loop or [font="courier new"]If-Then-Else-End statement. The reason? It causes rapid depletion of your calculator's memory. (Did I make that one sound scary enough?) Okay, this is the truth: [quote name='"http://www.cubedivision.org/forums/viewtopic.php?p=5776#5776"']For the record: That Goto is okay in this case, but the way it is situated inside an If-Then statement is generally bad practice. As each conditional nest is encountered, a byte is set in the calculator's RAM, waiting to be cleared. This can only happen when the interpreter detects an End. As 128 bytes are alotted to the internal memory for this and other similar purposes (and as using a Goto while on the inside of a conditional nest causes the End to be potentially unaccounted for), several bytes begin to stack up over time, and this can (and will) result in memory lag if you let it go for too long (ERR:MEMORY).[/quote] Moving on... * Supergoose reaches for his Pointy Stick of Optimization.™ Now, this won't hurt a bit. Just try to be still while I... *POKE* Put the following code somewhere at the top of your program: [font="courier new"]0→Xmin:1→ΔX 0→Ymin:1→ΔY It will serve a specific purpose later on. Turning off the grid and plots might be a good idea, too. In order to pause your program until a key is pressed, use the following: [font="courier new"]Repeat Ans getKey→K End You can adapt this to your program in this way: [font="courier new"]Repeat Ans=105 getKey→K End [font="courier new"]If K<105—the last key on the calculator, [ENTER], is represented as key 105 (being in the tenth column and fifth row). So, the argument you made here might as well be [font="courier new"]K≠105, right? Anything that [font="courier new"]K can represent in this scenario (with the exception of 105) will be unable to pass into the next few lines because of the [font="courier new"]Goto. In other words, anything that does get to reach the next few lines must be equal to 105. Knowing this, it seems almost trivial to write [font="courier new"]If K=105 shortly after that. On a further note, why do we need to know when to execute... um, [font="courier new"]Lbl A? Perhaps this was supposed to be an [font="courier new"]If-Then-End statement. Next, as opposed to storing a different value to [font="courier new"]C for each key, place this after the [font="courier new"]getKey loop: [font="courier new"]26-Ans+10fPart(.1Ans)-3int(.1Ans)+E2fpart(.01Ans→C If your definitions are short enough, you won't have to use the [font="courier new"]Then or [font="courier new"]End. [font="courier new"]If K=22 Then Goto Q End Why the [font="courier new"]Then … End here? (They aren't necessary.) Okay, about the [font="courier new"]Pxl-Off()'s... Normally, I'd suggest two [font="courier new"]For() loops, but since this is a simple rectangle, one [font="courier new"]For() loop will suffice. Now that we have our window variables in order: [font="courier new"]For(Z,80,82 Line(Z,1,Z,5,0 End OR Forget the window variables. Use this instead: [font="courier new"]Text(56,80,"░░░ That's three spaces. Programming is as much philosophy as it is mathematics. Finally... [font="courier new"]If K<106 Then Goto K2 End As [font="courier new"]K can never be more than 105, drop the entire statement and just hop back up to the desired label. Or, you could simply provide the [font="courier new"]Goto command back to where you left the [font="courier new"]If C<9 nest, after which [font="courier new"]Lbl K2 would be visited anyway, so you could leave out the [font="courier new"]Else in the aforementioned nest, and that would displace the aforementioned [font="courier new"]Goto to the bottom of said nest. Don't use [font="courier new"]Goto or [font="courier new"]Lbl. They make a mess. 8)
(I'd use [font="courier new"]6A+1, because I'm crazy like that.)
Anything else? [EDIT] If this thread doesn't have its own forum by the end of Friday, then I forfeit sandwiches for a week. :ninja: |
||||||
| 21 Sep 2005 11:51:39 am by necro | ||||
erp...my mistake...hehe, thats what I get for skimming... |
||||
| 21 Sep 2005 04:37:02 pm by alexrudd | ||||||
|
||||||
| 21 Sep 2005 05:01:12 pm by Weregoose | ||||
But, I guess that doesn't count. |
||||
| 22 Sep 2005 05:02:21 pm by necro | ||||
This SHOULD work, does on my calc...any ways, I'll upload a copy...well, any luck with this duct tape? Check attached file I guess: |
||||
| 22 Sep 2005 07:11:06 pm by One_Fast_Kid | ||||
Replace 0->K with DelVar K; when you delete are variable you essentally set it to 0.You don't need that extra '1' at the end, because when you store 1 into A, Ans takes the value of A. Every byte counts |
||||
| 22 Sep 2005 07:16:05 pm by Weregoose | ||
| This:
[font="courier new"]1:While Ans … End Is exactly this: [font="courier new"]Repeat 0 … End |
||
| 22 Sep 2005 07:22:14 pm by DarkerLine | ||
| Unless Ans changes inside the loop.
then it's like Repeat not(Ans .. End |
||
| 22 Sep 2005 07:52:11 pm by necro | ||
| if a key is used to quit or go back, then a false would return you home | ||
| 25 Sep 2005 12:44:40 pm by necro | ||
| Any progress DT? | ||
| 07 Oct 2005 04:11:40 am by thornahawk | ||
| Anyone interested in a nice compilation of geometry-related formulas should take a look at Introduction to Geometry by Coxeter. Either buy your own copy or look for it in a nearby library. :)
Barring that, this ought to be good enough... thornahawk |
||
| 23 Mar 2006 11:36:41 pm by programmer_to_be | ||||
Don't forget n-gon. You need n-gon in geometry. Just say the definition is however many sides you want. N stands for the number of sides. Ex: 22 sides, "22-gon" |
||||
| 24 Mar 2006 07:50:27 am by IAmACalculator | ||
| This program is pretty dead at the moment. The creator last posted on UTI on September 20th, and has not been seen since. | ||
| 24 Mar 2006 10:47:35 am by Brazucs | ||
| ...or even logged on since then. Unfortunately, I think he's coming back. | ||
| 24 Mar 2006 04:58:55 pm by IAmACalculator | ||
| Unfortunately you think he's coming back? Why? Do you mean unfortunately you think he's not coming back? | ||
| The United TI Forum is Read-Only. | |
| Goto page Previous 1, 2, 3, 4, 5 Next | |
[Switch to Desktop view]
© Copyright 2000-2013 Cemetech & Kerm Martian :: Mobile Design by Alex "comicIDIOT" Glanville
Problems? Issues? Or Suggestions? There's a thread for that!
© Copyright 2000-2013 Cemetech & Kerm Martian :: Mobile Design by Alex "comicIDIOT" Glanville
Problems? Issues? Or Suggestions? There's a thread for that!
