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

Home » Public Forums » archive » Wave 5.x DC_READ_FREE bug
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Wave 5.x DC_READ_FREE bug [message #6010] Fri, 12 April 1996 00:00
howie is currently offline  howie
Messages: 5
Registered: May 1994
Junior Member
Wave users,

There is an nasty little bug in Wave 5.0 that occurs when using DC_READ_FREE
with the NSKIP switch more than once in a routine. Its nasty, because the
resulting arrays are longer than the input data, ie., it creates data.
The error occurs under Ultrix and Sun OS - probably all platforms.

*** The bug has been squashed in V6.0, another reason to upgrade if you can.
ULTRIX users are frozen at V5.0 :-( .
IF YOU ARE ALREADY RUNNING V6 - NO NEED TO READ ON.

The bug, in its simplest form, is illustrated below.
Cut the two short data sections below into separate files and run the following
two lines of code.
---------
st = dc_read_free('h01.top',a,b,c,/col,nskip=2)
st = dc_read_free('h02.top',d,e,f,/col,nskip=2)

h01.top contains the following 5 lines.
one
two
0.143 0.212 0.225
0.188 0.135 0.295
0.164 0.290 0.257

h02.top contains the following 4 lines.
one
two
0.073 0.122 0.112
0.318 0.604 0.493
---------

The "info" command gives,

A FLOAT = Array(3)
B FLOAT = Array(3)
C FLOAT = Array(3)
ST LONG = 0
D FLOAT = Array(3)
E FLOAT = Array(3)
F FLOAT = Array(2)

But, D,E,F should be all be FLOAT = Array(2)

print,A --> 0.143000 0.188000 0.164000
print,B --> 0.212000 0.135000 0.290000
print,C --> 0.225000 0.295000 0.257000
print,D --> 0.0730000 0.31800 0 290.000 < bogus
print,E --> 0.122000 0.604000 0.257000 < bogus
print,F --> 0.112000 0.493000

The number of additional values is determined by the difference in the
number of lines in the input data files.
-
If I understand what VNI technical support is telling me, the problem
is that V5's DC_READ_FREE routine is not reentrant. That is, some of
the internal variables are not reset each time the routine is entered
when the NSKIP switch appears in the argument list. And since the
internal variables are not available to the user, as some system variables
are, there is no fix. They recommend using the READ routines instead
of DC_READ_FREE when reading multiple files.

---
Work-arounds - (ones that still employ dc_read_free).

1) If you read the smaller data files first, DC_READ_FREE works fine.
(RESIZE doesn't apply here because the variables are distinct).

2) Delete the text lines from the top of each file and don't use NSKIP.
Also not generally practical.

3) Skip the text lines by using IGNORE=["TEXT_IN_NUMERIC"] instead of NSKIP.
ex: st = dc_read_free(fname,a,b,c,/col,ignore=["text_in_numeric"])
This is the best work-around for the problem at hand.

-----
PLEA: ULTRIX users. Send a short note to VNI support@boulder.vni.com
asking them to produce and support V6.0 for ULTRIX. They might
just do it! (Yeah,right. Expect Netscape, F90, and Ultrix 5.5 the same
day).
Send the note anyway - ok?
[Message index]
 
Read Message
Previous Topic: TLE
Next Topic: [Q] how to make mpeg/fli movies in IDL

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

Current Time: Fri Oct 10 08:35:40 PDT 2025

Total time taken to generate the page: 1.20000 seconds