Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Tom Rettigs Library - blank(<exp>) http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 BLANK(<exp>)
 Evaluates an empty value of any data type expression.
 Returns the empty value of <exp>.

 <exp> can be any valid data type, or a specifically defined
 character data type as defined below.

 Type   Returns            Note
 ----   -------            ----------------------------------------
  L     .F.                logical type
  N     0.00               numeric type
  D     '  /  /  '         date type
  C     "..."              char type: LEN(<expC>) blank spaces
  C     "  :  :  "          8 byte,  6 digit time string
  C     "     -    "       11 byte, 10 digit zip code
  C     "(   )   -    "    13 byte, 10 digit telephone
  C     "   -  -    "      11 byte,  9 digit social security number

 Returns unchanged <expC> if not enough memory to allocate for the
 blank return string of a long character-type expression

 * Examples assume an open database file.

 * To permanently delete a record.
 REPLACE Last_name  WITH BLANK( Last_name ),;
         First_name WITH BLANK( First_name ),;
         Address    WITH BLANK( Address )

 * To reuse deleted records
 SEEK BLANK( Last_name ) && find empty key field
 IF .NOT. FOUND()
    APPEND BLANK
 ENDIF

 Useful with REPLACE as a self-maintaining delete algorithm.
 Replacing all fields with blanks means never having to PACK
 your database file.  Simply re-use the blank records before
 appending a new blank record as in the last example.


             Placed in the Public Domain by Tom Rettig Assoc.

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