Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
About CDOW()
Message
De
01/11/2002 13:17:29
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
01/11/2002 13:06:10
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00717593
Message ID:
00717929
Vues:
15
>I know what you are saying. The point I am making is that the defines would be used throughout your code, could be 20 different locations, by renaming the turkish.h to phrases.h and recompiling you would have Turkish days and months. By renaming german.h to phrases.h, you would have German days and months. Your hard coding would require you to search ALL of your code for the 20 different locations where you were using Turkish and rename it to the German equivalent and recompile. In a worse case scenario, you would need to have two copies of your source code to maintain. In my case, I would only need to rename a file and recompile the application. Of course if your audience is only Turkish, your solution works fine.

My audience is obviously more American than Turkish but that doesn't matter.
You're missing the point that code is in a class. A header file is only as good at compile time. It'd still need a rename and a recompile :( I would never do that just for language selection.
Presented 'class' only needs to add a method that'd get the current language (from control panel maybe or from a plain config file or registry or whatever) and return corresponding days,months list to builder (it was init there). IOW it's a simple Languages[Language,Days,Months] addition to class. No recompile. Even going further class could use winAPI to get those lists from windows itself or it could be table serving as a dictionary.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform