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

Home » Public Forums » archive » Re: unformatted strings (reading)
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: unformatted strings (reading) [message #5718 is a reply to message #5704] Sun, 04 February 1996 00:00 Go to previous messageGo to previous message
immel is currently offline  immel
Messages: 3
Registered: February 1996
Junior Member
immel@gi.alaska.edu (Thomas Immel) wrote:

Thanks for the info and email on this
subject. The external data representation
is just what I needed to know about.

Thanks again
Thomas Immel



> Here's a question for anyone who reads unformatted strings.
> Is there a way to read a whole ,say 10 character, string at once
> in IDL? Here's what is happening to me.

> 1)Open an unformatted idl file and write a silly string like 'stumblefloppy'

> get_lun,unit
> openw, unit, 'silly.dat'
> writeu,unit,'stumblefloppy'
> free_lun, unit

> 2) Try to read the string

> bonk=' ' ; this is the string variable that I read into
> get_lun,unit
> openr, unit, 'silly.dat'
> readu, unit, bonk

> 3) OK, I'm ready to print 'stumblefloppy'!

> print,bonk
> s

> 's' !?!? Just the first character. If I define bonk to be two spaces or three
> spaces then i get 'st' or 'stu' back. I know it's cause each character is 2
> bytes or something like that. Is there any way, other than defining bonk as 13
> blank spaces before reading,
> that I can read this string? Any bright ideas would be appreciated!

> Thomas Immel
> Immel@geewiz.gi.alaska.edu



> P.S. Ken Knighton, whoever he is, is RIGHT ON!
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: LINKIMAGE under hpux
Next Topic: Re: Scientific Notation on Log Plots

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

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

Total time taken to generate the page: 0.00399 seconds