Author |
Message |
|
omni
Member
Joined: 14 Jun 2003 Posts: 115
|
Posted: 10 Nov 2003 05:59:52 pm Post subject: |
|
|
Are you sure it was ClrDraw and not some other graph related function on the TI? Some of the drawing functions clears variable Y for some reason. |
|
Back to top |
|
|
DarkerLine ceci n'est pas une |
Super Elite (Last Title)
Joined: 04 Nov 2003 Posts: 8328
|
Posted: 10 Nov 2003 08:32:02 pm Post subject: |
|
|
I had no y= functions. I wanted to input a point (I didn't know to use Input with no arguments), and after ClrDraw, the cursor reset to 0,0. |
|
Back to top |
|
|
Toksyuryel Crimson Dragon Software
Elite
Joined: 14 Jun 2003 Posts: 880
|
Posted: 10 Nov 2003 09:21:07 pm Post subject: |
|
|
ClrDraw deletes the variables X and Y, and clears the graph screen of any pixels. It does not do anything to Y= equations. When X and Y don't exist, the calc automatically set's them to where ever the center of your graph screen happends to be (I think...), which in your case is probably (0,0). Hope this helps! |
|
Back to top |
|
|
DarkerLine ceci n'est pas une |
Super Elite (Last Title)
Joined: 04 Nov 2003 Posts: 8328
|
Posted: 11 Nov 2003 03:12:31 pm Post subject: |
|
|
It does, thank you.
I used this:
:" (16 spaces go here) "
:Text(-1,0,0,Ans
:Text(-1,8,0,Ans
...
:Text(-1,56,0,Ans
to clear the screen. It is not much slower, does not clear X and Y, and creates a cool looking effect.
Last edited by Guest on 11 Nov 2003 03:15:10 pm; edited 1 time in total |
|
Back to top |
|
|
Toksyuryel Crimson Dragon Software
Elite
Joined: 14 Jun 2003 Posts: 880
|
Posted: 14 Nov 2003 08:38:41 pm Post subject: |
|
|
ClrDraw takes up 1 byte. How many does your way take up? |
|
Back to top |
|
|
X1011 10100111001
Active Member
Joined: 14 Nov 2003 Posts: 657
|
Posted: 14 Nov 2003 10:19:14 pm Post subject: |
|
|
Quote: OutPut(1,1," as the last line of a program prevents the Done from being displayed.
any output( will do that
Quote: If you want to find out how many places are in a number, just use this line in your program: int(log(# or variable)+1). I'm not sure if this will work with decimals, though
it works, but it doesn't count any digits after the decimal
Quote: Example 4:
(B+C)/D
can be
D-1(B+C
and D-1(B+C can be D-(B+C
i think you mean D^-1 (inverse), in which case, you can't change it to D-(B+C
Quote: Example:
If 8>C
Output(1,1,”HI
If 8<C
Output(1,1,”BYE
can be
“BYE
If 8>C
Output(1,1,”HI
Output(1,1,Ans
1st of all, you don't need to put "BYE then use Ans, just put "BYE in the output, and 2nd, why would you want to make it say hi and bye?
Quote: -int(-number) is exactly the same as int(number)
actually, -int(-# is 1 higher
Quote: Example 1:
If X = 1 and Y: 1->C
can be
(X = 1)Y: 1->C
Example 2:
If X or Y = 5: 1->C
can be
X + (Y = 5: 1->C
those are the same, except yours are 1 byte larger
Quote: ClrDraw takes up 1 byte. How many does your way take up?
he could make it smaller by using a for loop |
|
Back to top |
|
|
Arcane Wizard `semi-hippie`
Super Elite (Last Title)
Joined: 02 Jun 2003 Posts: 8993
|
Posted: 15 Nov 2003 06:42:40 am Post subject: |
|
|
Quote: actually, -int(-# is 1 higher
IF # isn't an integer.
Quote: Quote: Example 1:
If X = 1 and Y: 1->C
can be
(X = 1)Y: 1->C
Example 2:
If X or Y = 5: 1->C
can be
X + (Y = 5: 1->C
those are the same, except yours are 1 byte larger
But it's faster.
Quote: Quote: ClrDraw takes up 1 byte. How many does your way take up?
he could make it smaller by using a for loop
But not smaller than 1 byte. |
|
Back to top |
|
|
DarkerLine ceci n'est pas une |
Super Elite (Last Title)
Joined: 04 Nov 2003 Posts: 8328
|
Posted: 15 Nov 2003 03:32:50 pm Post subject: |
|
|
The point is that ClrDraw doesn't look cool and erases X and Y. Since I wrote it in a separate program that also does AxesOff and all that stuff, all I need in each of my other programs is prgmtheta.
-int(-X does what ceiling(X) does on an 89. |
|
Back to top |
|
|
Jedd 1980 Pong World Champion
Elite
Joined: 18 Nov 2003 Posts: 823
|
Posted: 23 Nov 2003 09:36:00 pm Post subject: |
|
|
I'm going back to the origional purpose of this message board...tricks in basic. In almost all computer languages there is a way to type things that you can't see in the program and the program doesn't even try to run, but you can't do this in TI Basic. So what i've discovered is that you can write something in the beginning of your program like this:
If 1=2
This program uses the quadratic equation to solve for X....etc (or whatever you want to say)
Obviously, 1 never equals 2, so the program will never try to run the next line of code, and you can use that line of code to write something to others who might read you coding. |
|
Back to top |
|
|
Spyderbyte
Advanced Member
Joined: 29 May 2003 Posts: 372
|
Posted: 23 Nov 2003 09:48:42 pm Post subject: |
|
|
Or you could shorten it to If 0. Of course, if you're writing comments, you're obviously not too worried about space.
Spyderbyte |
|
Back to top |
|
|
Jedd 1980 Pong World Champion
Elite
Joined: 18 Nov 2003 Posts: 823
|
Posted: 23 Nov 2003 10:11:55 pm Post subject: |
|
|
Good point |
|
Back to top |
|
|
Arcane Wizard `semi-hippie`
Super Elite (Last Title)
Joined: 02 Jun 2003 Posts: 8993
|
Posted: 24 Nov 2003 07:17:35 am Post subject: |
|
|
How about this:
prgmCOMMENT
"THIS PROGRAM BELONGS TO:
"ME, SO DON'T MOD MY CODE!
"<MORE COMMENTS>
//game/program
Of course, this will mess with Ans, so if you are using Ans for subroutines or whatever:
prgmCOMMENT
Goto 1
"THIS PROGRAM BELONGS TO:
"ME, SO DON'T MOD MY CODE!
"<MORE COMMENTS>
Lbl 1
If Ans=1:Goto F1
If Ans=2:Goto F2
Goto 0
Lbl F1
Disp "FUNCTION 1
Return
Lbl 2
Disp "FUNCTION 2
Return
Lbl 0
//rest of game/program
Last edited by Guest on 25 Nov 2003 09:46:11 am; edited 1 time in total |
|
Back to top |
|
|
Jedd 1980 Pong World Champion
Elite
Joined: 18 Nov 2003 Posts: 823
|
Posted: 24 Nov 2003 10:30:35 am Post subject: |
|
|
That works too |
|
Back to top |
|
|
X1011 10100111001
Active Member
Joined: 14 Nov 2003 Posts: 657
|
Posted: 24 Nov 2003 03:11:58 pm Post subject: |
|
|
Arcane Wizard wrote: Of course, this will mess with Ans, so if you are using Ans for subroutines or whatever:
prgmCOMMENT
Goto 1
"THIS PROGRAM BELONGS TO:
"ME, SO DON'T MOD MY CODE!
"<MORE COMMENTS>
Lbl 1
Well if you don't want to mess with Ans you should just use spyderbyte's suggestion, or this:
Goto 1
//comments
Lbl 1
Last edited by Guest on 25 Nov 2003 09:45:59 am; 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: 24 Nov 2003 04:26:03 pm Post subject: |
|
|
I don't know if this is a trick good for anything, but if you have a large area of pixels turned on and do ClrDraw, random zigzags appear across the area for a short time. |
|
Back to top |
|
|
Arcane Wizard `semi-hippie`
Super Elite (Last Title)
Joined: 02 Jun 2003 Posts: 8993
|
Posted: 25 Nov 2003 09:44:42 am Post subject: |
|
|
X1011 wrote: Arcane Wizard wrote: Of course, this will mess with Ans, so if you are using Ans for subroutines or whatever:
prgmCOMMENT
Goto 1
"THIS PROGRAM BELONGS TO:
"ME, SO DON'T MOD MY CODE!
"<MORE COMMENTS>
Lbl 1
Well if you don't want to mess with Ans you should just use spyderbyte's suggestion, or this:
Goto 1
//comments
Lbl 1
That's exactly what I said.
Last edited by Guest on 25 Nov 2003 09:45:41 am; edited 1 time in total |
|
Back to top |
|
|
X1011 10100111001
Active Member
Joined: 14 Nov 2003 Posts: 657
|
Posted: 25 Nov 2003 07:25:31 pm Post subject: |
|
|
Arcane Wizard wrote: X1011 wrote: Arcane Wizard wrote: Of course, this will mess with Ans, so if you are using Ans for subroutines or whatever:
prgmCOMMENT
Goto 1
"THIS PROGRAM BELONGS TO:
"ME, SO DON'T MOD MY CODE!
"<MORE COMMENTS>
Lbl 1
Well if you don't want to mess with Ans you should just use spyderbyte's suggestion, or this:
Goto 1
//comments
Lbl 1
That's exactly what I said.
No, you had:
If Ans:Goto 1
//comments
Lbl 1 |
|
Back to top |
|
|
Spyderbyte
Advanced Member
Joined: 29 May 2003 Posts: 372
|
Posted: 26 Nov 2003 12:33:30 am Post subject: |
|
|
Arcane Wizard wrote: Goto 1
"THIS PROGRAM BELONGS TO:
"ME, SO DON'T MOD MY CODE!
"<MORE COMMENTS>
Lbl 1
Eh I don't see the If ans
Spyderbyte |
|
Back to top |
|
|
Arcane Wizard `semi-hippie`
Super Elite (Last Title)
Joined: 02 Jun 2003 Posts: 8993
|
Posted: 26 Nov 2003 11:14:24 am Post subject: |
|
|
hehe J/K,
Doesn't matter though. |
|
Back to top |
|
|
Adm.Wiggin aka Tianon
Know-It-All
Joined: 02 Jun 2003 Posts: 1874
|
Posted: 26 Nov 2003 12:11:18 pm Post subject: |
|
|
and, if you do that, you can save a few bytes and leave out the " |
|
Back to top |
|
|
|