Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ verify(3C) — DG/UX 4.00

Media Vault

Software Library

Restoration Projects

Artifacts Sought



                                                               verify(3C)



        _________________________________________________________________
        verify                                                   function
        Determine if one string contains a character that is not in the
        other.
        _________________________________________________________________


        Calling Sequence

        char *string1, *string2;
        int verify(), offset;
        offset = verify(string1, string2);


          where   string1 and string2 are pointers to character
                  strings ending in the null character ( 00).



        Description

        Use the verify function to determine if one character string
        contains a character that the other does not.


        Returns

        The value of offset is -1 if all of the characters in string1 are
        also in string2. Otherwise, the value is the offset of the first
        character in string1 that is not in string2.


        Related Functions

        The verify function has no related functions.


        Example

        /* Program test for the verify() function */

        int  offset, verify();

        main(argc, argv)
        int    argc;
        char  *argv[];
        {
            offset = verify(argv[1], argv[2]);
            if (offset == -1)
                printf("'%s' contains all of '%s'\n",
                       argv[1], argv[2]);



        DG/UX 4.00                                                 Page 1
               Licensed material--property of copyright holder(s)





                                                               verify(3C)



            else
                printf("Offset in '%s' is %d.\n",
                       argv[1], offset);
        }

        A call to the program test with

        x test philosophy philosopher

        generates the output

        Offset in 'philosophy' is 10.










































        DG/UX 4.00                                                 Page 2
               Licensed material--property of copyright holder(s)



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026