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

Home » Public Forums » archive » Printf array on a single line
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
Printf array on a single line [message #88143] Mon, 24 March 2014 08:54 Go to next message
drew.ciampa is currently offline  drew.ciampa
Messages: 2
Registered: March 2014
Junior Member
This may seem like a simple question so I apologize if it is.

I'm trying to write an array onto a single line in a text document. When I do

array=[1,2,3,4,5]
printf, array

I get an error saying it must be a scalar or an array of 1 element. There must be a way to write an array with say 5 columns on the same line right? I thought about a loop to run through each subscript, but that would print them on separate lines. How simple is this which Im obviously missing


Thanks
Drew
Re: Printf array on a single line [message #88144 is a reply to message #88143] Mon, 24 March 2014 08:59 Go to previous messageGo to next message
Phillip Bitzer is currently offline  Phillip Bitzer
Messages: 223
Registered: June 2006
Senior Member
You're missing an argument....

http://exelisvis.com/docs/PRINT.html
Re: Printf array on a single line [message #88145 is a reply to message #88144] Mon, 24 March 2014 09:01 Go to previous message
drew.ciampa is currently offline  drew.ciampa
Messages: 2
Registered: March 2014
Junior Member
On Monday, March 24, 2014 11:59:26 AM UTC-4, Phillip Bitzer wrote:
> You're missing an argument....
>
>
>
> http://exelisvis.com/docs/PRINT.html

Im sorry it is:

printf,lun, array

I was thinking maybe I'd create a structure and fill in the columns with the arrays columns, but what happens when I have arrays that vary in element sizes? How do I have my structure adjust to that.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: How to output two images on the widget
Next Topic: multi-threaded IDL programming

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

Current Time: Wed Oct 08 15:37:07 PDT 2025

Total time taken to generate the page: 0.00487 seconds