You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I could not yet break down the source of error but it is somehow related to fstat and using it as a return value of a function.
Look this weired example:
openw,1,'erasemelater'
d=1.0
writeu,1,d
close,1
Now lets check the size of that file (the result should be 4 bytes):
bash$ gdl
GDL - GNU Data Language, Version v1.1-42-gc19e3233
GDL> print,printsize('erasemelater')
% Compiled module: PRINTSIZE.
SIZE LONG = -1232656200
-1232656200
GDL>
bash$ gdl
GDL - GNU Data Language, Version v1.1-42-gc19e3233
GDL> print,printsize('erasemelater')
% Compiled module: PRINTSIZE.
SIZE LONG = -1620301640
-1620301640
GDL>
Using the funcion printsize.pro:
function printsize,fname
openr,dev,fname,/get_lun
s=fstat(dev)
size=s.size
help,size
return,size
end
In addition to that behaviour comes that if we put a stop inside the function then the value of size is correct.
The text was updated successfully, but these errors were encountered:
brandy125
changed the title
very weird results when printing fstat results of files
very weird results when printing fstat results of files using a funcion
Feb 5, 2025
Due to an uncorrect diagnostic of why fstat() would halt if the unt was a pipe (only case at the moment: SPAWN, unit=xxx), the FSTAT function was rendered incorrect.
This patch solves all.
I could not yet break down the source of error but it is somehow related to fstat and using it as a return value of a function.
Look this weired example:
Now lets check the size of that file (the result should be 4 bytes):
Using the funcion printsize.pro:
In addition to that behaviour comes that if we put a stop inside the function then the value of size is correct.
Version used:
The text was updated successfully, but these errors were encountered: