home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 5 / 05.iso / a / a012 / 1.ddi / CHAP26.EXE / CHP2611.PRG < prev    next >
Encoding:
Text File  |  1991-04-30  |  769 b   |  32 lines

  1. /*
  2.    Listing 26.11 Testing GET Types
  3.    Author: Greg Lief
  4.    Excerpted from "Clipper 5: A Developer's Guide"
  5.    Copyright (c) 1991 M&T Books
  6.                       501 Galveston Drive
  7.                       Redwood City, CA 94063-4728
  8.                       (415) 366-3600
  9. */
  10.  
  11. //───── NOTE: must compile with the /N option!
  12.  
  13. function main
  14. local w := "Press F1 to test type of each GET", x := 0, y := .t., z := date()
  15. set key 28 to testtype
  16. cls
  17. @ 11, 0 get w
  18. @ 12, 0 get x
  19. @ 13, 0 get y
  20. @ 14, 0 get z
  21. read
  22. return nil
  23.  
  24.  
  25. function testtype(p, l, v)
  26. local type := { "Character", "Numeric", "Date", "Logical" } ;
  27.               [at(getactive():type, "CNDL")]
  28. @ 0,0 say "Current variable is " + padr(type, 9)
  29. return nil
  30.  
  31. // end of file CHP2611.PRG
  32.