RMDIR

IsBlank()

ISBLANK() indicates whether a passed expression is blank, as distinguished from empty.

Usage

lReturnValue = ISBLANK( eExpression )
This function was added in FoxPro 2.6 for dBASE compatibility. It represents an approach that's sort of halfway to real nulls.

Blank is that pristine condition you see for numbers or logicals in a Browse until you actually store some data in that field. Blanks are of limited utility because they can't be distinguished from emptiness for character and date types. With the addition of true nulls in Visual FoxPro, we can't see any reason to use blanks anymore. Even if the possibility of using a four-state logical field is attractive at first, you'll find coding and processing blanks to be far more work than it is worth.

The BLANK command lets you reset fields to blank.

Example

CREATE TABLE Test (cfld C(3), dfld D, nfld N(3), lfld L) * add a record APPEND BLANK ? ISBLANK(cfld)   && returns .T. ? ISBLANK(dfld)   && returns .T. ? ISBLANK(nfld)   && returns .T. ? ISBLANK(lfld)   && returns .T.   * now store empty values in it REPLACE cfld WITH "", ;     dfld WITH {}, ;     nfld WITH 0, ;     lfld WITH .f.   ? ISBLANK(cfld)   && returns .T. ? ISBLANK(dfld)   && returns .T. ? ISBLANK(nfld)   && returns .F. ? ISBLANK(lfld)   && returns .F.

See Also

Blank, Empty(), IsNull()


View Updates

Copyright © 2002 by Tamar E. Granor, Ted Roche, Doug Hennig, and Della Martin. All Rights Reserved.



Hacker's Guide to Visual FoxPro 7. 0
Hackers Guide to Visual FoxPro 7.0
ISBN: 1930919220
EAN: 2147483647
Year: 2001
Pages: 899

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net