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 #54061] Thu, 17 May 2007 07:07 Go to previous message
Vince Hradil is currently offline  Vince Hradil
Messages: 574
Registered: December 1999
Senior Member
On May 16, 10:24 pm, David Fanning <n...@dfanning.com> wrote:
> 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.")

or maybe structure =
create_struct(stucturename:string(bytarr(43)+byte(32))) ? (for
example, If you want just spaces)
[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: Sat Oct 11 15:28:16 PDT 2025

Total time taken to generate the page: 1.12116 seconds