Author |
Message |
|
Ductapemaster
Newbie

Joined: 12 Sep 2005 Posts: 41
|
Posted: 20 Sep 2005 08:58:46 pm Post subject: |
|
|
Thanks necro. I need some help designing the scrollable menu (I think thats what you are going for, right?) considering when this is finished, it will have like 80 definitions or more in it. I have just now discovered that TI GRAPH LINK software lets you type programs! MUCH easier than an emulator, bc you dont have to search for the right command, just type it! like if I wanted a getkey command, I just type getkey=X or whatever! I love it so much! Then I just save the program as 8xp and trasfer it using TI CONNECT! Also, I can then copy and paste code and text in or out of the program! Yippee, my dreams have been answered! Oh and the whole reason of the was to tell you why I'm typing in lowercase...
Oh, and what do you guys think about having our own subforum?
Last edited by Guest on 20 Sep 2005 08:59:44 pm; edited 1 time in total |
|
Back to top |
|
|
necro
Advanced Member

Joined: 09 Apr 2005 Posts: 278
|
Posted: 20 Sep 2005 09:16:43 pm Post subject: |
|
|
It probably should have its own sub forum...try my sample code there, making it "scroll" wouldn't be to hard (have each set of definitions each on its own subroutine and change subroutines (increment a variable and use "If b=1:prgmRTN1, if 2..." if you go off the page))
Last edited by Guest on 20 Sep 2005 09:17:42 pm; edited 1 time in total |
|
Back to top |
|
|
Ductapemaster
Newbie

Joined: 12 Sep 2005 Posts: 41
|
Posted: 20 Sep 2005 09:19:04 pm Post subject: |
|
|
Are you talking about having it scroll page by page or scroll like the menu( command? |
|
Back to top |
|
|
necro
Advanced Member

Joined: 09 Apr 2005 Posts: 278
|
Posted: 20 Sep 2005 09:21:53 pm Post subject: |
|
|
Ductapemaster wrote: Are you talking about having it scroll page by page or scroll like the menu( command?
[post="56485"]<{POST_SNAPBACK}>[/post]
each page has a menu like list of definitions...scrolling as in changing page
Example:
Page 1:
1.Angle
2.Angle Bisector
3.Angle, Acute
4.Angle, Obtuse
5.Angle, Right
6.ect
then you could scroll to the next page:
page 2:
1.line
2.line segment
3.linear regression
4.ect.
and then you could scroll to the next or previous...would be faster this way
Last edited by Guest on 20 Sep 2005 09:26:42 pm; edited 1 time in total |
|
Back to top |
|
|
Ductapemaster
Newbie

Joined: 12 Sep 2005 Posts: 41
|
Posted: 20 Sep 2005 09:39:33 pm Post subject: |
|
|
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? |
|
Back to top |
|
|
Weregoose Authentic INTJ
Super Elite (Last Title)

Joined: 25 Nov 2004 Posts: 3976
|
Posted: 21 Sep 2005 01:39:34 am Post subject: |
|
|
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)
Quote: I don't quite see the A6+1 thing...it it A*6+1 or what? [font="courier new"]A6+1 = A×6+1
(I'd use [font="courier new"]6A+1, because I'm crazy like that.)
Quote: what does the 1 stand for in the third line? The [font="courier new"]1 and [font="courier new"]While Ans imply an infinite loop, but he should have used [font="courier new"]Repeat 0. The same concept applies in his [font="courier new"]getKey loop. (See above for the most efficient alternative.)
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:
Last edited by Guest on 21 Sep 2005 06:49:05 am; edited 1 time in total |
|
Back to top |
|
|
necro
Advanced Member

Joined: 09 Apr 2005 Posts: 278
|
Posted: 21 Sep 2005 11:51:39 am Post subject: |
|
|
Ductapemaster wrote: Are you talking about having it scroll page by page or scroll like the menu( command?
[post="56485"]<{POST_SNAPBACK}>[/post]
erp...my mistake...hehe, thats what I get for skimming...
Last edited by Guest on 21 Sep 2005 06:51:04 pm; edited 1 time in total |
|
Back to top |
|
|
alexrudd pm me if you read this
Bandwidth Hog

Joined: 06 Oct 2004 Posts: 2335
|
Posted: 21 Sep 2005 04:37:02 pm Post subject: |
|
|
Supergoose wrote: the last key on the calculator, [ENTER], is represented as key 105 (being in the tenth column and fifth row). Please tell me that you just discovered that now, and not that I am the only idiot who never realized this for years. I feel stupid.
Ducttapemaster wrote: Oh, and what do you guys think about having our own subforum? Heh, why not? It's more active than most of the current subforums. |
|
Back to top |
|
|
Weregoose Authentic INTJ
Super Elite (Last Title)

Joined: 25 Nov 2004 Posts: 3976
|
Posted: 21 Sep 2005 05:01:12 pm Post subject: |
|
|
Quote: Please tell me that you just discovered that now, and not that I am the only idiot who never realized this for years. If it's any compensation, I still don't know anything about the STAT TESTS Menu.
But, I guess that doesn't count.  |
|
Back to top |
|
|
necro
Advanced Member

Joined: 09 Apr 2005 Posts: 278
|
Posted: 22 Sep 2005 05:02:21 pm Post subject: |
|
|
Code: Delvar K
1->A
While Ans "main loop
Text(0,6,"TERMS:
Text(7,6,"-PREVIOUS
Text(13,6,"1:ACUTE ANGLE
Text(19,6,"2:ACUTE TRIANGLE
Text(25,6,"3:ALTITUDE
Text(31,6,"4:AAA SIMILARITY
Text(37,6,"5:ANGLE BISECTOR
Text(43,6,"6:CENTRAL ANGLE
Text(49,6,"7:CENTROID
Text(55,6,"-NEXT
Text(A6+1,1,">
Getkey->K
A-(K=25)(A=/=1)+(K=32)(A=/=9->B
If B=/=A
Text(A6+1,0,"_
B->A
If K=21:Then
ClrDrw
If A=1:Then
"...definition...
End
If A=2:Then
"...definition...
End
If A=3:Then
"...definition...
End
Pause "keeps definition on screen
Clrdrw
End "end the displaying of the definition
End "end main loop
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:
Last edited by Guest on 25 Sep 2005 12:43:37 pm; edited 1 time in total |
|
Back to top |
|
|
One_Fast_Kid
Advanced Newbie

Joined: 18 Sep 2005 Posts: 63
|
Posted: 22 Sep 2005 07:11:06 pm Post subject: |
|
|
Code: 0->K
1->A
1
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 
Last edited by Guest on 22 Sep 2005 07:13:20 pm; edited 1 time in total |
|
Back to top |
|
|
Weregoose Authentic INTJ
Super Elite (Last Title)

Joined: 25 Nov 2004 Posts: 3976
|
Posted: 22 Sep 2005 07:16:05 pm Post subject: |
|
|
This:
[font="courier new"]1:While Ans
…
End
Is exactly this:
[font="courier new"]Repeat 0
…
End
Last edited by Guest on 22 Sep 2005 07:19:01 pm; edited 1 time in total |
|
Back to top |
|
|
DarkerLine ceci n'est pas une |
Super Elite (Last Title)

Joined: 04 Nov 2003 Posts: 8328
|
Posted: 22 Sep 2005 07:22:14 pm Post subject: |
|
|
Unless Ans changes inside the loop.
then it's like
Repeat not(Ans
..
End |
|
Back to top |
|
|
necro
Advanced Member

Joined: 09 Apr 2005 Posts: 278
|
Posted: 22 Sep 2005 07:52:11 pm Post subject: |
|
|
if a key is used to quit or go back, then a false would return you home |
|
Back to top |
|
|
necro
Advanced Member

Joined: 09 Apr 2005 Posts: 278
|
Posted: 25 Sep 2005 12:44:40 pm Post subject: |
|
|
Any progress DT? |
|
Back to top |
|
|
thornahawk μολών λαβέ
Active Member

Joined: 27 Mar 2005 Posts: 569
|
Posted: 07 Oct 2005 04:11:40 am Post subject: |
|
|
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
Last edited by Guest on 07 Oct 2005 04:12:13 am; edited 1 time in total |
|
Back to top |
|
|
programmer_to_be Jesus is my Lord and Saviour.
Elite

Joined: 07 Feb 2006 Posts: 755
|
Posted: 23 Mar 2006 11:36:41 pm Post subject: |
|
|
Quote: Weregoose, September 12, 2005
Line
Line Segment
Ray
Angle
Acute Angle
Obtuse Angle
1° Degree
Right Angle (90°)
Straight (180°)
Complete (360°)
Scalene Triangle
Right Triangle
Isosceles Triangle
Equilateral Triangle
Circle
Ellipse
Arc
Semicircle
Radius
Diameter
Square
Rhombus
Rectangle
Parallelogram
Trapezoid
Quadrilateral
Pentagon
Pentagram
Hexagon
Octagon
Triangular Pyramid
Square Pyramid
Rectangular Pyramid
Triangular Prism
Rectangular Prism
Cube
Cylinder
Cone
Sphere
Ellipsoid
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" |
|
Back to top |
|
|
IAmACalculator In a state of quasi-hiatus
Know-It-All

Joined: 21 Oct 2005 Posts: 1571
|
Posted: 24 Mar 2006 07:50:27 am Post subject: |
|
|
This program is pretty dead at the moment. The creator last posted on UTI on September 20th, and has not been seen since. |
|
Back to top |
|
|
Brazucs I have no idea what my avatar is.
Super Elite (Last Title)

Joined: 31 Mar 2004 Posts: 3349
|
Posted: 24 Mar 2006 10:47:35 am Post subject: |
|
|
...or even logged on since then. Unfortunately, I think he's coming back. |
|
Back to top |
|
|
IAmACalculator In a state of quasi-hiatus
Know-It-All

Joined: 21 Oct 2005 Posts: 1571
|
Posted: 24 Mar 2006 04:58:55 pm Post subject: |
|
|
Unfortunately you think he's coming back? Why? Do you mean unfortunately you think he's not coming back? |
|
Back to top |
|
|
|