REBOL Document

Empty? - Function Summary


Returns TRUE if a series is at its tail.


empty? series


series - The series argument. (must be: series port bitset)


This is a synonym for TAIL? The check is made relative to the current location in the series.

    print empty? []

    print empty? [1]

The EMPTY? function is useful for all types of series. For instance, you can use it to check a string returned from the user:

    str: ask "Enter name:"
    if empty? str [print "Name is required"]
    Enter name:

It is often used in conjunction with TRIM to remove black spaces from the ends of a string before checking it:

    if empty? trim str [print "Name is required"]


found? - Returns TRUE if value is not NONE.
none? - Returns TRUE for none values.
tail? - Returns TRUE if a series is at its tail.

<Back | Index | Next>

Copyright 2004 REBOL Technologies