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
» View previous topic :: View next topic  
Author Message
Arcane Wizard
`semi-hippie`


Super Elite (Last Title)


Joined: 02 Jun 2003
Posts: 8993

Posted: 03 May 2004 05:40:32 pm    Post subject:

I just said that's what I use, and it works fine for me.

I would use a lookup string (gee, did I jsut come up with that?) with values for the lengths.
Back to top
Awesome1


Advanced Member


Joined: 28 Jan 2004
Posts: 269

Posted: 03 May 2004 08:33:34 pm    Post subject:

Thanx for all the suggestions and code, it will help me a lot. Of course it will be modified to suit my needs. Thanx arcane, sir robin, notepad gamer and wiggin for the code and suggestions! u are the *kings* of basic....but there's always someone who knows more!!! or so im told...

Last edited by Guest on 03 May 2004 08:37:34 pm; edited 1 time in total
Back to top
X1011
10100111001


Active Member


Joined: 14 Nov 2003
Posts: 657

Posted: 03 May 2004 08:51:19 pm    Post subject:

Yea, whoever told you that was lying.
Back to top
Darth Android
DragonOS Dev Team


Bandwidth Hog


Joined: 31 May 2003
Posts: 2104

Posted: 04 May 2004 01:32:42 am    Post subject:

Notepad_Gamer wrote:

Code:
6 -> E
1 -> A
1 -> B
For((pheta),1,100
Disp (pheta)
A+C -> A
C-2C(A=1 or A=8 -> C
B+D -> B
D-2D(B=1 or B=E -> D
End

about 18 seconds (with mississipi count)

Code:
6 -> E
1 -> A
1 -> B
For((pheta),1,100
Disp (pheta)
A+C -> A
If A=1 or A=8
-C -> C
B+D -> [B]B[/B] //i dont know how or why it would effect speed putting A here
If B=1 or B=E
-D -> D
End

About 15 or 16 seconds.

... I just have an aversion to If statements... Neutral

that many seconds till when? it made a complete "rotation" and ended up back where it started?

[b]EDIT: i just saw you put for loops in the code.
the following tested out at 14.67 seconds:

Code:
1->A
1->B
1->C
1->D
6->E
For(F,1,100
Disp F
C(A≠1 and A≠8)+(A=1)-(A=8)->C
D(B≠1 and A≠17-E)+(B=1)-(B=17-E)->D
A+C->A
B+D->B
End
ClrHome










about my code, i accidentially left out the most important part, teh
A+C->A and
B+D->B

so the end code is

Code:
If 6<length(Str1
Then
Disp "Str1 TOO LONG"
Stop
End
1->A
1->B
1->C
1->D
length(Str1->E
Repeat getKey
ClrHome
Output(A,B,Str1
C(A≠1 and A≠8)+(A=1)-(A=8)->C
D(B≠1 and A≠17-E)+(B=1)-(B=17-E)->D
A+C->A
B+D->B
End
ClrHome


and the <> does mean "not equal too" or ≠
i have edited my code accordingly
sorry.


Last edited by Guest on 04 May 2004 01:42:14 am; edited 1 time in total
Back to top
Awesome1


Advanced Member


Joined: 28 Jan 2004
Posts: 269

Posted: 04 May 2004 02:57:39 pm    Post subject:

I have the home screen scroll working properly, but i still can get the graph screen to do though, i'm using this code but when it's supposed to bounce off the right side it keeps going and then i get an error, i've also tried an if...then statement and no such luck. What am i doing wrong? The BOLD is what im using and does not work...

Quote:
Lbl X
If 6<length(Str1              // limits text to be 6 charaters
Then                              // limits text to be 6 charaters
Disp "Str1 TOO LONG"  // limits text to be 6 charaters
Goto X                          // limits text to be 6 charaters
End
1->A
1->B
1->C
1->D
1->F    // for the text clear
1->G // for the text clear
1->H  // for the text clear
1->I // for the text clear
length(Str1)->E
Fix 0
E=1(1*91)->E    // sets right X boundry (right virt. side of screen)
E=2(2*43.5)->E    // sests right X boundry (right virt. side of screen)
E=3(3*27.5)->E // sets right X boundry (right virt. side of screen)
E=4(4*19.7)->E // sets right X boundry (right virt. side of screen)
E=5(5*15)->E      // sets right X boundry (right virt. side of screen)
E=6(6*11.9)->E // sets right X bountry (right virt. side of screen)
ClrHome
Repeat K=21              // repeat till key 21(2nd) is pressed
getkey->K
Text(A,B,Str1
**code to keep the trail from showing will be here**
A+C->A
if A=1 or A=8
-C->C
B+D->B
if B=1 or B=E
-D->D
if f=1 or f=8
-h->h
g+i->g
if g=1 or g=e
-i->i
End
ClrHome


TIA!!!
Back to top
DarkerLine
ceci n'est pas une |


Super Elite (Last Title)


Joined: 04 Nov 2003
Posts: 8328

Posted: 04 May 2004 04:08:35 pm    Post subject:

The Fix 0 doesn't do anything, you can take it out.
The code you have in bold could be fixed to
int((E=1)(1*91)+(E=2)(2*43.5)+(E=3)(3*27.5)+(E=4)(4*19.7)+(E=5)(5*15)+(E=6)(6*11
.9->E
And that could be optimized to
int(E(however you calculated those other numbers -> E
Back to top
Adm.Wiggin
aka Tianon


Know-It-All


Joined: 02 Jun 2003
Posts: 1874

Posted: 04 May 2004 07:19:16 pm    Post subject:

Awesome1 wrote:
Thanx for all the suggestions and code, it will help me a lot. Of course it will be modified to suit my needs. Thanx arcane, sir robin, notepad gamer and wiggin for the code and suggestions! u are the *kings* of basic....but there's always someone who knows more!!! or so im told...

All I did was tell you what to look for (it's actually right in the manual Laughing)...
Back to top
Awesome1


Advanced Member


Joined: 28 Jan 2004
Posts: 269

Posted: 04 May 2004 08:03:02 pm    Post subject:

Yeah, thanx anyway though, somehow my manual magically disappeard from my locker... Neutral but i downloaded the appendix in PDF format and i wasn't aware that that was in there... The code does what i want it to do, thanx a lot for the help peoples!

Quote:
All I did was tell you what to look for (it's actually right in the manual )...

i was brought up to thank people for they're help and even it's the internet and i personaly don't know them, it's good to be kind, cuz then people will give you as much help as you give out to the community

Quote:
And that could be optimized to
int(E(however you calculated those other numbers -> E

I will take that into consideration since this program is going to be rather large for a screensavor... and thanx for the code ;)

EDIT:
How would i change this string:

Code:
int((E=1)(1*91)+(E=2)(2*43.5)+(E=3)(3*27.5)+(E=4)(4*19.7)+
(E=5)(5*15)+(E=6)(6*11.9->E

to change the size of the trail which is spaces to clear the left behind text. Like i did in this one:

Quote:
if 6<length(str1)
then
disp "text too long!"
stop
end
2->a
2->b
1->c
1->d
1->f
1->g
1->h
1->i
17-length(str1)->e
repeat getkey
for(s,1,10
end
outbut(a,b,str1
"6 spaces"->str3
length(str1)->L
sub(str3,1,L)->srt2
output(f,g,str2
a+c->a
if a=1 or a=8
-c->c
b+d->b
if b=1 or b=e
-d->d
f+h->
if f=1 or f=8
-h->h
g+i->g
if g=1 or g=e
-i->i
end
clrhome


Im forever stuck...lol as usual


Last edited by Guest on 09 May 2004 03:20:49 pm; edited 1 time in total
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
» View previous topic :: View next topic  
Page 2 of 2 » All times are UTC - 5 Hours

 

Advertisement