This is an archived, read-only copy of the United-TI subforum , including posts and topic from May 2003 to April 2012. If you would like to discuss any of the topics in this forum, you can visit Cemetech's TI-BASIC subforum. Some of these topics may also be directly-linked to active Cemetech topics. If you are a Cemetech member with a linked United-TI account, you can link United-TI topics here with your current Cemetech topics.

This forum is locked: you cannot post, reply to, or edit topics. TI-Basic => TI-BASIC
United-TI Archives -> TI-Basic
 
    » Goto page Previous  1, 2, 3 ... 25, 26, 27 ... 29, 30, 31  Next
» View previous topic :: View next topic  
Author Message
TheStorm


Calc Guru


Joined: 17 Apr 2007
Posts: 1233

Posted: 02 Jun 2007 10:18:53 am    Post subject:

True, but that only works if they're the same dim to start with. Nvm this is wrong.

Last edited by Guest on 02 Jun 2007 10:55:00 am; edited 1 time in total
Back to top
Harrierfalcon
The Raptor of Calcs


Super Elite (Last Title)


Joined: 25 Oct 2006
Posts: 2535

Posted: 02 Jun 2007 10:38:10 am    Post subject:

No...[font="courier new;font-size:9pt;line-height:100%;color:darkblue"]L1→L2 stores L1 into L2, giving them the same dimensions.
Back to top
Harrierfalcon
The Raptor of Calcs


Super Elite (Last Title)


Joined: 25 Oct 2006
Posts: 2535

Posted: 08 Jun 2007 11:53:59 am    Post subject:

Anyways...everyone knows that[font="courier new;font-size:9pt;line-height:100%;color:darkblue"]

:Repeat K=105 or K=21

Can be replaced with[font="courier new;font-size:9pt;line-height:100%;color:darkblue"]

:Repeat 42=abs(K-63

To save a byte. But what about:[font="courier new;font-size:9pt;line-height:100%;color:darkblue"]

:Repeat K=45 or K=21

This is simple. Use this program:[font="courier new;font-size:9pt;line-height:100%;color:darkblue"]

PROGRAM:KEYPRSS
:Input "Key 1:",A
:Input "Key 2:",B
:.5abs(A-B
:Disp {Ans,max(A,B)-Ans

This will return the 2 relevant numbers needed to convert 2 key booleans into one. For example, enter 45 for Key 1 and 21 for Key 2. It will show [font="courier new;font-size:9pt;line-height:100%;color:darkblue"]{12,33}. This means that you can convert this:[font="courier new;font-size:9pt;line-height:100%;color:darkblue"]

:Repeat K=45 or K=21

Into this:[font="courier new;font-size:9pt;line-height:100%;color:darkblue"]

:Repeat 12=abs(K-33



Last edited by Guest on 08 Jun 2007 02:42:01 pm; edited 1 time in total
Back to top
spandiv
-- Retired --


Active Member


Joined: 25 May 2003
Posts: 650

Posted: 08 Jun 2007 02:34:22 pm    Post subject:

I'm not sure if you tried your "everyone knows" example, Harrier, but it doesn't work. [font="courier new;font-size:9pt;line-height:100%;color:darkblue"]42=abs(12-63 is not true. What you forgot to mention is that it only works with two even or odd numbers, not one of each.

Last edited by Guest on 08 Jun 2007 02:34:52 pm; edited 1 time in total
Back to top
Harrierfalcon
The Raptor of Calcs


Super Elite (Last Title)


Joined: 25 Oct 2006
Posts: 2535

Posted: 08 Jun 2007 02:41:42 pm    Post subject:

It was supposed to be 21...:blush:

Last edited by Guest on 08 Jun 2007 02:41:49 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: 08 Jun 2007 03:02:53 pm    Post subject:

Of course, for three or more keys, you'd use [font="courier new;font-size:9pt;line-height:100%;color:darkblue"]max(K={21,45,105 instead.

You could also factor 105 as 5*21, and use that to give you [font="courier new;font-size:9pt;line-height:100%;color:darkblue"]Repeat Knot(fPart(K/21. However, this will react not only to the [2nd] and [ENTER] keys but also to [APPS] [(] and [6]. Usually this won't matter. Also, there's no good way to generalize this to arbitrary keys.

Last edited by Guest on 19 Jan 2008 12:03:08 pm; edited 1 time in total
Back to top
vuurrobin


Advanced Member


Joined: 09 Aug 2006
Posts: 428

Posted: 08 Jun 2007 03:07:03 pm    Post subject:

it does work with an even and an odd number ([font="courier new;font-size:9pt;line-height:100%;color:darkblue"]ans=24 or ans=25 becomes [font="courier new;font-size:9pt;line-height:100%;color:darkblue"].5=abs(ans-24.5 ). It would be bigger tho, not sure about speed.
Back to top
DarkerLine
ceci n'est pas une |


Super Elite (Last Title)


Joined: 04 Nov 2003
Posts: 8328

Posted: 08 Jun 2007 03:15:32 pm    Post subject:

Most likely slower as well, although I'm not positive. Usually, however, these checks take so little time that it is space that is the priority.
Back to top
calc84maniac


Elite


Joined: 22 Jan 2007
Posts: 770

Posted: 08 Jun 2007 04:35:26 pm    Post subject:

Actually, I would use [font="courier new;font-size:9pt;line-height:100%;color:darkblue"]K=45 or 42=abs(K-63 rather than [font="courier new;font-size:9pt;line-height:100%;color:darkblue"]max(K={21,45,105. They are the same size, but I hear [font="courier new;font-size:9pt;line-height:100%;color:darkblue"]max( is slower
Back to top
DarkerLine
ceci n'est pas une |


Super Elite (Last Title)


Joined: 04 Nov 2003
Posts: 8328

Posted: 08 Jun 2007 05:43:07 pm    Post subject:

It is, by about 25%. Not really significant, but since there's no size difference I'd still go with the faster one.
Back to top
Recursive Acronym


Advanced Member


Joined: 11 Dec 2006
Posts: 499

Posted: 08 Jun 2007 07:35:58 pm    Post subject:

The point is that since it is waiting for the user anyway, it doens't matter whether the checking code runs shorter or faster.
Back to top
DarkerLine
ceci n'est pas une |


Super Elite (Last Title)


Joined: 04 Nov 2003
Posts: 8328

Posted: 08 Jun 2007 07:48:03 pm    Post subject:

Not necessarily. You may be, for example, drawing some sort of animation while waiting for the user. In that case, speed would be of the utmost importance for the animation not to appear laggy.
Back to top
Harrierfalcon
The Raptor of Calcs


Super Elite (Last Title)


Joined: 25 Oct 2006
Posts: 2535

Posted: 08 Jun 2007 07:48:38 pm    Post subject:

Such as a flashing cursor? Razz
Back to top
DarkerLine
ceci n'est pas une |


Super Elite (Last Title)


Joined: 04 Nov 2003
Posts: 8328

Posted: 08 Jun 2007 08:13:21 pm    Post subject:

That would be an example, although most flashing cursors would probably not take much time to draw, and would in fact need to be themselves delayed to keep them from flashing too rapidly.

Speaking of cursors, I'm trying to think of several characters, that when you OR them together (by storing the screen, drawing one, then recalling the screen, and repeating this for the rest) give you a homescreen-type cursor. The best I've gotten is "VMX*0" but I'm trying to do it in less characters. This is faster than using Line( to accomplish the same effect (I think).


Last edited by Guest on 08 Jun 2007 08:14:59 pm; edited 1 time in total
Back to top
Harrierfalcon
The Raptor of Calcs


Super Elite (Last Title)


Joined: 25 Oct 2006
Posts: 2535

Posted: 08 Jun 2007 08:16:21 pm    Post subject:

Use the inverted equals sign and an equals sign. I would give you the program I use, but I'm optimized it a tad and I don't feel like doing something illegal.
Back to top
DarkerLine
ceci n'est pas une |


Super Elite (Last Title)


Joined: 04 Nov 2003
Posts: 8328

Posted: 08 Jun 2007 08:20:53 pm    Post subject:

Well, there's the tiny problem with that that the inverted equals sign isn't accessible in Basic. If it were, then presumably the symbol for the cursor would be as well and I could just use that. But, no luck.
And of course using an assembly program would defeat the purpose.
Back to top
Super Speler
Super Awesome Dude


Calc Guru


Joined: 28 Nov 2005
Posts: 1391

Posted: 08 Jun 2007 08:23:50 pm    Post subject:

Yes it is: http://www.ticalc.org/archives/files/fileinfo/399/39929.html

EDIT: I keep forgeting to add a string with '->' to that... I guess I'll do it now.


Last edited by Guest on 08 Jun 2007 08:27:19 pm; edited 1 time in total
Back to top
Xphoenix


Elite


Joined: 04 Apr 2007
Posts: 756

Posted: 08 Jun 2007 08:53:34 pm    Post subject:

DarkerLine wrote:
Speaking of cursors, I'm trying to think of several characters, that when you OR them together (by storing the screen, drawing one, then recalling the screen, and repeating this for the rest) give you a homescreen-type cursor. The best I've gotten is "VMX*0" but I'm trying to do it in less characters. This is faster than using Line( to accomplish the same effect (I think).
[post="107190"]<{POST_SNAPBACK}>[/post]


You mean 3x5, not homescreen size? How about "OHI"?
Back to top
Harrierfalcon
The Raptor of Calcs


Super Elite (Last Title)


Joined: 25 Oct 2006
Posts: 2535

Posted: 08 Jun 2007 08:59:09 pm    Post subject:

Notice he said:
DarkerLine wrote:
using Line( to accomplish the same effect
Back to top
DarkerLine
ceci n'est pas une |


Super Elite (Last Title)


Joined: 04 Nov 2003
Posts: 8328

Posted: 08 Jun 2007 11:16:16 pm    Post subject:

Xphoenix wrote:
DarkerLine wrote:
Speaking of cursors, I'm trying to think of several characters, that when you OR them together (by storing the screen, drawing one, then recalling the screen, and repeating this for the rest) give you a homescreen-type cursor. The best I've gotten is "VMX*0" but I'm trying to do it in less characters. This is faster than using Line( to accomplish the same effect (I think).
[post="107190"]<{POST_SNAPBACK}>[/post]


You mean 3x5, not homescreen size? How about "OHI"?
[post="107196"]<{POST_SNAPBACK}>[/post]
I do mean homescrean size. Otherwise, "Q)" would do the trick.
Back to top
Display posts from previous:   
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
    » Goto page Previous  1, 2, 3 ... 25, 26, 27 ... 29, 30, 31  Next
» View previous topic :: View next topic  
Page 26 of 31 » All times are UTC - 5 Hours

 

Advertisement