Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Force 4.0 Reference - verifydate() verifies a date value http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 verifydate()        Verifies a date value
------------------------------------------------------------------------------
 Declaration
   date.hdr

 Syntax
   func logical verifydate extern
   param value date dDate

 Arguments
   dDate is the date to verify.

 Return
   A logical indicating if the passed date is valid.

 Description
   The verifydate() function returns .t. if the passed value represents
   a valid date, else .f. The function is handy to test date values
   entered in a get field together with a valid clause.

 Example
   #define EXAMPLE_DATE
   #include example.hdr

   func logical checkdate
   para value date dTest
   vardef
      logical lValid
   enddef
   lValid := verifydate( dTest )
   if .not. lValid
      @ 12, 15 ?? "Invalid date"
   endif
   return( lValid )
   endfunc
   
   proc Test_verifydate
   vardef
      date dInput
   enddef
   clear
   @ 10, 15 get dInput valid CheckDate( dInput )
   read
   @ 12, 15 ?? "Valid date entered:", dInput
   endproc

   proc main
   Test_verifydate()
   endproc

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson