ISBLANK() Function Provides Additional Null Value Support

Last reviewed: June 26, 1995
Article ID: Q114654
The information in this article applies to:
  • Microsoft FoxPro for Windows, version 2.6
  • Microsoft FoxPro for MS-DOS, version 2.6

SUMMARY

This article describes the new ISBLANK() function, which, along with the new BLANK command, provides additional support of null values.

This information can also be found in FoxPro online Help in the "ISBLANK()" topic.

MORE INFORMATION

ISBLANK(<expr>)

Determines whether or not an expression is blank. Returns - Logical

ISBLANK() returns true (.T.) if the expression <expr> is blank, or false (.F.) if the expression is not blank.

APPEND BLANK and BLANK are used to create a blank record. BLANK can also be used to clear data from fields in a record. ISBLANK() can determine whether or not a field is blank.

The ISBLANK() function is different from the EMPTY() function. For example, EMPTY() returns true if a character expression contains any combination of nulls, spaces, tabs, carriage returns, or line feeds. ISBLANK() returns true only if a character expression contains a null string or spaces.

<expr>

<expr> can be a field in a table/.DBF file, a memory variable or array element, or an expression.

For a field, ISBLANK() returns .T. if the field contains the following values:

   Type            Contents
   ---------------------------------------------------------------------

   Character       Null string or spaces
   Numeric         No value (Newly appended blank record or cleared with
                   BLANK)
   Date            Blank date ({  /  /  })
   Logical         No value (Newly appended blank record or cleared with
                   BLANK)
   Memo            Empty (no memo contents)
   General         Empty (no OLE object)

For a character or date type memory variable, array element or expression, ISBLANK() returns .T. if any of these contain the following values:

   Type            Contents
   ---------------------------------------

   Character       Null string or spaces
   Date            Blank date ({  /  /  })


Additional reference words: FoxDos FoxWin 2.60 foxhelp.dbf foxhelp.hlp
KBCategory: kbprg
KBSubcategory: FxinteropOle


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: June 26, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.