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

Home » Public Forums » archive » Re: PRINT request for RSI
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: PRINT request for RSI [message #11155 is a reply to message #11070] Fri, 27 February 1998 00:00 Go to previous message
Evilio del Rio is currently offline  Evilio del Rio
Messages: 17
Registered: December 1997
Junior Member
Robert S. Mallozzi wrote:
>
> IDL is a great tool for string manipulation, and I
> frequently use it to generate various files. However,
> it is quite painful to have to invoke the PRINT
> function for every line of output. I think it would
> be extremely useful for IDL to have the capability
> to use the unix shell or perl type of printing,
> where one specifies to print until a certain label.
> For example, in perl I can do
>
> print << EOF;
>
> print stuff
> print more stuff
>
> EOF
>
> As far as I can tell, there is no way to do something
> like this in IDL, is there? Maybe in IDL, something
> like this could be implemented:
>
Hi Robert,

I think that you don't need such a feature. You can do it with the
STRING() function and array printing:

out = [ 'x = '+STRING(X),$
'y = '+STRING(Y,FORMAT='(G9.3)'),$
;..etc
'a string']
;...
out = [out,STRING(morestuff,/PRINT)]
;...
print,out,FORMAT='(A)'

>
> This, I think, would be a great feature.
> On another topic, I would like to see some method
> implemented for commenting out whole blocks of
> code, rather than using ; on every line, or a
> GOTO statement. I can't think of any reason offhand
> what the C commenting contruct /* */ couldn't
> be used. Anyway, just my $0.02 (for today :-)
>
IMHO, the /* */ constuct is not so good and arises some unadvertised
problems
(nesting, continuation lines, pointer syntax). If what you want is to
comment blocks while you are editing a program, maybe you will be
interested in using
some editor like emacs or jed that can do this (and many other things)
interactively.



Cheers,


____________________________________________________________ ________
Evilio Jose del Rio Silvan Institut de Ciencies del Mar
E-mail: edelrio@icm.csic.es URL: http://www.ieec.fcr.es/~evilio/
"Anywhere you choose,/ Anyway, you're gonna lose"- Mike Oldfield
[Message index]
 
Read Message
Read Message
Previous Topic: Function names (was mean and sdev)
Next Topic: qromb error

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

Current Time: Wed Dec 03 16:36:16 PST 2025

Total time taken to generate the page: 1.04310 seconds