Page 1 of 1

basic BASIC

Posted: Fri Dec 01, 2006 5:32 pm
by buddpaul, with the help of a tutorial, I learned the VERY ELEMENTARY command to creat a circle:

SCREEN 7 ' or could be SCREEN 13
CIRCLE (150, 100), 50, 2

Great.....big blue circle right in the middle of the screen.....I played with the parameters for 20 minutes entertaining myself....yippee.

But, I want to write a program that causes the computer to pick a random location on the screen to draw the circle. I know I'll have to establish MinX and MinY in addition to MaxX and MaxY.........but try as I might, I can't get the syntax figured out......could I get a nudge, please??

Posted: Fri Dec 01, 2006 5:58 pm
by SCC
I just threw this together in a few mintues, don't know if it's what you wanted or not...I don't have much experience yet, but this seemed simple it's about all i know how to do at the moment, lol.

Code: Select all


FOR X = 1 TO 3
R1 = INT(RND * 150)
R2 = INT(RND * 100)
R3 = INT(RND * 50)

CIRCLE (R1, R2), R3, 2
If you don't want multiple circles, just get rid of the FOR..NEXT

...oh, and about that MinX stuff, lol i have no idea where that would go.

Posted: Fri Dec 01, 2006 6:19 pm
by Z!re

Limit yourself to a single topic about the same damned thing will you.

This topic is locked. Also, the answer has already been given in the other topic.