home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / database / 8954 < prev    next >
Encoding:
Text File  |  1993-01-08  |  1.7 KB  |  56 lines

  1. Newsgroups: comp.databases
  2. Path: sparky!uunet!spool.mu.edu!news.cs.indiana.edu!umn.edu!dell32.ortta.umn.edu!durai
  3. From: durai@ortta.umn.edu (Durai Venkatasubramanian)
  4. Subject: Re: UDF problem in FoxBase+
  5. Message-ID: <durai.123.726545367@ortta.umn.edu>
  6. Lines: 42
  7. Sender: news@news2.cis.umn.edu (Usenet News Administration)
  8. Nntp-Posting-Host: dell32.ortta.umn.edu
  9. Organization: U of Mn
  10. References: <1ikr8sINN5bq@mizar.usc.edu>
  11. Date: Sat, 9 Jan 1993 02:09:27 GMT
  12. Lines: 42
  13.  
  14. In article <1ikr8sINN5bq@mizar.usc.edu> lapworth@mizar.usc.edu (Bill Lapworth) writes:
  15. >From: lapworth@mizar.usc.edu (Bill Lapworth)
  16. >Subject: UDF problem in FoxBase+
  17. >Date: 8 Jan 1993 13:21:32 -0800
  18. >
  19. >* I'm playing with FoxBase+ without a manual (it's coming, but not too
  20. >* soon!) and I can't get a UDF to work in the valid clause.
  21. >*
  22. >* If I run the following code, I get a 'file not found' error message
  23. >* upon exiting the get
  24. >
  25. >height = 100.0
  26. >@ 0,0 clear
  27. >@ 3,1  say "Height in CM: " get HEIGHT valid isok(HEIGHT)
  28. >read
  29. >cancel
  30. >
  31. >function isok
  32. >    parameter value
  33. >return iif( value > 150, .F., .T. )
  34. >
  35. >* I tried moving the UDF isok to it's own .prg file and added the following
  36. >* line at line 1: set procedure to c:\spiro\isok
  37. >* This time I got the error message 'No parameter statement found'
  38. >
  39. >* Anybody got any clues?
  40. >
  41. >
  42. you should set procedure to the program calling the function isok.
  43.  
  44. For example, if function isok is called by program, say, callprg, then the 
  45. first line of the program callprg should be (in your case, the program where 
  46. you have defined height = ...) "set procedure to callprg".
  47.  
  48. set procedure to callprg
  49. height = 99
  50. get height valid isok(height)
  51. read
  52.  
  53. function isok
  54.  parameters value
  55. return something
  56.