comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Using cpp with IDL
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Using cpp with IDL [message #567] Wed, 07 October 1992 12:51
knowles is currently offline  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?
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Notes on CURVEFIT.PRO
Next Topic: Re: Using cpp with IDL

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Thu Oct 09 08:40:51 PDT 2025

Total time taken to generate the page: 0.48028 seconds