Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Detecting field presence in dbf
Message
De
30/07/2007 09:21:00
 
 
À
29/07/2007 20:10:38
Mike Yearwood
Toronto, Ontario, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Database:
Visual FoxPro
Divers
Thread ID:
01244177
Message ID:
01244538
Vues:
25
Mike,
>It would be fantastic to have some better kind of pre-processor.

Yeah - especially as vfp function overhead is gigantic compared to machine-code compiled languages.

>FieldNumInAlias should just return the field number. I've taken to generating an error when the passed alias doesn't exist.

In most cases an error from the issue will be coming IAC - I sprinkle asserts all over the code but stopped generating special errors. This may be an overreaction to working on a team where they tried to anticipate *every* error and generate handled errors with a nice descriptive text. They did not get much real work done...

>I ask you to consider that if you needed to check for a field's existence and act on that in some way, you would be better off having a IsFieldInAlias because calling FieldNumInAlias would take longer and do things not required by the need.

No argument from me - the base implementation came from Russell. See my answer there

>Having both let's programmers decide which function to call as appropriate.

As these are "near-system-level" I totally agree. Having a function do more than one thing should be an exeption with clear reasons why this path was taken.

regards

thomas
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform