Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Translating C++ FOR cycle into Foxpro code
Message
De
08/12/1997 19:28:19
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00064105
Message ID:
00064555
Vues:
42
Except that the test i % 2 > 0 will always be true... :)

Vlad

>Albert,
>
>I think you've found the final missing piece of the puzzle.
>
>>There seems to be an "off by one error" for the odd/even check. Compare:
>>
>>from length of string to 1
>>
>>>for i = strlen( tempCustStr ) to 1 step -1
>>> ...
>>> if ( i % 2 = 0 )
>>
>>from length of (string - 1) to 0
>>
>>>>for (i = strlen(tempCustStr)-1;i>=0;i--){
>>...
>>>> if (i % 2 == 0) {
>>
>>Therefore in VFP:
>>
>>if ( i % 2 > 0 )
>>
>>Also see Paul Vlad Tatavu's message.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform