Andreas Rozek Hints for Reading List of Recent Changes Guestbook Entry Contact the Author  Deutsche Version  HomePage Previous Topic Next Topic  First Page of Current Topic Next Page Previous Page

ASCIITable - prints an ASCII Table

As already indicated by the name, "ASCIITable" prints an ASCII table onto "stdout"

The program itself is simple enough not to require any further explanation.

"ASCIITable" should be invoked without any command line arguments

  lua ASCIITable.lua

and yields the following output:

  ASCIITable - prints a simple ASCII table

      | -0 -1 -2 -3 -4 -5 -6 -7 -8 -9 -A -B -C -D -E -F |
  ----+-------------------------------------------------+----
   0- |                                                 | 0-
   1- |                                                 | 1-
   2- |     !  "  #  $  %  &  '  (  )  *  +  ,  -  .  / | 2-
   3- |  0  1  2  3  4  5  6  7  8  9  :  ;  <  =  >  ? | 3-
   4- |  @  A  B  C  D  E  F  G  H  I  J  K  L  M  N  O | 4-
   5- |  P  Q  R  S  T  U  V  W  X  Y  Z  [  \  ]  ^  _ | 5-
   6- |  `  a  b  c  d  e  f  g  h  i  j  k  l  m  n  o | 6-
   7- |  p  q  r  s  t  u  v  w  x  y  z  {  |  }  ~    | 7-
   8- |                                                 | 8-
   9- |                                                 | 9-
   A- |     ¡  ¢  £  ¤  ¥  ¦  §  ¨  ©  ª  «  ¬  ­  ®  ¯ | A-
   B- |  °  ±  ²  ³  ´  µ  ¶  ·  ¸  ¹  º  »  ¼  ½  ¾  ¿ | B-
   C- |  À  Á  Â  Ã  Ä  Å  Æ  Ç  È  É  Ê  Ë  Ì  Í  Î  Ï | C-
   D- |  Ð  Ñ  Ò  Ó  Ô  Õ  Ö  ×  Ø  Ù  Ú  Û  Ü  Ý  Þ  ß | D-
   E- |  à  á  â  ã  ä  å  æ  ç  è  é  ê  ë  ì  í  î  ï | E-
   F- |  ð  ñ  ò  ó  ô  õ  ö  ÷  ø  ù  ú  û  ü  ý  þ  ÿ | F-
  ----+-------------------------------------------------+----
      | -0 -1 -2 -3 -4 -5 -6 -7 -8 -9 -A -B -C -D -E -F |

It is recommended to analyze this output along with the source code - this clarifies the proper behaviour of the abovementioned functions and methods.

Source Code

The source code of this example is available for download:

Disclaimer

Please, consider also the author's Disclaimer!

http://www.Andreas-Rozek.de/Lua/Acquainting/ASCIITable_en.html    (last Modification: 15.04.2002)