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

Home » Public Forums » archive » idl format codes and output files
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
idl format codes and output files [message #58919] Mon, 25 February 2008 10:16
elwood is currently offline  elwood
Messages: 23
Registered: February 2007
Junior Member
Is there a way to use printf and a format code which takes as a
parameter a variable size
width that is calculated prior to calling printf.
Reason why: So that the output file will have pretty formatted
columns.


For example,
Suppose I have a program that prompts for a string.
The program doesnt know ahead of time how long the string will be.

Then I use strlen to find its length
len=strlen(word)

can I do something like the following:

printf,1,word,format='(alen)'
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Numbers from nowhere?
Next Topic: Re: idl format codes and output files

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

Current Time: Wed Oct 08 19:33:31 PDT 2025

Total time taken to generate the page: 0.01094 seconds