Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Default Windows Priner Name in Upper Case
Message
 
 
À
11/12/2001 15:20:42
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00592724
Message ID:
00592917
Vues:
18
>I have taken a look at that article and it looks like a possible solution.
>My question though, is does the set("printer",2)return the printer name is upper case while the aprinters() array is case sensitive? If you were looking for an exact match while scanning through aprinters() it would not be found.
>
>Sue

Yes, that's unfortunate. In VFP7 I believe there is a new parameter added to ascan(). In FoxTalk magazine I saw articles by Doug Henning about VFP7.0 new features. He probably wrote a case insensitive ascan. It might be ever in FoxTalk 2001 March or Feb. 2001 Can you check these issues?

Here is the article:
Language Enhancements in VFP 7, Part 1

Doug Hennig

This article continues Doug Hennig's series on language enhancements in VFP 7, where he discusses enhancements to existing commands and functions.

A little extract from this article:

In VFP 6, we can do something similar, but since we don't have the new capabilities of ASCAN(), we have to use a different approach: We'll use ASCAN() to find the value anywhere in the array, then determine whether it's in the correct column. If not, we'll change the starting element number and try again. ARRAYSCAN6.PRG has almost the same functionality as ARRAYSCAN7.PRG (although it's slower and has more complex code), except support for case-insensitivity—to implement that feature, you'd have to do it via the brute-force method of going through each row in the array and looking for a case-insensitive match in the desired column. Here's the code for ARRAYSCAN6.PRG:


And, yes, I agree, sounds like a not very consistent behavior by MS.
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform