Update [ was Re: Is there a way to use C++ code in IDL ] [message #34144] |
Tue, 25 February 2003 11:20 |
CelticBlues
Messages: 10 Registered: February 2003
|
Junior Member |
|
|
Here is an update: I bit the bullet and wrote some IDL code to parse the
data file and chose to stay away from trying to reuse C++ code in IDL via
DLM or whatever. I haven't completely re-written the parser using IDL, I
have written enough to extract the data I really needed, though. I am glad
this is the route I chose because after extracting the data, IDL made it
much simpler to do some analysis etc. in a few minutes or maybe an hour,
that would have taken a week or more to write and test in C++. So, In a
way, I guess everyone was right with their suggestions: It took more than 5
minutes, but was worth it. For larger bits of code that I have already
tested in C++ I will go the DLM route to reuse the code in IDL. Thanks to
Rick Towler for getting me started with his code examples...
Ed
A new IDL convert...
"CelticBlues" <idluser@celticblues.com> wrote in message
news:v5aa3bf5g7219a@corp.supernews.com...
> For me, it would be ideal, if I could do everything in IDL...but I don't
> work in an ideal world... So I think your suggestion of an intermediate
file
> written by the original parser is probably the way to go, although I still
> have the IDL parser on the back burner. That will give me a fall back, if
I
> can't get an ascii reader written in IDL by dinner time (as David Fanning
> suggests :-)....
>
> Thanks to everyone for the comments,
> Ed
>
> "Paul van Delst" <paul.vandelst@noaa.gov> wrote in message
> news:3E552256.3BF2399F@noaa.gov...
>> CelticBlues wrote:
>>>
>>> It's a fairly complex ascii file, the parser of which I did not write
>>> myself. Combine the complexity, with the fact that I didn't write the
>>> original parser, and I feel more comfortable reusing the code, than
>>> rewriting it in IDL, which I just started using yesterday. Maybe as I
> learn
>>> more about IDL, I'll write a parser in IDL, but until then....
>>
>> I'm not being flippant when I say this may be a good opportunity to
learn
> IDL - and
>> understand more about your data file/structure. Assuming you have the
> luxury of time.
>>
>> Otherwise, why not use the C++ parser to read the file and write some
> simple little C++
>> program to output the structure in some really simple format that would
> take "5 minutes"
>> to write a parser for to read into IDL? (Here I'm assuming all you want
to
> use IDL for in
>> this case is plot the data)
>>
>> paulv
>>
>>
>>>
>>> Thanks for the info,
>>>
>>> Later,
>>> Ed
>>>
>>> "David Fanning" <david@dfanning.com> wrote in message
>>> news:MPG.18bec429c19cf041989af0@news.frii.com...
>>>> James Kuyper (kuyper@saicmodis.com) writes:
>>>>
>>>> > That depends entirely on how complicated the syntax that it parses
> is.
>>>> > If he's worried about the recoding effort, I doubt that the
parsing
> is
>>>> > simple enough to be a 5 minute job in IDL. With all due respect to
> IDL,
>>>> > most things that can be parsed correctly by a 5-minute IDL program
> have
>>>> > a fairly simple syntax.
>>>>
>>>> Perhaps I exaggerated a little. (It's been known to happen.)
>>>> But I stand by my "orders of magnitude" comment. :-)
>>>>
>>>> Cheers,
>>>>
>>>> David
>>>>
>>>> --
>>>> David W. Fanning, Ph.D.
>>>> Fanning Software Consulting, Inc.
>>>> Phone: 970-221-0438, E-mail: david@dfanning.com
>>>> Coyote's Guide to IDL Programming: http://www.dfanning.com/
>>>> Toll-Free IDL Book Orders: 1-888-461-0155
>>
>> --
>> Paul van Delst
>> CIMSS @ NOAA/NCEP/EMC
>> Ph: (301)763-8000 x7274
>> Fax:(301)763-8545
>
>
|
|
|