IsEmpty Example

InstallShield 2022 ยป InstallScript Language Reference

/*--------------------------------------------------------------*\

*

* InstallShield Example Script

*

* Demonstrates the IsEmpty function.

*

\*--------------------------------------------------------------*/

 

function OnBegin()

    VARIANT vVariant;

    BOOL bEmpty;

    STRING szString;

begin    

    bEmpty = IsEmpty ( vVariant );  

    /* The message "vVariant is empty." is displayed. */

    if bEmpty then

        MessageBox ( "vVariant is empty." , INFORMATION );    

    else

        MessageBox ( "vVariant is not empty." , INFORMATION );  

    endif;

 

    /* Initialize vVariant. */

    vVariant = szString;

 

    bEmpty = IsEmpty ( vVariant );  

    /* The message "vVariant is not empty." is displayed. */

    if bEmpty then

        MessageBox ( "vVariant is empty." , INFORMATION );    

    else

        MessageBox ( "vVariant is not empty." , INFORMATION );  

    endif;

 

    /* Terminate example setup script. */

    abort;

end;