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

Home » Public Forums » archive » Re: using an unlnown number of keywords
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: using an unlnown number of keywords [message #27391 is a reply to message #27388] Mon, 22 October 2001 11:20 Go to previous messageGo to previous message
Sean Raffuse is currently offline  Sean Raffuse
Messages: 46
Registered: July 2001
Member
David Fanning <david@dfanning.com> wrote in message
news:MPG.163a5b3f51d8f2ea989719@news.frii.com...
> Sean Raffuse (sean@me.wustl.edu) writes:
>
>> I'm trying to write a more or less universal procedure that takes a data
>> structure and prints the variables out one by one one a line in an ascii
>> file. The problem is that the structure could have any number of
variables.
>> I want to do this:
>>
>> printf, lun, structure.var1, structure.var2, structure.var3, . . .,
>> structure.varN
>>
>> If I know N, is there a way to do this without resorting to N cases?
>
> How about something like this:
>
> numTags = N_Tags(structure)
> PrintF, lun, structure, Format='(' + StrTrim(numTags,2) + 'F10.2)'
>
This would work fine if I didn't have different data types. Strings (of
various lengths) may be mixed with floats and integers. Any other ideas out
there in IDL expert land??

-Sean
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: profiler
Next Topic: Re: Really really long format keywords

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

Current Time: Wed Oct 08 19:01:52 PDT 2025

Total time taken to generate the page: 0.00481 seconds