Printf array on a single line [message #88143] |
Mon, 24 March 2014 08:54  |
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 #88145 is a reply to message #88144] |
Mon, 24 March 2014 09:01  |
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.
|
|
|