Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Functions working different
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00627626
Message ID:
00628595
Vues:
18
>>>>>>I just started upgrading to VFP 7.0 from 5.0a.
>>>>>>
>>>>>>The first problem I ran into was adir() working different, and it's not listed as a function that works different.
>>>>>>
>>>>>>It occured to me that maybe the list of differences was referring ONLY to how they work different from VFP 6.0 which I never used.
>>>>>>
>>>>>>Is there a list somewhere that has all the commands and functions that work different between 6.0 and 5.0?
>>>>>
>>>>>In help file they're documented under "Getting started\What's new..".
>>>>>However per adir() only another parameter is added. W/o that last parameter AFAIK it works the same way from fox2x and later.
>>>>>Cetin
>>>>
>>>>All I can find is "Behavior Changes since the Previous Version" (changes since 6.0), but I don't have 6.0, so I don't know what changed for 6.0. I'm trying to find behavior changes from 5.0 to 6.0.
>>>>
>>>>Per adir(), in 5.0:
=adir( laArray, <DirectoryName> + '*', 'D' )
produces ONLY directory names dispite the fact that the help file says that it will produce files AND directories. In 7.0 it behaves as the help file says.
>>>
>>>In this case, the behavior hasn't changed. The reason that you're getting only directories (and possibly not all of them) is that you're getting only items without extensions. The "D" parameter is inclusive, not exclusive. In order to get only directories, you pass an empty string as the file skeleton. If you add a sub-directory with and extension to the parent, it won't be returned in your example.
>>
>>Funny, I never noticed that before, but the behavior HAS changed.
>>
adir( array, '*', 'D' )
produces different results in 5.0 and 7.0 from the same directory. In 5.0 it produces only NON-EXTENSION names, but in 7.0 it produces ALL names.
adir( array, '*.*', 'D' )
works the same in both versions.
>
>It's different because it changed in 6.0, not 7.0. Going all the way back to 2.0, however,
= ADIR(a_dir, "", 'D')
was the method used to retrieve only directorties. What this requires, of course, that you set the desired folder as the default (and naturally restore the original). However, since most directories didn't have extensions, people found that simply passing the path with a wildcard for the primary portion of the name would work as well. The documentation, however, never said to do it that way.


This is what I was originally looking for. I never used 6.0 and the documentation ONLY shows changes in behevior between 6.0 and 7.0. I'm looking for a list of behavior changes in 6.0.
Bill Morris
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform