#err()

DESCRIPTION
    returns the error value ERR
SYNOPSIS
    #err()
ARGUMENTS
    none
EXAMPLES
        rule    // check validity of fsck pass
                if $fstype eq "ufs"
                        set #fp = #val($fsckpass)
                        if    ( #fp == #err() )
                           || ! =isint(#fp)
                           || #fp !> 0
                                output mail "bad fsck pass: $inlin"
                        fi
                fi
        rule
                =set_hr($inlin)

        ...

        rule    // report corrupted lines, then bypass
                if #hr == #err()
                        output mail $inlin
                        next
                endif
        rule    // for changed scripts, diff and log/mail any changes
                if #popen(DIFF, "=diff $hstfil $fil", "r") != #err()
                        while #read(DIFF) > 0
                                if #doheader
                                        output mail "changes to $fil:"
                                        output log "(L)" "changes to $fil:"
                                        set #doheader = #false()
                                fi
                                output mail $rdlin
                                output log "(L)" $rdlin
                        endwhile
                        do #pclose(DIFF)
                else
                        output mail "can't open process for reading!"
                        quit
                fi
SEE ALSO
    #defined()
    #error()
    #nil()

    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
Learn about the
PIKT.conf
config file