IsBlank Function | |
-- todo --
Determines whether an expression is blank.
Namespace:
XSharp.VFP
Assembly:
XSharp.VFP (in XSharp.VFP.dll) Version: 2.21
Syntax FUNCTION IsBlank(
eExpression
) AS LOGIC CLIPPER
[ClipperCallingConventionAttribute(new string[] { ... })]
public static bool IsBlank(
Usual eExpression = default
)
Request Example
View SourceParameters
- eExpression (Optional)
- Type: Usual
Specifies the expression for IsBlank( ) to evaluate.
eExpression can be a field in a table, a variable or array element, or an expression.
Return Value
Type:
Logic
Logical.
IsBlank( ) returns True (.T.) if the expression eExpression is blank; otherwise,
IsBlank( ) returns False (.F.).
IsBlank( ) returns True (.T.) for fields when those fields contain certain values.
The table below lists the values that field types contain for
IsBlank( ) to return True.
Data type | Values the field contains |
---|
Blob | Empty (0h) or contains only zero bytes, for example, 0h00, 0h000000, and so on |
Character |
Empty string, spaces, or no value, such as a newly appended blank record or cleared with Blank |
Date |
Blank date ({ / / }) or no value, such as a newly appended blank record or cleared with Blank |
DateTime |
Blank datetime ({ / / : : }) or no value, such as a newly appended blank record or cleared with Blank |
Float |
No value, such as a newly appended blank record or cleared with Blank |
General | Empty, for example, no OLE object |
Logical |
No value, such as a newly appended blank record or cleared with Blank |
Memo | Empty, for example, no memo contents |
Numeric |
No value, such as a newly appended blank record or cleared with Blank |
Varbinary | Empty (0h) or contains only zero bytes, for example, 0h00, 0h000000, and so on |
Note |
---|
Expressions with Currency, Integer, or Double type are never blank;
therefore, IsBlank( ) always returns False (.F.) for these expression types.
|
Remarks
To create a blank record, use the Append Blank and Blank commands.
You can also use Blank to clear data from fields in a record.
IsBlank( ) differs from Empty( ) and IsNull( ).
For example, Empty( ) returns True (.T.) if a character expression evaluates to empty, for example,
it contains spaces, tabs, carriage returns, or line feeds.
IsBlank( ) returns True (.T.) if the character expression contains only the empty string ("") or spaces.
Examples 1Create Table mytable FREE (myfield C(20))
2Append Blank
3Clear
4? ISBlank(myfield)
5Replace myfield WITH 'John Smith'
6? ISBlank(myfield)
See Also