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

Home » Public Forums » archive » Re: FORMAT question
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: FORMAT question [message #27040] Sun, 07 October 2001 23:52 Go to previous message
R.Bauer is currently offline  R.Bauer
Messages: 1424
Registered: November 1998
Senior Member
Paul van Delst wrote:
>
> Reimar Bauer wrote:
>>
>> Paul Manusiu wrote:
>>>
>>> Hi,
>>> Does anyone if its possible to use a function or variable as a parameter
>>> or option to FORMAT ?
>>> ;e.g. if I have
>>> print, blah, FORMAT = '(2(F6.1))'
>>> ; but I want something like this
>>> for var = 0, 10 do $
>>> print, blah[var,*], FORMAT = '(var(F6.1))'
>>>
>>> Any help please will be much appreciated
>>>
>>> Paul M.
>>
>> Dear Paul,
>>
>> this is the first time I am able to give totally the same answer
>> to someone in this newsgroup at the same day. Don't you read others
>> articles?
>
> Actually your reply doesn't directly apply to the problem he's having - i.e. a repreat
> specifier in a format statements - although your software might.
>


I agree, I have not seen this problem. The routine could be useful too
if you don't
know anything about the format of the data.

The online help with the keyword "Format codes" describes much more
formatting codes
and syntax.

Reimar


> In any case, apart from Andrew's solution, I would also try:
>
> IDL> var=2
> IDL> fmt='('+strtrim(var,2)+'(f6.1))'
> IDL> print, fmt
> (2(f6.1))
>
> to avoid the need for _another_ format when outputting var into the format string.
>
> paulv
>
> --
> Paul van Delst Religious and cultural
> CIMSS @ NOAA/NCEP purity is a fundamentalist
> Ph: (301)763-8000 x7274 fantasy
> Fax:(301)763-8545 V.S.Naipaul

--
Reimar Bauer

Institut fuer Stratosphaerische Chemie (ICG-1)
Forschungszentrum Juelich
email: R.Bauer@fz-juelich.de
http://www.fz-juelich.de/icg/icg1/
============================================================ ======
a IDL library at ForschungsZentrum Juelich
http://www.fz-juelich.de/icg/icg1/idl_icglib/idl_lib_intro.h tml

http://www.fz-juelich.de/zb/text/publikation/juel3786.html
============================================================ ======

read something about linux / windows
http://www.suse.de/de/news/hotnews/MS.html
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: IDL 5.4 and win2000 problems: Windows IDLDE crash poll
Next Topic: How to run a exe program?

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

Current Time: Wed Oct 08 19:20:17 PDT 2025

Total time taken to generate the page: 0.00447 seconds