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
62 52 53 53
Formerly known as 62 52 53 53


Active Member


Joined: 30 May 2003
Posts: 607

Posted: 13 Jun 2003 08:23:00 am    Post subject:

Trying to test some code, but I can't seem to get it to work.

Edit: hold on, I forgot to post the code
Edit: and now the code (I have the feeling it is something obvious, but I can't figure out what. It is supposed to RLE compress L1 into L2, where a negative number is the flag and times to copy.)

{0}->L1
{0}->L2
For(A,1,16,1)
For(B,1,8,1)
[B](A,B)->L1(dim(L1)+1)
End
End
0->L1(dim(L1)+1)
0->L1(dim(L1)+1)
For(A,1,dim(L1)-1,1)
If L1(A)=L1(A+1) and L1(A+1)=L1(A+2):Goto A
L1(A)->L2(dim(L2)+1)
Lbl B
End
Goto C
Lbl A
0->L1(dim(L1)+1)
A->B
While B<dim(L1) and L1(B)=L1(A)
B+1->B
L2(dim(L2))-1->L2(dim(L2))
End
Goto B
Lbl C


Last edited by Guest on 13 Jun 2003 11:27:04 am; edited 1 time in total
Back to top
Darth Android
DragonOS Dev Team


Bandwidth Hog


Joined: 31 May 2003
Posts: 2104

Posted: 13 Jun 2003 09:44:18 am    Post subject:

please edit ur post and uncheck "Do you wish to enable emoticons for this post?" so that we can read it easier.
Back to top
anduril66
Anduril is the Flame of the West!


Member


Joined: 25 May 2003
Posts: 129

Posted: 13 Jun 2003 10:25:22 am    Post subject:

62_52_53_53 wrote:
{0}->L1
{0}->L2
For(A,1,16,1)
For(B,1,8,1)
[B](A,B)->L1(dim(L1)+1)
End
End
0->L1(dim(L1)+1)
0->L1(dim(L1)+1)
For(A,1,dim(L1)-1,1)
If L1(A)=L1(A+1) and L1(A+1)=L1(A+2):Goto A
L1(A)->L2(dim(L2)+1)
Lbl B
End
Goto C
Lbl A
0->L1(dim(L1)+1)
A->B
While B<dim(L1) and L1(B)=L1(A)
B+1->B
L2(dim(L2))-1->L2(dim(L2))
End
Goto B
Lbl C

I didn't change anything.
Back to top
62 52 53 53
Formerly known as 62 52 53 53


Active Member


Joined: 30 May 2003
Posts: 607

Posted: 13 Jun 2003 11:28:07 am    Post subject:

oops, I see the problem: lbl B was in the wrong place. Thanks anyway.
Back to top
Tyraniek


Member


Joined: 07 Jun 2003
Posts: 133

Posted: 13 Jun 2003 11:59:07 am    Post subject:

you're welcome ! Laughing
Back to top
Darth Android
DragonOS Dev Team


Bandwidth Hog


Joined: 31 May 2003
Posts: 2104

Posted: 13 Jun 2003 06:33:06 pm    Post subject:

u didnt change anything, but emoticons are automaticlly disabled in "code" or "quotes"
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