CEMETECH
Leading The Way To The Future
Login [Register]
Username:
Password:
Autologin:

Don't have an account? Register now to chat, post, use our tools, and much more.
Latest Headlines
Online Users
There are 105 users online: 4 members, 70 guests and 31 bots.
Members: HOMER-16, lafferjm, Xeda112358.
Bots: VoilaBot (3), Spinn3r (3), MSN/Bing (2), Magpie Crawler (4), Googlebot (19).
RSS & Social Media
SAX
You must log in to view the SAX chat widget
    » Goto page Previous  1, 2, 3, 4  Next
» View previous topic :: View next topic  
Author Message
KermMartian


Site Admin


Joined: 14 Mar 2005
Posts: 55760
Location: Earth, Sol, Milky Way

Posted: 13 Mar 2006 09:25:44 am    Post subject:


Code:
Fill(1,listname

_________________


Back to top
rivereye


Future Admin


Joined: 16 Mar 2005
Posts: 5450
Location: Out Fishing

Posted: 13 Mar 2006 09:41:06 am    Post subject:

ok, it is all real variables
_________________
I am the eye of the river
>(<')


Back to top
KermMartian


Site Admin


Joined: 14 Mar 2005
Posts: 55760
Location: Earth, Sol, Milky Way

Posted: 13 Mar 2006 09:42:38 am    Post subject:

Oh. :S That makes it slightly more complicated. I guess the best thing there is just to 1-->Blah:1-->Etc everything.
_________________


Back to top
rivereye


Future Admin


Joined: 16 Mar 2005
Posts: 5450
Location: Out Fishing

Posted: 13 Mar 2006 09:44:55 am    Post subject:

which is what I do (you act like I am stupid here)
_________________
I am the eye of the river
>(<')


Back to top
KermMartian


Site Admin


Joined: 14 Mar 2005
Posts: 55760
Location: Earth, Sol, Milky Way

Posted: 13 Mar 2006 10:06:08 am    Post subject:

Laughing No, I was just trying to think of an optimized way to do it. Smile
_________________


Back to top
Radical Pi


Member


Joined: 22 Jan 2006
Posts: 137
Location: Here!

Posted: 13 Mar 2006 05:04:39 pm    Post subject:

If only this would work:
Code:
For(A,1,10
1 -> expr(sub("BCDEFGHIJK",A,1
End

_________________
I need to learn Greek...
Back to top
elfprince13


OVER NINE THOUSAND!


Joined: 23 May 2005
Posts: 10234
Location: A galaxy far far away......

Posted: 13 Mar 2006 08:07:29 pm    Post subject:

Idea Idea Idea Idea Idea Idea



Code:

1 -> L1(expr(sub("BCDEFGHIJK",A,1


if it works Im a genius
_________________
StickFigure Graphic Productions || VSHI: Vermont Sustainable Heating Initiative


Back to top
KermMartian


Site Admin


Joined: 14 Mar 2005
Posts: 55760
Location: Earth, Sol, Milky Way

Posted: 14 Mar 2006 09:01:29 am    Post subject:

ZOMG! I bet it would...
_________________


Back to top
elfprince13


OVER NINE THOUSAND!


Joined: 23 May 2005
Posts: 10234
Location: A galaxy far far away......

Posted: 14 Mar 2006 12:46:27 pm    Post subject:

now I have to test that....and I hope I get credit for thinking of it.

Ive been having fun working with expr( on my frog game
_________________
StickFigure Graphic Productions || VSHI: Vermont Sustainable Heating Initiative


Back to top
KermMartian


Site Admin


Joined: 14 Mar 2005
Posts: 55760
Location: Earth, Sol, Milky Way

Posted: 14 Mar 2006 12:51:55 pm    Post subject:

expr( is one of the most powreful and least used of TI-BASIC commands.
_________________


Back to top
Radical Pi


Member


Joined: 22 Jan 2006
Posts: 137
Location: Here!

Posted: 14 Mar 2006 04:01:37 pm    Post subject:

IT WORKS!!!!! Good Idea Good Idea Good Idea Good Idea Good Idea

If dim(L1, of course...

So can you give an example of how to use it? I'm curious about it's potential...
_________________
I need to learn Greek...
Back to top
KermMartian


Site Admin


Joined: 14 Mar 2005
Posts: 55760
Location: Earth, Sol, Milky Way

Posted: 14 Mar 2006 04:04:03 pm    Post subject:

How does that work exactly?
_________________


Back to top
elfprince13


OVER NINE THOUSAND!


Joined: 23 May 2005
Posts: 10234
Location: A galaxy far far away......

Posted: 14 Mar 2006 04:07:30 pm    Post subject:

1 -> L1(expr(sub("BCDEFGHIJK",A,1


first, sub picks out the variable you wish to use based on the value of A.
Then expr( evaluates the substring to find the index in the list that you will store too.
_________________
StickFigure Graphic Productions || VSHI: Vermont Sustainable Heating Initiative


Back to top
Radical Pi


Member


Joined: 22 Jan 2006
Posts: 137
Location: Here!

Posted: 14 Mar 2006 04:52:46 pm    Post subject:

I still don't see how it saves space. Razz
_________________
I need to learn Greek...
Back to top
KermMartian


Site Admin


Joined: 14 Mar 2005
Posts: 55760
Location: Earth, Sol, Milky Way

Posted: 14 Mar 2006 07:27:34 pm    Post subject:

Wouldn't that be like
1-->L1(B
1-->L1(C

instead of
1-->B
1-->C?
_________________


Back to top
elfprince13


OVER NINE THOUSAND!


Joined: 23 May 2005
Posts: 10234
Location: A galaxy far far away......

Posted: 14 Mar 2006 10:00:41 pm    Post subject:

no, because it allows you to choose which variable to use to store to based on A instead of brute forcing it with If statements.
_________________
StickFigure Graphic Productions || VSHI: Vermont Sustainable Heating Initiative


Back to top
KermMartian


Site Admin


Joined: 14 Mar 2005
Posts: 55760
Location: Earth, Sol, Milky Way

Posted: 15 Mar 2006 09:41:36 am    Post subject:

I still don't quite see that, but I'll take your word for it. Smile
_________________


Back to top
elfprince13


OVER NINE THOUSAND!


Joined: 23 May 2005
Posts: 10234
Location: A galaxy far far away......

Posted: 15 Mar 2006 09:57:09 am    Post subject:

you have a bunch of variables that contain list indices. You want to pick which variable to use based on the value of A.

you could either do this:


Code:

1 -> L1(expr(sub("BCDEFGHIJK",A,1


of


Code:

If A = 1
1->L1(B
If A = 2
1->L1(C
If A = 3
1->L1(D
If A = 4
1->L1(E
If A = 5
1->L1(F
If A = 6
1->L1(G
If A = 7
1->L1(H
If A = 8
1->L1(I
If A = 9
1->L1(J
If A = 10
1->L1(K


now do you see the space it saves?
_________________
StickFigure Graphic Productions || VSHI: Vermont Sustainable Heating Initiative


Back to top
KermMartian


Site Admin


Joined: 14 Mar 2005
Posts: 55760
Location: Earth, Sol, Milky Way

Posted: 15 Mar 2006 10:01:16 am    Post subject:

That's what I thought it did. Fair enough. But I thought we were looking for something to do:
1-->A
1-->B
1-->C....
_________________


Back to top
elfprince13


OVER NINE THOUSAND!


Joined: 23 May 2005
Posts: 10234
Location: A galaxy far far away......

Posted: 15 Mar 2006 12:42:21 pm    Post subject:

right. but if at the start of the program you do:

Code:

10->dim(L1
1->A
2->B
3->C
4->D
5->E
6->F
7->G
8->H
9->I
10->J


you're set Very Happy
_________________
StickFigure Graphic Productions || VSHI: Vermont Sustainable Heating Initiative


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, 4  Next
» View previous topic :: View next topic  
Page 2 of 4 » All times are GMT - 5 Hours

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© Copyright 2000-2013 Cemetech & Kerm Martian :: Page Execution Time: 0.036750 seconds.