gnudatalanguage / gdl

GDL - GNU Data Language
GNU General Public License v2.0
279 stars 62 forks source link

different behaviour between IDL and GDL in formatted output #1138

Open brandy125 opened 3 years ago

brandy125 commented 3 years ago

GDL writes an additional comma at the end if the output is only a single number.

IDL> print,String(FORMAT = '(1(I1, :, ", "))', [1,1])
1,  1
IDL> print,String(FORMAT = '(1(I1, :, ", "))', [1])
1

GDL> print,String(FORMAT = '(1(I1, :, ", "))', [1,1])
1,  1
GDL> print,String(FORMAT = '(1(I1, :, ", "))', [1])
1, 
GillesDuvert commented 3 years ago

Nice finding, a bug!