[Coco] Extended Color BASIC DRAW command

Robert Emery theother_bob at yahoo.com
Sat Aug 14 18:45:24 EDT 2004


--- tim lindner <tlindner at ix.netcom.com> wrote:

> The unravelled book say this about the DRAW command:
> 
> > Something not generally known about the DRAW routine is it's ability to
> > use variables to indicate parameters like length, color, and scale! There
> > is a certain syntax that must be followed, which to my knowledge has not
> > yet been published anywhere until now. Following is a short example of how
> > to do this.
> > 
> > 10 A=10:B=13
> > 20 DRAW "BM=A;,A;;U=B;R=B;D=B;L=B"
> 
> I have tried to run this command and it fails on my CoCo 1 and 3. I
> looked over the source code to BASIC and can find no support for the
> above statements.
> 
> So either I am wrong (and have missed something) or this feature really
> doesn't exist. Does anyone know for sure?

The second A should have an = in front of it. Yes it works, and quite well. It
is used extensively in Color FOG, including the method of "3D" buttun pressing
which draws the same DRAW string with a different X coordinate (Y is centered
for flippability) and ANGLE command. 

DRAW uses A# to specify an angle, where # is 0-8 I think, in 45 degree
increments. You could add to the above string "A=A;" (at the beginning) to see
it work. DRAW also does scaling and you can also specify existing DRAW strings
with the X prefix like so:

D$="L2R2U2D2":FORY=10TO50STEP10:DRAW"BM10,=Y;XD$;":NEXT

PLAY uses variables in the same manner.

Bob


		
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail 



More information about the Coco mailing list