Format codes problem [message #47566] |
Thu, 16 February 2006 02:06 |
Klaus Scipal
Messages: 45 Registered: November 1997
|
Member |
|
|
Hi
I have a problem with the format codes. I have to create filenames from two
index arrays. To do this I use the string command with format codes. If I
create the filename for each element of the index array step by step I get
the correct result if I do the operation for the entire array the result is
crap. The code looks like this:
IDL> gi=[1010,1007,1006,1011,1009]
IDL> gj=[509,510, 510,509,509]
IDL> for i=0, 4 do print, String(Format='("g",i4.4,i3.3)',gi[i],gj[i])
g1010509
g1007510
g1006510
g1011509
g1009509
IDL> print, String(Format='("g",i4.4,i3.3)',gi,gj)
g1010*** g1006*** g1009509 g0510510 g0509509
Does anyone know what is going on?
Klaus
|
|
|