home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 3 / PDCD_3.iso / pocketbk / developmen / oplexamp / LPRINTP.TXT < prev    next >
Text File  |  1994-06-13  |  880b  |  32 lines

  1. ==========
  2. psion/opl #1269, from jezar, 770 chars, Jun 13 09:41 94
  3. ----------
  4. TITLE: OPL Hint for the morning
  5.  
  6. Most of you know that when writing text files you can  get
  7. far more  control by  using LPRINT  to a  file instead  of
  8. IOWRITE.  However,  to  be  totally  flexible,  you   will
  9. probably want to be able to  print to the screen as  well.
  10. But this can lead to a horrible mixture of both PRINT  and
  11. LPRINT statements, punctuated by IFs and ELSEs.
  12.  
  13. Instead, just use LPRINT and redirect it to the screen  as
  14. in this example:
  15.  
  16. PROC PatchLP:
  17.   POKEW PEEKW($1C)+$1A,PEEKW(PEEKW($1C)+$1C)
  18.  
  19.   LPRINT "By using LPRINT instead of PRINT"
  20.   LPRINT "You can send output *anywhere!*"
  21.   LPRINT "and YES, it's *legal* too!"
  22.   GET
  23. ENDP
  24.  
  25. I guess it's possible that in future you might need to POKEW a
  26. zero back when you've done, but I doubt it.
  27.  
  28. Jezar.
  29.  
  30.   
  31.  
  32.