#and()

DESCRIPTION
    returns TRUE if all of a series or logical values or expressions are TRUE (non-zero);
    FALSE otherwise (if one or more logical values or expressions are FALSE or zero)
SYNOPSIS
    #and(x1,x2,...)
ARGUMENTS
    x1,x2,... - a series of logical values, or logical expressions, separated by commas
EXAMPLES
# pikt +C 'output $text(#and(2+2==4,#true(),#isalpha("foo")))'
1

# pikt +C 'output $text(#and(2+2==4,#true(),#isalpha("3")))'
0
server_reboot_period(D, H)        #and((D)==1, (H)>=2, (H)<3)
                if #and(#defined(%piktc_svccnt), #defined(%piktc_svcpid), 
                        %piktc_svccnt == 1, #piktc_svcpid != %piktc_svcpid)
                                output mail "piktc_svc restarted on $sys"
                        endif
        rule    // bogus shell
                if #and(! $shell eq "", ! -e $shell, ! #sysacct, $user !~ "^(=nobody)$")
                        output mail "User $user has nonexistent shell ($shell):"
                        output mail "  $inline"
                endif
SEE ALSO
    #or()
    #true()
    #false()
    #not()
    #if()

    Numerical Functions
    String Functions
 
Home | FAQ | News | Intro | Samples | Tutorial | Reference | Software
Developer's Notes | Licensing | Authors | Pikt-Users | Pikt-Workers | Related Projects | Site Index | Privacy Policy | Contact Us
Page best viewed at 1024x768 or greater.   Page last updated 2019-01-12.   This site is PIKT® powered.
Copyright © 1998-2019 Robert Osterlund. All rights reserved.
Home FAQ News Intro Samples Tutorial Reference Software
PIKT Logo
PIKT Page Title
See how to
report high system
load averages