Q: Why does the following fail to print as expected IDL> a1 = 1 IDL> a2 = 2 IDL> a3 = 3 IDL> print,format='(8a,i02,i08,a3,i02,a4)', "abcdefgh",a1,a2,"ijk",a3,"LMNO.txt" abcdefgh 1 2ijk 3LMNO.txt I expect output like: abcdefgh0100000002ijk03LMNO A: The first format code "8a" is not correct for the desired output. "8a" specifies output for 8 strings. Instead, the correct format code should be "a8". For example: IDL> print,format='(a8,i02,i08,a3,i02,a4)', "abcdefgh",a1,a2,"ijk",a3,"LMNO.txt" abcdefgh0100000002ijk03LMNO
|