Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Constants vs Locals
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00269906
Message ID:
00270020
Vues:
32
>I think Jim's answer most closely resembles my thoughts: it's an issue of scope. If you're only going to use the constant value in one place, I'd be tempted to either hard-code it or use a variable. However, the amazing thing about many constants is that they're often needed in lots of places.

Hi Doug - I guess I'm just wondering if I should start using it more, in places other than header files. Sylvain had a good idea for its use. As I said in reply to Jim, I can use a top-level property with exactly the same functionality, and it's available in the debugger (though I *shouldn't* be needing it), as well as the PEM lists (a distinct advantage), so there are a couple of possible advantages of not using a constant. But I hear the constant is faster, also, so though it's not going to make a slow app fast, it has its appeal from that aspect...
The Anonymous Bureaucrat,
and frankly, quite content not to be
a member of either major US political party.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform