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

AVALID( pTarget, aArray1, aArray2, nRow, ;

nCol[, cErr_msg ] )

Purpose

Verify input against an array and display a translated code.

Arguments

     pTarget -- the item to validate

     aArray1 -- the array of codes to search

     aArray2 -- the array of translation strings

     nRow -- row on which to display the result

     nCol -- column at which to display the result

     cErr_msg -- the error message to display: defaults to "Bad Code"

Setup

None.

Example

     LOCAL codes  := { "S", "M", "L" }, ;
           xlates := { "Small", "Medium", "Large" }, ;
           mWeight := " "

     @ 5, 20 GET mWeight PICTURE "!" ;
             VALID AVALID( mWeight, codes, ;
                           xlates, 10, 20 )

Returns

.T. if pTarget is found in the array of codes, else .F.

Side Effects

Displays in SYSCOLOR( 2 ), either the matching translation, or the error
message ("Bad code" if none was passed).

Artful Calls

BELL, SYSCOLOR

Source File

AA_AVALI.PRG

See Also: AEXIST()

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