Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Artful Two for Clipper 5.0 - Norton Guide http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]

Syntax

ASEEK( pTarget, aArray1, aArray2[, cError_msg ] )

Purpose

Translate input using an array of valid input codes and a parallel array of
translation strings.

Arguments

     pTarget -- item to seek

     aArray1 -- array of codes

     aArray2 -- array of translation strings

     cError_msg -- optional error message to return on no find,
                       else an empty character string

Setup

Declare and fill both arrays. Ensure that VALTYPE( pTarget ) == data type
of aArray1[].

Example

     LOCAL codes  := { "V", "M", "C" }, ;
           xlates := { "Visa", "Mastercard", "Cheque" }

     USE ORDERS
     LIST ACCOUNT_NO, ASEEK( P_TYPE, codes, xlates, "Other" )

Returns

If pTarget matches an element in aArray1[], the parallel string in
aArray2[] is returned. Otherwise a string of blanks, equal in length to
aArray2[1], or cError_msg if passed, is returned.

Side Effects

An undefined array element or target/code type mismatch will cause a crash.

Artful Calls

None.

Source File

AA_ASEEK.PRG

See Also: AVALID() AEXIST() CASE_OF()

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