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
DarkerLine
ceci n'est pas une |


Super Elite (Last Title)


Joined: 04 Nov 2003
Posts: 8328

Posted: 13 Dec 2003 02:58:22 pm    Post subject:

something like this?


Code:
For(Y,Ymin/2,Ymax/2,(Ymax-Ymin)/64
Line(Xmin/2,Y,Xmax/2,Y
End
Text(16,34," Error... "
Text(27,28," press a key "
Text(38,28," to continue "
Repeat getKey
End
Back to top
Arcane Wizard
`semi-hippie`


Super Elite (Last Title)


Joined: 02 Jun 2003
Posts: 8993

Posted: 13 Dec 2003 03:33:45 pm    Post subject:

The above could possibly start and stop drawing the lines somewhere outside of the screen's window settings (depending on those very settings) which doesn't make much sense if you want them to appear on the screen. It would work with the often used window settings that match the real screen's dimensions, but then there'd be little use for those window variables in the code. Also, using .5 to devide something by two is faster than doing /2 .

Here's the above code improved:

For(Y,Ymin,.5(Ymax+Ymin),(Ymax-Ymin)/64
Line(Xmin,Y,Xmax,Y
End
Text(16,34," Error... "
Text(27,28," press a key "
Text(38,28," to continue "
Repeat getKey
End

Here's another bit of code (does require those often used window settings):

For(Y,16,46
Line(24,Y,68,Y,0
End
Line(24,16,68,16
Line(68,16,68,46
Line(68,46,24,46
Line(24,46,24,16
Text(18,26,"ERROR...
Text(26,26,"PRESS A KEY
Text(34,26,"TO CONTINUE
Repeat getKey
End
Back to top
DarkerLine
ceci n'est pas une |


Super Elite (Last Title)


Joined: 04 Nov 2003
Posts: 8328

Posted: 13 Dec 2003 03:41:24 pm    Post subject:

Sorry, I meant to write that that requires the origin at the center of the screen. Thanks for the correction.
Back to top
DarkerLine
ceci n'est pas une |


Super Elite (Last Title)


Joined: 04 Nov 2003
Posts: 8328

Posted: 13 Dec 2003 03:55:24 pm    Post subject:


Code:
Xmin + .25(Xmax - Xmin -> A
Ans + .5(Xmax - Xmin -> B
Ymin + .25(Ymax - Ymin -> C
Ans + .5(Ymax- Ymin -> D
For(Y,C,D,(Ymax-Ymin)/64
Line(A,Y,B,Y
End
Text(16,34," Error... "
Text(27,28," press a key "
Text(38,28," to continue "
Repeat getKey
End
Back to top
DarkerLine
ceci n'est pas une |


Super Elite (Last Title)


Joined: 04 Nov 2003
Posts: 8328

Posted: 14 Dec 2003 07:29:36 pm    Post subject:

Assumes ZDecimal

Code:
Line(-2.3,1.5,2.3,1.5
Line(-2.3,-1.5,-2.3,1.5
Line(2.3,1.5,2.3,-1.5
Line(-2.3,-1.5,2.3,-1.5
For(Y,-1.4,1.4,.1
Line(-2.2,Y,2.2,Y,0
End
Text(-1,22,45,"!
Line(0,1.3,-.7,.1
Line(-.7,-.1,.7,-.1
Line(1,-.1,0,1.3
Line(-1,-.1,1,-.1
Line(-1,-1.3,1,-1.3
Line(-1,-.1,-1,-1.2
Line(1,-.1,1,-1.3
Text(35,44,"OK
Repeat getKey
End


Last edited by Guest on 15 Dec 2003 04:50:40 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: 15 Dec 2003 04:51:50 pm    Post subject:

Checked it. There were several places I'd switched a '-' and a '.'. If you'd looked at what you typed instead of taking my work for granted, you'd have noticed it.

Edit: now it's correct.

Edit Edit: But it only works on an 83+ not on a regular 83. To make it work on an 83, remove the '-1,' in 'Text(-1,22,45,"!' and change it to 23 or 24 instead of 22.


Last edited by Guest on 16 Dec 2003 02:34:20 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
    »
» View previous topic :: View next topic  
Page 1 of 1 » All times are UTC - 5 Hours

 

Advertisement