comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » point_lun
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
point_lun [message #19032] Wed, 23 February 2000 00:00 Go to previous message
R.Bauer is currently offline  R.Bauer
Messages: 1424
Registered: November 1998
Senior Member
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
  • Attachment: test.unix
    (Size: 0.12KB, Downloaded 83 times)
  • Attachment: test.dos
    (Size: 0.12KB, Downloaded 78 times)
  • Attachment: error_pointlun.pro
    (Size: 0.39KB, Downloaded 83 times)
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: passing functions as arguments in IDL?
Next Topic: xmanager does not block

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 18:09:16 PDT 2025

Total time taken to generate the page: 0.00750 seconds