Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- RLIB 3.0a Reference - <b>function:</b> notempty() http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Function:    NOTEMPTY()

Purpose:     Generic function to validate that data was entered in a field

Syntax:      NOTEMPTY( expression )

Arguments:   expression  - An expression of any type to test if is EMPTY()


Returns:     True if <expression> is NOT an empty value.

Description: NOTEMPTY() is usually used in the VALID clause of an @
             READ...  GET...  VALID statement to force data entry in the
             GET field.  NOTEMPTY() simplifies this chore and provides a
             consistent generic error message when all that is needed is a
             prompt that the field may not be blank.

Notes:       All NOTEMPTY() does is call the EMPTY() function to test if
             <expression> is empty.  However, NOTEMPTY() goes one step
             further by packaging a BOXASK() error message if EMPTY()
             returns True.  The error message is as follows:

                         +--------------------------------------+
                         |                                      |
                         |     This field may not be blank!     |
                         |      Press any key to continue       |
                         |                                      |
                         +--------------------------------------+

             NOTEMPTY() will also BUZZ(), then the BOXASK() message will
             timeout after three (3) seconds.

             The message is displayed in color IF(ISCOLOR(),"W+/R","N/W")

Example:     *-- set up a READ requiring all fields to be entered
             @ 1,0 SAY "Full name:" GET name    VALID NotEmpty(name)
             @ 2,0 SAY "Address:  " GET address VALID NotEmpty(address)
             READ

Source:      RL_NOTEM.PRG

See also:    ANYCHARSIN(), BUZZ(), ISFIELD()

See Also: ANYCHARSIN() BUZZ() ISFIELD()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson