Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Adding Do Case in menu code snippet
Message
 
 
À
17/01/1999 12:06:48
Information générale
Forum:
Visual FoxPro
Catégorie:
FoxPro 2.x
Divers
Thread ID:
00176994
Message ID:
00176996
Vues:
33
>Here's what I get from a sample of a book.
>
>STORE 1 TO mchoice
>
>DIMENSION scrollarray(5)
>STORE 'Apples' TO scrollarray(1)
>STORE 'Bananas' TO scrollarray(2)
>STORE 'Limes' TO scrollarray(3)
>STORE 'Strawberries' TO scrollarray(4)
>STORE 'Lemon' TO scrollarray(5)
>
>=ASORT(scrollarray)
>
>@2,2 GET mchoice FROM scrollarray;
> SIZE 7,20 VALID scrollproc()
>
>READ
>PROCEDURE scrollproc
>@12,18 CLEAR
>@12,2 SAY 'Your selection: '
>@12,18 SAY scrollarray(mchoice)
>
>SHOW GETS
>RETURN .T.
>
>
>Is there any possibility to modify the menu to use DO CASE.
>Example,
>
>READ
>
>PROCEDURE scrollproc
>DO CASE
> CASE mchoice = 1
> SAY 'Apple'

I am guessing this is FP 2.x and not VFP. You can code anything you want in the ScrollProc procedure. The code needs to ultimately return either .T. or .F. to the valid clause.
Mark McCasland
Midlothian, TX USA
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform