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 #27056 is a reply to message #27049] Fri, 05 October 2001 08:11 Go to previous messageGo to previous message
Paul van Delst is currently offline  Paul van Delst
Messages: 364
Registered: March 1997
Senior Member
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.

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
[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: Thu Oct 09 06:51:55 PDT 2025

Total time taken to generate the page: 0.87742 seconds