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

LOGO-L> ASCII Table in MSWLogo



Hello All;

Ever wanted to see the complete ASCII table of your favorite font? Here's a possible way to do it in MSWLogo, for Arial font.
If you wish to see the table of some other font, replace the LABELFONT in procedure CHARS.

The ASCII value of each font is the sum of it horizontal and vertical values (the blue numbers).

Now go experimenting with your students. Try, e.g.,:

  pr(word "x char 178 "| | char 177 "| y| char 179 "| = | char 188)

You might consider putting the following program in your library.

Regards...

[[Yehuda]]


to asctable
cs ht setsc 15 setpc 1
headers
setpensize[2 2]lines
setpc 4 seth 90 pu chars
end

to headers
setlabelfont[[Courier New] -15 0 0 400 0 0 0 0 3 2 1 57]
sph -240 150 90 pu for[n 0  19   ][label form :n 2 0 setx xcor+24]
sph -273 126 90 pu for[n 0 240 20][label form :n 3 0 sety ycor-20]
end

to lines
sph -273  130  90 fd 505           ; top  line
sph -240  148 180 fd 276           ; left line
end

to chars
setlabelfont[[Arial] -15 0 0 400 0 0 0 0 3 2 1 42]
for[y 126 -130 -20][
   setxy -233 :y repeat 20[
      label char 125+repcount-:y setx xcor+24
      if (125-:y+repcount)=255[stop]]]
end

to sph :x :y :head ; sets position and heading
pu setxy :x :y pd  ;         library procedure
seth :head
end
 
 
 
 
 
 

GIF image



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