home *** CD-ROM | disk | FTP | other *** search
/ Oakland CPM Archive / oakcpm.iso / sigm / vol148 / signs.doc < prev    next >
Encoding:
Text File  |  1985-02-10  |  3.9 KB  |  132 lines

  1.  
  2.  
  3.  
  4.                                           SIGNS 
  5.  
  6.         SIGN╙ print≤ ß strinτ oµ letter≤ iε largσ forma⌠ -  1░ ° ╖ norma∞ ì
  7.         characters«á  EacΦ lette≥ i≤ 1▓  °  ╖ character≤ iε size«á  Therσ ì
  8.         arσá tw∩ space≤ betweeε eacΦ letter¼á anΣ tw∩ linσ feed≤á betweeε ì
  9.         eacΦá string«á  Tw∩á compilation≤ arσ provided╗á SIGNS╢á ha≤á si° ì
  10.         letter≤á pe≥á strinτ anΣ i≤ suitablσ fo≥ console≤ anΣá 8░á columε ì
  11.         printers«á  SIGNS1▒á ha≤ 1▒ character≤ pe≥ linσ whicΦ fit≤ ont∩ ß ì
  12.         132 column printer.
  13.  
  14.         Thi≤á versioεá oµ thσ prograφ ha≤ beeε turneΣá froφá warmeΣá ove≥ ì
  15.         BASI├ int∩ rea∞ Pascal«á  A≤ sucΦ i⌠ i≤ mucΦ morσ flexible«á  Thσ ì
  16.         tw∩á CONSTants¼á linσ widtΦ anΣ lengtΦ oµ alphabe⌠ arσ documenteΣ ì
  17.         in the source.  WDTH works just fine.
  18.  
  19.         Additionally¼á readabilit∙á ha≤á beeεá improveΣá b∙á puttinτá thσ ì
  20.         initializatioε routine≤ int∩ procedures«á  Also¼ ╔ thinδ yo⌡ wil∞ ì
  21.         be tickled by the output device routing options.
  22.  
  23.         Thσ UCAS┼ functioε trap≤ al∞ illega∞ letters¼á anΣ  turn≤á  lowe≥  ì
  24.         casσá  int∩á upper«á  A≤ presentl∙ written¼á  onl∙á  uppe≥á  casσ  ì
  25.         letter≤  anΣ  blank≤  arσ formatted«  
  26.  
  27.         Sincσ al∞ BASI├ languagσ variable≤ arσ lega∞ iε Pascal¼ thσ name≤ ì
  28.         werσ  no⌠ changed«  Iε thσ revision¼ ╔ succeedeΣ iε eliminatinτ ß ì
  29.         couple altogether.
  30.  
  31.         Fillinτ thσ ┌ arra∙ presenteΣ ß problem«  Initiall∙ ╔ haΣ planneΣ ì
  32.         t∩ d∩  i⌠ thus║  
  33.                 mult := 1;      {declared as integer} 
  34.                 for a := 5 downto 1 do 
  35.                 begin 
  36.                         z[a] := mult; 
  37.                         mult := mult * 10; 
  38.                 end; 
  39.         Thi≤á resulteΣ iε ß run-timσ multiplicatioε  error«á    Thσ brutσ ì
  40.         forcσ methoΣ works¼ th∩ i⌠ certainl∙ i≤ no⌠ a≤ elegant«  
  41.  
  42.         Thσá mos⌠á difficul⌠ par⌠ oµ convertinτ thi≤ prograφá froφá BASI├  ì
  43.         wa≤á  fillinτ thσ arra∙ containinτ thσ characte≥ fon⌠á -- L«á  Iε ì
  44.         BASI├á thi≤á i≤ donσ withiε thσ prograφ usinτ ßá serie≤á oµá DAT┴ ì
  45.         statements╗á fo≥ whicΦ therσ i≤ n∩ analoτ iε Pascal«  Herσ i≤ ho≈ ì
  46.         thσ fon⌠ i≤ stored¼á shoulΣ yo⌡ wisΦ t∩ alte≥ o≥ adΣ t∩ it«  EacΦ ì
  47.         linσ iε  thσ  "font.dató  filσ  consist≤  oµ  ß  strinτ  oµ  8
  48.         characters:  
  49.         Char    ASCII   (val-64)        Binary 
  50.         _       95      31              11111 
  51.         P       80      16              10000 
  52.         P       80      16              10000 
  53.         ^       94      30              11110 
  54.         P       80      16              10000 
  55.         P       80      16              10000 
  56.         P       80      16              10000 
  57.         F -- label, now used to fill L$ array.
  58. è
  59.  
  60.                                         1
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.         Thσ abovσ i≤  thσ  representatioε  oµ  thσ  lette≥  "F"«á    Onl∙  ì
  70.         printablσá character≤ caε bσ useΣ a≤ par⌠ oµ  thσ  fon⌠á  string¼  ì
  71.         a≤áá  m∙áá  tex⌠á  edito≥á filter≤á thσá contro∞áá characters(fo≥ ì
  72.         starters)«á  Fo≥á tha⌠ reason¼á thσ prograφ use≤ thσá uppe≥á casσ ì
  73.         serie≤á anΣ convert≤ t∩ thσ  number≤  needeΣ  usinτ  thσ (val-64⌐ ì
  74.         function«á  Iµá SIGN╙á i≤á useΣá a≤á ßá subroutinσá  iεá  anothe≥  ì
  75.         program¼ sugges⌠ tha⌠ array≤ ╠ anΣ Lñ bσ declareΣ globally«  Als∩ ì
  76.         removσá procedurσ  SETARRA┘ froφ thσ nes⌠ anΣ makσ  i⌠  par⌠á  oµ  ì
  77.         prograφá  initialization«á    Tha⌠  wa∙ "font.dató wil∞á onl∙á bσ ì
  78.         calleΣ once«  
  79.  
  80.         Improvements and comments welcome:  
  81.         Rex A Buddenberg 
  82.         1910 Ash Street 
  83.         North Bend, Or 97459 
  84.         h)503/756-2180 
  85.         Revised 13 March 1983
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.                                         2
  127.  
  128.  
  129.  
  130.  
  131.  
  132.