Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Idl-pvware > Re: index array...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 9 of 12 Topic 5535 of 6251
Post > Topic >>

Re: index arrays of structures

by David Fanning <news@[EMAIL PROTECTED] > Mar 17, 2008 at 09:03 AM

Reimar Bauer writes:

> Have to say first that is not a solution for your current problem. But
> sometimes you like to know about this too
> 
> You can directly read into pointers
> this examples assumes files of equal filesize (it reads now only one
> file, but you can use [i] for [0] )
> 
> a={data:replicate(ptr_new(bytarr(20996)),4)}
> openr,lun,'example.bin',/get
> readu,lun,*(a.data)[0]
> free_lun,lun
> 
> print, (*(a.data)[0])[0:10] ; prints the first bytes
> 
> You can make the structure more complex if you have to read for example
> records of byte, float and other types. Then you have to define a
> structure with placeholders for these types. You can replicate this
> structure to the number of records. And then the whole file could be
> read at once.

With all due respect to Reimar, this is NOT the kind
of thing you should be laying on a guy who is struggling
to understand the basics of programming! Give the
guy a break. Simple, simple, simple. He can learn the
rest later. :-)

Cheers,

David
-- 
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Se****e ma de ni thui. ("Perhaps thou speakest truth.")
 




 12 Posts in Topic:
index arrays of structures
Raghu <raghuram.narasi  2008-03-15 13:53:47 
Re: index arrays of structures
Vince Hradil <hradilv@  2008-03-15 14:07:08 
Re: index arrays of structures
Vince Hradil <hradilv@  2008-03-15 19:31:19 
Re: index arrays of structures
Raghu <raghuram.narasi  2008-03-15 21:04:57 
Re: index arrays of structures
Vince Hradil <hradilv@  2008-03-16 05:49:23 
Re: index arrays of structures
Raghu <raghuram.narasi  2008-03-16 12:19:00 
Re: index arrays of structures
Vince Hradil <hradilv@  2008-03-16 12:29:43 
Re: index arrays of structures
Reimar Bauer <R.Bauer@  2008-03-17 15:44:07 
Re: index arrays of structures
David Fanning <news@[E  2008-03-17 09:03:48 
Re: index arrays of structures
Raghu <raghuram.narasi  2008-03-17 09:29:55 
Re: index arrays of structures
"R.G. Stockwell"  2008-03-17 11:57:03 
Re: index arrays of structures
Raghu <raghuram.narasi  2008-03-17 13:31:53 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Oct 11 12:46:49 CDT 2008.