Array of BYTARR's [message #9314] |
Tue, 24 June 1997 00:00  |
Wendy Gale
Messages: 3 Registered: June 1997
|
Junior Member |
|
|
Hi,
I'm a new IDL user, and I was wondering if anyone would suggest
an efficient way to make a look up table of byte arrays where the
individual bytarr's are of different lengths. Maybe ptrarr that points
to the bytarr's would be the best way. I didn't know if there was any
other way to make an indexed array of byte arrays.
Thank you.
Wendy
|
|
|
Re: Array of BYTARR's [message #9508 is a reply to message #9314] |
Thu, 10 July 1997 00:00  |
Jim Hamill
Messages: 1 Registered: July 1997
|
Junior Member |
|
|
Wendy Gale wrote:
>
> Hi,
>
> I'm a new IDL user, and I was wondering if anyone would suggest
> an efficient way to make a look up table of byte arrays where the
> individual bytarr's are of different lengths. Maybe ptrarr that points
> to the bytarr's would be the best way. I didn't know if there was any
> other way to make an indexed array of byte arrays.
>
> Thank you.
> Wendy
So long as you only want to do bytes, you can store in strings. For
example:
a = replicate("",3)
a(0) = string(byte([1,2,3,4]))
a(1) = string(byte([21,22]))
a(2) = string(byte([101,102,103,104,105,106,107]))
FOR i=0,2 DO print, byte(a(i))
the result ...
1 2 3 4
21 22
101 102 103 104 105 106 107
--
---------------------------------------
Jim Hamill
hamill@cti-pet.com
CTI PET Systems, Inc.
810 Innovation Drive
Knoxville, TN 37932-2571
(423)966-0072 x278
---------------------------------------
|
|
|