LOGO-L> Alphabet 
Author Message
 LOGO-L> Alphabet

I am using MicroWorlds, and have just programmed an alphabet clock.  Can
someone please tell me if there is a way to turtletype the entire
alphabet around the circumference of the clock without naming each
individual letter.  The program throws out numbers also around the
clock, and that is done in a couple of lines but I am wondering if the
program (or Logo) recognises the alphabet also as an ordinal set, or if
indeed there is some way of recognition.

Robyn Valentine.

---------------------------------------------------------------





Wed, 02 Oct 2002 03:00:00 GMT  
 LOGO-L> Alphabet

Quote:
>I am using MicroWorlds, and have just programmed an alphabet clock.  Can
>someone please tell me if there is a way to turtletype the entire
>alphabet around the circumference of the clock without naming each
>individual letter.  The program throws out numbers also around the
>clock, and that is done in a couple of lines but I am wondering if the
>program (or Logo) recognises the alphabet also as an ordinal set, or if
>indeed there is some way of recognition.

Robyn,

All the characters (letters, numerals, punctuation symbols etc.) have their
ascii codes - numbers between 32 and 255.
Codes of letters are subsequent numbers (starting at A and ending at Z).
To convert a letter to its ascii code and back you can use functions ascii
and char respectively.
This short program prints all letters from A to Z. I think that you will be
able to modify it for your purposes:

make "x ascii "A repeat 26 [show char :x make "x :x + 1]

Regards

Peter Tomcsanyi

---------------------------------------------------------------





Wed, 02 Oct 2002 03:00:00 GMT  
 LOGO-L> Alphabet
well,
i cannot resist:

foreach iseq ascii "A ascii "Z [show char ?]

is how i would do it in mswlogo and ucblogo
i do not know if microworlds has iseq

Quote:


> >I am using MicroWorlds, and have just programmed an alphabet clock.  Can
> >someone please tell me if there is a way to turtletype the entire
> >alphabet around the circumference of the clock without naming each
> >individual letter.  The program throws out numbers also around the
> >clock, and that is done in a couple of lines but I am wondering if the
> >program (or Logo) recognises the alphabet also as an ordinal set, or if
> >indeed there is some way of recognition.

> Robyn,

> All the characters (letters, numerals, punctuation symbols etc.) have their
> ascii codes - numbers between 32 and 255.
> Codes of letters are subsequent numbers (starting at A and ending at Z).
> To convert a letter to its ascii code and back you can use functions ascii
> and char respectively.
> This short program prints all letters from A to Z. I think that you will be
> able to modify it for your purposes:

> make "x ascii "A repeat 26 [show char :x make "x :x + 1]

> Regards

> Peter Tomcsanyi

> ---------------------------------------------------------------






Fri, 04 Oct 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. LOGO-L> Re: Alphabet

2. LOGO-L> Apple logo/MSW Logo

3. LOGO-L> Reseach Machines Logo (RM LOGO)

4. WTD: 'ls -lR '->HTML code

5. LOGO-L> Welcome to logo-l

6. LOGO-L> Re: Dynamic scope in Logo

7. LOGO-L> INFO re SIG-LOGO

8. LOGO-L> Logo speed

9. LOGO-L> Logo foundation site

10. LOGO-L> Logo Workshops

11. LOGO-L> Logo for MAC

12. LOGO-L> Object Logo for PC

 

 
Powered by phpBB® Forum Software