home *** CD-ROM | disk | FTP | other *** search
/ ProfitPress Mega CDROM2 …eeware (MSDOS)(1992)(Eng) / ProfitPress-MegaCDROM2.B6I / MAGAZINE / PCMAG / VOL10N16.ZIP / TRYPUT.PRG < prev   
Encoding:
Text File  |  1991-08-27  |  1.1 KB  |  41 lines

  1. ********************************************************************
  2. * TRYPUT.PRG                                          Clipper S87
  3. * Sample program to demonstrate using the put function.
  4. * Prints columns of numbers across the page.
  5. ********************************************************************
  6. SET DEVICE TO PRINT
  7.  
  8. ljsetup()
  9. helv()
  10.  
  11. n = 0
  12. FOR c = 1 TO 75 STEP 5      && Column
  13.     FOR r = 1 TO 65         && Row (line)
  14.         n = n + 1
  15.         x = ALLTRIM(STR(n))
  16.         PUT(r, c, x)
  17.     NEXT
  18. NEXT
  19. SET DEVICE TO SCREEN
  20. EJECT
  21. RETURN
  22.  
  23. FUNCTION put
  24. PARAMETER row, col, text
  25.  ??? CHR(27)+'&a'+ALLTRIM(STR(col))+'C'+CHR(27)+'&a'+ALLTRIM(STR(row))+'R'+text
  26. RETURN .t.
  27.  
  28. FUNCTION ljsetup
  29. ??? CHR(27) + "E"                && Resets Laserjet to front panel defaults
  30. RELEASE lpi, pitch
  31. PUBLIC lpi, pitch
  32. lpi = 6                          && Set up lines per inch
  33. pitch = 10                       && Set up pitch (characters per inch)
  34. RETURN ""
  35.  
  36. FUNCTION helv
  37. PARAMETERS point
  38. ??? CHR(27) + "&l0O" + CHR(27) + "(0U" + CHR(27) + "(s1p" + ;
  39.   LTRIM(STR(point,5,2)) + "v0s0b4T"
  40. RETURN
  41.