Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Scan ... endscan not working properly
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00411108
Message ID:
00411127
Vues:
13
>>>>Why not...
>>>>
>>>>
>>>>use trial
>>>>go top
>>>>scan
>>>>do case
>>>>    case trial.min_sex = 'F'
>>>>        replace min_f with .t.
>>>>        replace min_m with .f.
>>>>
>>>>    case trial.min_sex = 'M'
>>>>        replace min_f with .t.
>>>>        replace min_m = .f.
>>>>endcase
>>>>endscan
>>>>
>>>
>>>even better...
>>>
>>>repl all min_f with .T. for min_sex = 'F'
>>>repl all min_m with .T. for min_sex = 'M'
>>
>>oops left out two lines
>>
>>repl all min_m with .f. for min_Sex = 'F'
>>repl all min_f with .f. for min_sex = 'M'
>
>Best of all:
>
>repl min_m with .f.,min_f with .t. for min_sex = 'F'
>repl min_m with .t.,min_f with .f. for min_sex = 'M'
>
>** you don't need the scope operator ('all')
>** when using the conditional ('for')

I didn't know that either. Thanks
Rip Ryness
International Falls, MN
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform