[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: LOGO-L> Start up Ooops...



I resend this: Unfortunately I had in my first version two embarassing
typos. Sorry.


David & Janet Taylor wrote:
> 
> I need a source for examples for all the vocab in UCBLogo.  I cannot get
> the do.while and do.until to work for me because the samples are to
> cryptic. I will need to check the archive for a while until I s-bscr-b-.
> If you have a really hot tip, drop me an email direct.  Thanks.


Hello David & Janet Taylor,

I agree that the HELP on DO.WHILE and DO.UNTIL might seem cryptic to the
average Logo user.

Here I give 2 examples to each of them:

>>>>> DO.WHILE: <<<<<
=============================================
to horizontal :num :char
do.while[type :char make "num :num-1][:num>0]
end
=============================================
This procedure gets two inputs, a number and a character, and produces a
horizontal line of :num characters of your choice.

Try: HOROZONTAL 17 "= and you get a line made of 17 equal-signs.
Try: HORIZONTAL 20 char 32 and you get a 20 consequent spaces.

If you prefer graphics, you might want to try this:
=============================================
cs
do.while[fd 30 bk 25 rt 30][not pos=[0 0]]
=============================================




>>>>> DO.UNTIL <<<<<
=============================================
to square_table :num
do.until[(pr :num :num*:num)make "num 1+:num][:num>10]
end
=============================================
This procedure produces on the screen a column of the numbers 1-10, and
next to each one its square. Try: SQUARE.TABLE 10.
If you know FORM, you can arrange the output cosmetically in a much
prettier shape.

If you prefer graphics, you might want to try this:
=============================================
cs
do.until[fd 1 rt 1][heading=0]
=============================================


Look please, that I took two very basic examples.
B - U - T,  I believe that you can use Logo very efficiently without
ever exercising DO.WHILE nor DO.UNTIL.

About subscribing to Logo-l, well - the decision is yours, we live in
democratic countries - you know...

Regards...

[[Yehuda]]

---------------------------------------------------------------
Please post messages to the Logo forum to logo-l@gsn.org.  Mail
questions about the list administration to logofdn@gsn.org.  To
unsubscribe send    unsubscribe logo-l    to majordomo@gsn.org.



Global SchoolNet Foundation - Linking Kids Around the World!
Copyright GSN - All Rights Reserved - Comments & Questions
Visit GSN's Global Schoolhouse for more exciting learning resources!
Search our Site - Home