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>strswap()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
STRSWAP()

Syntax:     STRSWAP([@]<expC1>,[@]<expC2>)

Arguments:  <expC1> and <expC2> are the strings to be interchanged.
            At least one of the strings must then be specified by
            reference.

Returns:    A character string.
            A null string is always returned.  This function will only
            change strings that have been transfered by reference.

Usage:      STRSWAP() interchanges the <expC1> and <expC2> strings.
            The change will continue all the characters of the
            shorter string have been removed, i.e.  the function will
            terminate when the last character of the shortest string has
            been swapped.

Notes:      The string is changed directly.  Hence at least one of the
            strings must be specified by reference in order to obtain
            a result.

Library:    CT1.LIB


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

Examples:   * Two strings passed by reference.
            str_n = "1234567890"
            str_a = "ABCDEFGHIJKLM"
            ? STRSWAP(@str_n,@str_a)            && The return value ""

            * The two strings will then recieve:
            str_n                               && "ABCDEFGHIJ"
            str_a                               && "1234567890KLM"

            * When only one of the strings is passed
            * by reference.
            str_n = "1234567890"
            str_a = "ABCDEFGHIJKLM"
            ? STRSWAP(@str_n,@str_a)            && The return value ""

            * The two strings will then recieve:
            str_n                               && "1234567890"
            str_a                               && "1234567890KLM"




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