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

CASE_OF( pTarget, aCodes, aExpansions )

Purpose

Check if an item is in a set of values, and return a translation.

Arguments

     pTarget -- item to check

     aCodes -- codes to translate

     aExpansions -- translations

Setup

Both arrays must exist and be filled with appropriate data.

Example

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

     USE ORDERS
     LIST ACCOUNT_NO, CASE_OF( P_TYPE, codes, xlates )

Returns

Parallel array element from aExpansions if pTarget is in aCodes,
else SPACE(0).

Side Effects

Crash if arrays are undeclared or undefined.

Artful Calls

None.

Source File

ARTFUL.CH

See Also: AVALID() AEXIST() ASEEK()

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