Home »
Public Forums »
archive »
Using cpp with IDL
Using cpp with IDL [message #567] |
Wed, 07 October 1992 12:51 |
knowles
Messages: 1 Registered: October 1992
|
Junior Member |
|
|
Has anyone tried to use the C preprocessor to fix some of the
shortcomings of IDL? Here's a few examples of what I have in
mind:
Problem: It's difficult to modify common block definitions which
must appear in each procedure that references the common block.
Solution: Write one definition in a separate file and then
use the #include directive.
Problem: Debugging is awkward, debug code must be commented out
and manually uncommented.
Solution: conditional compilation with #ifdef DEBUG directive.
Problem: There's no way to define symbolic constants or other macros.
Solution: #define directive.
Are there better ways within IDL to do these thing?
If you want to try the C preprocessor the command on my machine is:
"/lib/cpp -P in_file out_file" and for debug add "-D DEBUG" after -P
I usually suffix the editable code with .pre and the compilable
code with .pro. I'm also thinking of developing a library of macros
to extend the language ala RATFOR. Has anybody else done this?
|
|
|
Current Time: Wed Oct 08 19:37:08 PDT 2025
Total time taken to generate the page: 0.00472 seconds