Nothing Special   »   [go: up one dir, main page]

Menu

#736 format differences between 'print' and 'printf'

v1.0 (example)
closed
nobody
None
5
2020-04-15
2020-04-13
No

There seems to be a difference between the format specifications in 'print' and in 'printf' (which is certainly not the case in IDL). Example:
GDL> print,7,8,9,format='(i4,i4,i4)'
7 8 9

GDL> openw,1,'test.txt'
GDL> printf,1,7,8,9,format='(i4,i4,i4)'
GDL> close,1
GDL> $more test.txt
7 8 9

The first case looks fine: there are 3 blanks before the integer, but in the second case the blanks are coming after the integer ... :-(

Is there a reason for the different handling of 'format'?

Thanks!

Thomas

Discussion

  • Sylwester Arabas

    Please note that development of GDL had moved to Github back in 2018.
    Please report the problem on GitHub: http://github.com/gnudatalanguage/gdl/issues/
    Version of GDL used will be very useful to diagnose the issue.
    Thanks,
    Sylwester

     
  • Sylwester Arabas

    • status: open --> closed
     
  • Alain C.

    Alain C. - 2020-04-15

    and I cannot reproduce that with
    GDL> !gdl

     

Log in to post a comment.