[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

point_lun



Hi,

I have recognized today  point_lun makes differences between files
written on UNIX or DOS
for  following idl version.

** Structure !VERSION, 5 tags, length=40:
   ARCH            STRING    'x86'
   OS              STRING    'Win32'
   OS_FAMILY       STRING    'Windows'
   RELEASE         STRING    '5.3'
   BUILD_DATE      STRING    'Nov 11 1999'


 My very old aix machine did not make a difference if the file is
written for DOS or for UNIX.

 I have attached 2 example files and the testroutine.

The result of the test for windows is:

IDL> error_pointlun,'test.dos'
88 7777 AA           xa        xa
pointer is:          36
value:      11111.1
new position:          66
last position:          36
value:      11111.1

IDL> error_pointlun,'test.unix'
88 7777 AA           xa        xa
pointer is:          31
value:      11111.1
new position:          61
% READF: Input conversion error. Unit: 102, File: test.unix
% Execution halted at:  ERROR_POINTLUN     24 error_pointlun.pro
%                       $MAIN$


On some data files I recognized a byte shift to right.


R.Bauer











88 7777
AA           xa        xa
11111.11     11.99    444.11
22222.22     21.99    555.11
33333.33    331.99    666.12
88 7777
AA           xa        xa
11111.11     11.99    444.11
22222.22     21.99    555.11
33333.33    331.99    666.12
PRO error_pointlun,file


   OPENR, IUN, file, /GET_LUN

   POINT_LUN, IUN, 0

   s=STRARR(2)
   READF,iun,s
   PRINT,s

   POINT_LUN,-iun,bpos
   PRINT,'pointer is:',bpos

   s=FLTARR(1)
   READF,iun,s
   PRINT,'value:',s

   POINT_LUN,-iun,npos
   PRINT,'new position:',npos

   s=FLTARR(1)
   POINT_LUN,iun,bpos
   READF,iun,s
   PRINT,'last position:',bpos
   PRINT,'value:',s

   FREE_LUN,iun

END