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

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