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

Home » Public Forums » archive » Null terminated strings
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Null terminated strings [message #28677] Mon, 07 January 2002 10:11 Go to previous message
James Kuyper is currently offline  James Kuyper
Messages: 425
Registered: March 2000
Senior Member
I'm reading a string-valued file attribute from an HDF file that was
created using C code. As seems quite reasonable for C programs, the
attribute was written with a length that includes a terminating null
character. When I read it in using IDL, that null character got included
as well. This causes a number of bizarre effects, most notably:

IDL> print,date
2001-10-07
IDL> print,date+'T12:00:00'
2001-10-07'T12:00:0

I can handle this particular case by using strmid(date,0,10), but in
general a file attribute might contain multiple null-delimited strings,
of unknown length. Is there an efficient way of converting such a string
into an IDL string array?
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: WIDGET REALIZATION BUG in 5.5 ?
Next Topic: Re: Spherical Contour Plotting

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

Current Time: Wed Oct 08 17:00:18 PDT 2025

Total time taken to generate the page: 0.00411 seconds