Hi
I'd normally use include files only to define datasets, variables, etc. But we have code that uses preprocessors and includes to create and assign a temp-table record, perform a LOOKUP function on a list, etc.
They were used in our application's ABL windows but they've been carried over to the new .NET forms and classes.
Is this good practice or something to avoid?
Thanks
Tung
I agree includes are necessary sometimes (or maybe I didn't know enough to do some coding without resorting to includes) but I avoid them if I can. And I understand using a preprocessor for a constant value, that may be similar to constants that I see in msdn examples.
As I'm at a new company, I'll try to persuade them away from preprocessors and includes where they can be done as methods in the new OO programs. They do use a lot of them so I'm not sure how successful I'll be.
I agree with the gentlemen above me; includes and preprocessors are fine tools, but you should use them with care and certainly not too much. Especially large preprocessor blocks (you can even nest them) can make your life horrible.