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

Home » Public Forums » archive » Re: How do I use FORMAT as I would SPRINTF?? Please Help!
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: How do I use FORMAT as I would SPRINTF?? Please Help! [message #32218 is a reply to message #32119] Thu, 19 September 2002 07:41 Go to previous message
Richard Younger is currently offline  Richard Younger
Messages: 43
Registered: November 2000
Member
wmc@bas.ac.uk wrote:
>
> IDL is like FORTRAN, not C.
>

Well, yes. But if you're running, er, 5.4 I think, or later, the FORMAT
keyword supports printf style tokens. Just prepend a % to the format string.

E.g. (nicked from the IDL help files):

PRINT, FORMAT='(%"I have %d monkeys, %s.")', 23, 'Scott'

Look at the bottom of the IDL help topic "Format Codes." The common codes are
all supported.

Now, admittedly, most of us are more familiar with the traditional
FORTRAN-style, so if you post here you may cause some confusion. Do whatever
is the most productive, I say.

Good Luck,
Rich

--
Richard Younger
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Indexing into Structures???
Next Topic: How do I use FORMAT as I would SPRINTF?? Please Help!

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

Current Time: Sun Nov 30 15:08:40 PST 2025

Total time taken to generate the page: 0.79864 seconds