Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why define constants
Message
From
25/10/2006 10:45:42
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
25/10/2006 10:36:32
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01164235
Message ID:
01164384
Views:
13
>>Not that I like that too much - I was doing that in 2.6 for just two languages, and you simply can't keep something like that in code, you have to have a table with one column per language, and some code to generate .h files from it. Otherwise it becomes quite impossible to find your way around in an editor, once the number of strings surpasses a few screenfuls.
>
>As you observe, it is a nice theoretical solution but far less so in practise.
>And I wonder how easy it is to find an error in the (now hidden from view) "logic" within the 'code'?

And you can do quite weird things... I once had a really messy piece of special manually done report, where I had a lot of fwrite(h,SomeLengthyPrefixExpression+lcText) repeated all over the place. So I did this:
#define push fwrite(h,SomeLengthyPrefixExpression+

push "text 1")
push "text 2")
It reduced the total length of the code by nearly a third, worked great and confused me completely next time I looked at the code.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform