---------- Forwarded message ----------
Date: Fri, 16 Apr 2004 21:27:48 -0400
From: ANDY <[EMAIL PROTECTED]>
Reply-To: "PC-ASK is one-stop PC support forum."
<[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: Re: QBasic ascii Animation?
Dear Scott,
Thanks for this program... *You* would have passed this interview test and
probably would have gotten the job... congratulations! :)
I simply lack knowledge of the commands and their use available using
BASIC... I simply don't and didn't then have the diverse BASIC and
programming experience needed to write such a program myself and "on the
fly"... Most of my BASIC and programming job experience revolved around
much simpler list processing only (:
Thanks again for such a quick answer
Andy
On Wed, 14 Apr 2004, Scott McNay wrote:
> Hi ANDY,
>
> Wednesday, April 14, 2004, 7:29:13 PM, you wrote:
>
> A> in the late '80's (I rode my 10-speed bike) to a computer programming job
> A> interview... the interview consisted of a "test"...
>
> A> the "test" was/I was asked to write a BASIC program using a, it seemed,
> A> networked, CLI monitor/computer etc.
>
> A> I was asked to write a BASIC program that would draw a rectangle on
> A> the monitor screen with the asterik character "*", then sequentially
> A> draw smaller rectangles within the first...
>
> A> like this:
>
> A> ********************
> A> ***************** *
> A> * ************* * *
> A> * * *********** * *
> A> * * * <-* * * * * *
> A> * * *********** * *
> A> * *************** *
> A> *******************
>
> A> I found this task immpossible recently using QBasic
>
> A> first I wrote two simple loops using two PRINT statements, on
> A> paper, thinking that the PRINT command, or I, could simply PRINT(X,Y);"*"
> A> on/to sequential or any given set of x,y coordinates at any time...
>
> A> little did I realize that everytime PRINT is invoked it prints
> A> to/on a new/next line...
>
> A> and to meet such an above program specification, I guess one must
> A> know/have known? something about animation and computer animation,
> A> writing/printing such asteriks to individual *frames*, then sequentially
> A> with appropriate pauses putting/assembling all of them together so that
> A> the above animation would/will appear on the/a blank cli computer screen
>
> A> my question is: can this be done using CLI Basic?? I've come to a
> A> conclusion that it cannot... am I correct in this conclusion?
>
> A> how far did human-kind get in such CLI ascii animation projects? using
> A> BASIC??
>
> A> I mean: could this be done/have been done using an array or arrays?,
> A> somehow creating and storing such "screen "frames"", then or
> A> simultaneously resassembling them, in or using array memory?
>
> This took me about 15 minutes:
>
>
> xloc = 1
> yloc = 1
> xLen = 10
> YLen = 10
> XDir = 1
> YDir = 1
>
> CLS
> WHILE xLen >= 0 AND YLen >= 0
> GOSUB vertical
> GOSUB horizontal
> WEND
> LOCATE 20, 20
> END
>
> horizontal:
> FOR a = 1 TO xLen
> LOCATE xloc, yloc
> PRINT "*";
> SLEEP 100
> xloc = xloc + XDir
> NEXT a
> xLen = xLen - 1
> XDir = XDir * -1
> RETURN
>
> vertical:
> FOR a = 1 TO YLen
> LOCATE xloc, yloc
> PRINT "*";
> SLEEP 100
> yloc = yloc + YDir
> NEXT a
> YLen = YLen - 1
> YDir = YDir * -1
> RETURN
>
>
>
> --Scott.
>
>
> You are subscribed to the PC-ASK Mailing List @ ST John's University
> Listowner -> [EMAIL PROTECTED]
> Unsubscribe -> Send "unsubscribe pc-ask" to [EMAIL PROTECTED]
> Archives -> http://maelstrom.stjohns.edu/archives/pc-ask.html
>
You are subscribed to the PC-ASK Mailing List @ ST John's University
Listowner -> [EMAIL PROTECTED]
Unsubscribe -> Send "unsubscribe pc-ask" to [EMAIL PROTECTED]
Archives -> http://maelstrom.stjohns.edu/archives/pc-ask.html