Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
For Each rotation changes type in collection
Message
 
 
À
29/10/2003 06:16:14
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Divers
Thread ID:
00843966
Message ID:
00843999
Vues:
21
That's really cool!! Well...depending on your frame of reference, it may not be. I would guess this has something to do with internal mechanism of collection class. The Enum interface may only deal with datetime as this is supported under COM and simple Date is not.

You should report this at http://support.microsoft.com/default.aspx?scid=/Support/vfoxpro/report/report.asp (link courtesy of David Frankenbach and others).

>When using a for each iteration with a collection, Date-type values get changed to Time-type as shown in the example below !!!
>
>LOCAL loColl, oColl, lnI
>STORE 0 TO lnI
>STORE null TO oColl, loColl
>
>loColl = NEWOBJECT("Collection")
>
>FOR lnI = 1 TO 10
> loColl.Add(DATE()-lnI)
>ENDFOR
>
>FOR EACH oColl IN loColl
> ? VARTYPE(oColl) &&& == Time Type !!!
>ENDFOR
>
>FOR lnI = 1 TO 10
> ? VARTYPE(loColl.item[lni]) &&& == Date Type which is correct !!!
>ENDFOR
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform