home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / database / 6491 < prev    next >
Encoding:
Text File  |  1992-09-01  |  1.5 KB  |  46 lines

  1. Newsgroups: comp.databases
  2. Path: sparky!uunet!munnari.oz.au!metro!cs.uow.edu.au!cc.uow.edu.au!u9048979
  3. From: u9048979@cc.uow.edu.au (glen eastment)
  4. Subject: Re: Help with Clipper5.01!!
  5. Message-ID: <1992Sep2.023355.8221@cc.uow.edu.au>
  6. Keywords: Clipper, Read
  7. Organization: University Of Wollongong
  8. References: <1992Aug29.161928.1@cc.newcastle.edu.au> <1539@rwja.umdnj.edu>
  9. Date: Wed, 2 Sep 92 02:33:55 GMT
  10. Lines: 34
  11.  
  12. green@rwja.umdnj.edu (Cliff Green) writes:
  13.  
  14. >cslib@cc.newcastle.edu.au (DOUGLAS SCOTT) writes:
  15.  
  16.  
  17. >>  Example:    @ 1,1 SAY "Enter first variable:" COLOR "w+/b"
  18. >>          @ 1,20 GET M->var1 PICTURE "XXXX" COLOR "bg+/b"
  19. >>          
  20. >>          IF M->var1 == "TEST"
  21. >>             @ 2,1 SAY "Enter second variable:" COLOR "w+/b"
  22. >>             @ 2,20 GET M->var2 PICTURE "9999" COLOR "bg+/b"
  23. >>              ENDIF
  24. >>          READ
  25.  
  26. >>    All I want to do is to be able to check each variable as it is entered
  27. >>  in the respective field. Is there an easy way?
  28.  
  29. >I haven't actually tried it, but isn't that what the WHEN clause is for?
  30. >(e.g., @ x,y say "Blah" get blah when m->fubar =="TEST")
  31.  
  32. Actually the VALID clause would be better.
  33. WHEN is for pre-validation, but VALID is for post-validation.
  34. Post-validation is handy, because it waits till the user enters the
  35. data in the current get. Pre-validation is handy when determining whether
  36. to activate that get at all.
  37.  
  38. eg. get customer number only if (WHEN) customer number has not allready been 
  39. entered. Check if customer number has been entered correctly (VALID).
  40.  
  41. Cheers!.
  42.  
  43. <GE> a.k.a. u9048979@wampyr.cc.uow.edu.au
  44.  
  45.  
  46.