Viva Clipper !

Empty()

Advertisements

EMPTY()

Checks if the passed argument is empty.

Syntax

      EMPTY( <xExp> ) --> lIsEmpty

Arguments

<xExp> is any valid expression.

Returns

A logical value. It is true (.T.) if the passed argument is empty otherwise it is false (.F.).

Description

This function checks if an expression has empty value and returns a logical indicating whether it the expression is empty or not.

Note : Characters with ASCII code 9, 10 and 13 always treated as “white spaces”;

Examples

      ? EMPTY( "I'm not empty" )    // .F.

Tests

PROCEDURE Test()
         ? EMPTY( NIL )             // .T.
         ? EMPTY( 0 )               // .T.
         ? EMPTY( .F. )             // .T.
         ? EMPTY( "" )              // .T.
         ? EMPTY( 1 )               // .F.
         ? EMPTY( .T. )             // .F.
         ? EMPTY( "smile" )         // .F.
         ? EMPTY( Date() )          // .F.
         ? EMPTY( {} )              // .T.
         ? EMPTY( {''} )            // .F.
         ? EMPTY( {=>} ) )          // .T.
         ? EMPTY( CHR(8) )          // .F.
         ? EMPTY( CHR(9) )          // .T.
         ? EMPTY( CHR(10) )         // .T.
RETURN

Compliance

Clipper

Files

Library is rtl

Seealso

LEN()

Advertisements

Advertisements