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
Author Message
Newbie


Bandwidth Hog


Joined: 23 Jan 2004
Posts: 2247

Posted: 07 Mar 2004 12:44:06 pm    Post subject:

Is it possible to have a command line like ptoff(1,2 and 3,4 and 5,6
and so forth or would that not work? I dont have my calculator so I could not do this myself.
Back to top
Arcane Wizard
`semi-hippie`


Super Elite (Last Title)


Joined: 02 Jun 2003
Posts: 8993

Posted: 07 Mar 2004 12:48:07 pm    Post subject:

Nope.

You could use a list and a loop though. Or just multiple pt-off statements.
Back to top
Newbie


Bandwidth Hog


Joined: 23 Jan 2004
Posts: 2247

Posted: 07 Mar 2004 12:59:48 pm    Post subject:

Can you give an example?
What I want to be able to do is take points off on a black screen to make words. But I know you cant recall a certain part of a list.


Last edited by Guest on 07 Mar 2004 01:04:50 pm; edited 1 time in total
Back to top
Arcane Wizard
`semi-hippie`


Super Elite (Last Title)


Joined: 02 Jun 2003
Posts: 8993

Posted: 07 Mar 2004 01:12:07 pm    Post subject:

OK, you understand the concept of drawing one white pixel, right?

Now, supposing you want to draw two whole white pixels... you would do something very similar to drawing just one, only twice.

Pt-Off(1,1
Pt-Off(2,2

Are you still with me? OK, supposing you are too lazy to write all kinds of Pt-Off statements and want to use a loop and a list, you would replace the numbers with elements of the list and loop through these elements.


{1,1,2,2,3,3,4,4,5,5->L1
For(X,1,10,2
Pt-Off(L1(X),L1(X+1
End

Quote:
But I know you cant recall a certain part of a list.
Um, you can recall every element of a list.
Back to top
Newbie


Bandwidth Hog


Joined: 23 Jan 2004
Posts: 2247

Posted: 07 Mar 2004 03:34:01 pm    Post subject:

With everything you stored to list 1 how would you recall only 2,2 for instance?
Back to top
Arcane Wizard
`semi-hippie`


Super Elite (Last Title)


Joined: 02 Jun 2003
Posts: 8993

Posted: 07 Mar 2004 03:57:22 pm    Post subject:

Getting the Nth element of a list:

L1(N

Getting the Nth + 1 element from a list:

L1(N+1

If you want to look through the list and see which element the number 2 is stored to:

For(X,1,Dim(L1
If 2=L1(X:X->Y
End

Y now contains the last element that holds the number 2, with some little modifications you can use this to search for number sequences, every element containing a certain value, etc.
Back to top
Fr0sty


Member


Joined: 27 Nov 2003
Posts: 202

Posted: 07 Mar 2004 05:25:42 pm    Post subject:

On your code arcane:
Wouldn't that pick the last number 2 is stored to?
Back to top
Arcane Wizard
`semi-hippie`


Super Elite (Last Title)


Joined: 02 Jun 2003
Posts: 8993

Posted: 08 Mar 2004 12:04:34 pm    Post subject:

Fr0sty wrote:
On your code arcane:
Wouldn't that pick the last number 2 is stored to?
Arcane Wizard wrote:
Y now contains the last element that holds the number 2
Back to top
Adm.Wiggin
aka Tianon


Know-It-All


Joined: 02 Jun 2003
Posts: 1874

Posted: 08 Mar 2004 06:27:31 pm    Post subject:

the code you posted a while ago should be changed to this :
Code:
{1,1,2,2,3,3,4,4,5,5->L1
For(X,1,dim(L1),2
Pt-Off(L1(X),L1(X+1
End
Wink
Back to top
X1011
10100111001


Active Member


Joined: 14 Nov 2003
Posts: 657

Posted: 08 Mar 2004 08:34:37 pm    Post subject:

Newbie wrote:
What I want to be able to do is take points off on a black screen to make words.

You might want to use lines for that.
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
    »
» View previous topic :: View next topic  
Page 1 of 1 » All times are UTC - 5 Hours

 

Advertisement