home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / simtel / sigm / vols000 / vol085 / signs.doc < prev    next >
Text File  |  1984-04-29  |  3KB  |  60 lines

  1.                                   SIGNS 
  2.  
  3. As structured, SIGNS prints a string of seven letters in large format -  10
  4. x 7 normal characters.  Each string of seven letters is a total of 82  x  7
  5. characters in size.  This includes two spaces between each letter, but does
  6. not include two line feeds between each string.  "stat lst:  =  tty:"  will
  7. cause the letters to be printed on the console; expect the last two columns
  8. of the last letter to wrap(or truncate, depending on the  console).    Size
  9. can be trimmed by shortening the arrays to 6 letters,  or  by  cutting  the
  10. space between letters to 1.  
  11.  
  12. The UCASE function traps all illegal letters, and  turns  lower  case  into
  13. upper.  As presently written,  only  upper  case  letters  and  blanks  are
  14. formatted.  
  15.  
  16. Since all BASIC language variables are legal in Pascal, the names were  not
  17. changed.  
  18.  
  19. Filling the Z array presented a problem.  Initially I had planned to do  it
  20. thus:  
  21.         mult := 1;      {declared as integer} 
  22.         for a := 5 downto 1 do 
  23.         begin 
  24.                 z[a] := mult; 
  25.                 mult := mult * 10; 
  26.         end; 
  27. This resulted in a run-time multiplication  error.    I've  brought  it  to
  28. Ithaca's attention.  In the meantime, the brute force method works, tho  it
  29. certainly is not as elegant.  
  30.  
  31. The most difficult part of converting this program from BASIC  was  filling
  32. the array containing the character font -- L.  In BASIC this is done within
  33. the program using a series of DATA statements; for which there is no analog
  34. in Pascal.  Here is how the font is stored, should you wish to alter or add
  35. to it.  Each line in  the  "font.dat"  file  consists  of  a  string  of  8
  36. characters:  
  37. Char    ASCII   (val-64)        Binary 
  38. _       95      31              11111 
  39. P       80      16              10000 
  40. P       80      16              10000 
  41. ^       94      30              11110 
  42. P       80      16              10000 
  43. P       80      16              10000 
  44. P       80      16              10000 
  45. f -- label, not used by the program 
  46. The above is  the  representation  of  the  letter  "F".    Only  printable
  47. characters can be used as part of  the  font  string,  as  my  text  editor
  48. filters the control characters(for starters).  For that reason, the program
  49. uses the upper case series and converts to the  numbers  needed  using  the
  50. (val-64) function.  If SIGNS is used as a subroutine  in  another  program,
  51. suggest that array L be declared globally.  Also remove procedure  SETARRAY
  52. from the nest and make  it  part  of  program  initialization.    That  way
  53. "font.dat" will only be called once.  
  54.  
  55. Improvements and comments welcome:  
  56. Rex A Buddenberg 
  57. 1910 Ash Street 
  58. North Bend, Or 97459 
  59. h)503/756-2180 
  60.