Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Clipper Tools One Guide - <b>posdiff()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
POSDIFF()

Syntax:     POSDIFF(<expC1>,<expC2>)

Arguments:  <expC1> and <expC2> are two strings which are
            compared with each other.

Returns:    A numeric value.
            POSDIFF() supplies the first position where <expC1> and
            <expC2> differ from each other.

Usage:      It is possible to use this function to compare two strings and
            return the position in which they differ.

Notes:      The function will return a 0 if both strings are the same.  It
            is also possible to compare strings of different lengths (see
            examples).

Library:    CT1.LIB


--------------------------------- Example ------------------------------

Examples:   * Two strings of equal length are compared.
            string1 = "XZ3AB$/A"
            string2 = "XZ3A8$/A"

            ? POSDIFF(string1,string2)                  && Result: 5

            * It is also possible to compare two strings
            * of different lengths.
            ? POSDIFF("AB","ABC")                       && Result: 3



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