Author |
Message |
|
gorchy
Newbie

Joined: 30 May 2003 Posts: 19
|
Posted: 02 Jun 2003 01:12:48 am Post subject: |
|
|
does anyone know some tricks in basic ,maybe to decline the size of programs.
some examples:
-"Delvar ADelvar Str1..." you neednīt to use ":" between the Delvars
-use Text(-1,row,column,"your text to get bit letters in the graph screen |
|
Back to top |
|
|
NETWizz Byte by bit
Bandwidth Hog

Joined: 20 May 2003 Posts: 2369
|
Posted: 02 Jun 2003 02:38:53 am Post subject: |
|
|
Yeah
Leave off excess parenthesis, use smart coding techniques...
Instead of
If B=0
Then
A+1->A
End
Try:
A+1(B=0)->A
You see, B=0 is going to return either a 1 or a 0. If it returns a 1, B does equal 0, and anything you multiply it by will not be affected! |
|
Back to top |
|
|
anduril66 Anduril is the Flame of the West!
Member

Joined: 25 May 2003 Posts: 129
|
Posted: 02 Jun 2003 10:31:51 am Post subject: |
|
|
Quote: Try:
A+1(B=0)->A
A+not(B->A
If B=0, "not(B" will return a 1. "If B" will return a 1 as long as B does not equal zero. You don't need closing parentheses/quotes before a store symbol. |
|
Back to top |
|
|
yugniht
Member

Joined: 29 May 2003 Posts: 167
|
Posted: 02 Jun 2003 10:34:26 am Post subject: |
|
|
gorchy wrote: -"Delvar ADelvar Str1..." you neednīt to use ":" between the Delvars
I don't know if you knew this or not, but after any Delvar, you don't need a ":". It's not just between two Delvars.
Also, for what it's worth, in a getkey loop or something, you can use Text(-1,0,90," ") to get rid of the run indicator. I believe it's 90, but not positive.
Last edited by Guest on 02 Jun 2003 10:35:09 am; edited 1 time in total |
|
Back to top |
|
|
Arcane Wizard `semi-hippie`
Super Elite (Last Title)

Joined: 02 Jun 2003 Posts: 8993
|
Posted: 02 Jun 2003 10:53:44 am Post subject: |
|
|
Quote: Quote: -"Delvar ADelvar Str1..." you neednīt to use ":" between the Delvars
I don't know if you knew this or not, but after any Delvar, you don't need a ":". It's not just between two Delvars
Correct me if I'm wrong but he did say you don't need the ":" between delvar statements. See the "s" at the end of "delvars"? That means he's talking about multiple delvar statements, be it 2 or 256.
He also used "..." to indicate the line goes on.
Anyway, also note the Text(-1,Y,X,text doesn't work on the Ti83 and I wouldn't know of any other real tricks.
Last edited by Guest on 02 Jun 2003 10:57:47 am; edited 1 time in total |
|
Back to top |
|
|
yugniht
Member

Joined: 29 May 2003 Posts: 167
|
Posted: 02 Jun 2003 01:12:55 pm Post subject: |
|
|
yes, I saw that. What I was trying to say is that you could not only do Delvar Str1Delvar A but you could do Delvar Str1Output(1,1," "
I was trying to say that is doesn't have to be between TWO Delvars. Get it??? |
|
Back to top |
|
|
Arcane Wizard `semi-hippie`
Super Elite (Last Title)

Joined: 02 Jun 2003 Posts: 8993
|
Posted: 02 Jun 2003 01:56:52 pm Post subject: |
|
|
Ah, yes I get it now.  |
|
Back to top |
|
|
NETWizz Byte by bit
Bandwidth Hog

Joined: 20 May 2003 Posts: 2369
|
Posted: 02 Jun 2003 05:17:37 pm Post subject: |
|
|
Well
pause "TEXT HERE (pauses and displays text)
Text(-1,A,B,"TEXT displays large letters on the graph screen
OutPut(1,1," as the last line of a program prevents the Done from being displayed.
Str1->Y1 string to equation without useing Str>Equ(Str1,Y1
How to get a -> in a string:
type -> on the homescreen and press enter.
You will get err:Syntax, so select quit.
press y=
Press end recal
Now, use Equ>Str(Y1,Str1)
The -> will be in a string.
I am thinking about wrighting a tutorial.
Getkey stuff.
Getkey->K
-(K=24)+(K=26)->A
The above will return either a -1 or 1 depending if you press left or right. |
|
Back to top |
|
|
62 52 53 53 Formerly known as 62 52 53 53
Active Member

Joined: 30 May 2003 Posts: 607
|
Posted: 02 Jun 2003 07:11:56 pm Post subject: |
|
|
Pause (variable(s) or text) also allows you to scroll sideways. |
|
Back to top |
|
|
NETWizz Byte by bit
Bandwidth Hog

Joined: 20 May 2003 Posts: 2369
|
Posted: 03 Jun 2003 04:18:01 am Post subject: |
|
|
62_52_53_53 wrote: Pause (variable(s) or text) also allows you to scroll sideways.
What do you mean? |
|
Back to top |
|
|
Xan
Newbie

Joined: 30 May 2003 Posts: 19
|
Posted: 03 Jun 2003 06:40:44 am Post subject: |
|
|
He means, that you can scroll the text left and right to view a text, which is longer than 16 chars.
You can use the trick with -> to string also with ".
To store " in a string, you can also use ":Input Str1" in a program and then input " simply. |
|
Back to top |
|
|
NETWizz Byte by bit
Bandwidth Hog

Joined: 20 May 2003 Posts: 2369
|
Posted: 03 Jun 2003 02:32:33 pm Post subject: |
|
|
input by itself makes a crosshair on the graph screen.
Pressign enter sets Y and X to the value. |
|
Back to top |
|
|
yugniht
Member

Joined: 29 May 2003 Posts: 167
|
Posted: 03 Jun 2003 04:13:53 pm Post subject: |
|
|
I'll just copy and paste this from my site:
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
and
Have you ran out of variables to use for your program? Just go to the Finance menu, under the "Apps" button for the 83+, and press the right arrow button so that you are now on the variables menu. You can use just about any of these to store a number to.
I would just like to note that I have not come up with these and I think they came from Basic Guru. |
|
Back to top |
|
|
62 52 53 53 Formerly known as 62 52 53 53
Active Member

Joined: 30 May 2003 Posts: 607
|
Posted: 03 Jun 2003 08:04:48 pm Post subject: |
|
|
what do yoy mean "end recal"?
and the indicator off is 90. it works on all loops |
|
Back to top |
|
|
Adm.Wiggin aka Tianon
Know-It-All

Joined: 02 Jun 2003 Posts: 1874
|
Posted: 03 Jun 2003 08:16:02 pm Post subject: |
|
|
I think it is just a typo for 2nd recal, not end recal... ever one makes mistakes 
Last edited by Guest on 16 Sep 2003 04:19:45 pm; edited 1 time in total |
|
Back to top |
|
|
yugniht
Member

Joined: 29 May 2003 Posts: 167
|
Posted: 03 Jun 2003 08:24:39 pm Post subject: |
|
|
62_52_53_53 wrote: and the indicator off is 90. it works on all loops
Yes, I know It's just that whenever I use it, I use it in a getkey loop. |
|
Back to top |
|
|
Adm.Wiggin aka Tianon
Know-It-All

Joined: 02 Jun 2003 Posts: 1874
|
Posted: 03 Jun 2003 08:32:04 pm Post subject: |
|
|
also for optomization u should use this syntax for no run indic:
Text(-1,0,90," //notice the space here!
with no closing anything
(tested, and works!) |
|
Back to top |
|
|
yugniht
Member

Joined: 29 May 2003 Posts: 167
|
Posted: 03 Jun 2003 08:48:49 pm Post subject: |
|
|
*sigh* this is nothing new
I already know about the whole no ) and no " to close, but if I didn't put it there, someone would try it and put no space. |
|
Back to top |
|
|
Adm.Wiggin aka Tianon
Know-It-All

Joined: 02 Jun 2003 Posts: 1874
|
Posted: 03 Jun 2003 09:07:10 pm Post subject: |
|
|
it is really cool that we programmers can figure out all these special things! we must be like magic or something... lol jk! |
|
Back to top |
|
|
NETWizz Byte by bit
Bandwidth Hog

Joined: 20 May 2003 Posts: 2369
|
Posted: 04 Jun 2003 01:34:44 am Post subject: |
|
|
Even better is creating an asm program to turn off the indicator. I cannot remember how to do it, but it is a matter of changing a flag or a single bcall, so it is easy. |
|
Back to top |
|
|
|