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

Home » Public Forums » archive » Re: Defining IDL structures given variable type, width and precision
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: Defining IDL structures given variable type, width and precision [message #54073 is a reply to message #54061] Wed, 16 May 2007 20:24 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Jonathan Greenberg writes:

> Is there a trick to defining an IDL structure with the appropriate
> variable types given that type, width and precision of each variable?
> I am extracting data from a .dbf file, then using the envi_write_dbf
> command to basically copy the dbf file, but I'm running into problems
> with a string field in the original DBF that appears to be longer than
> simply assigning that field during the create_struct portion to be '',
> e.g.
>
> structure=create_struct(structurename:'') <- how would I assign that
> if I know the type is "7" (string), width=43, precision=0

Strings in IDL can be any "width", so this must be a .dbf file
requirement. It is probably better to save the string as
a byte array, in this case, and convert to and from a string as
needed.

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Previous Topic: Re: exposing variables to higher program levels
Next Topic: why I can't use the max memory available?

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

Current Time: Tue Apr 14 11:26:12 PDT 2026

Total time taken to generate the page: 3.11582 seconds