IDL structures array
来源:互联网 发布:淘宝挖宝酱 假货 编辑:程序博客网 时间:2024/05/23 10:11
Creating an Array of Structures
The easiest way to create an array of structures is to use the REPLICATE function. The first parameter to REPLICATE is a reference to the structure of each element. Using the example in Examples of Structure References and assuming the STAR structure has been defined, an array containing 100 elements of the structure is created with the following statement:
cat = REPLICATE({star}, 100)
Alternatively, since the variable A contains an instance of the structure STAR, then
cat = REPLICATE(A, 100)
Or, to define the structure and an array of the structure in one step, use the following statement:
cat = REPLICATE({star, name:'', ra:0.0, dec:0.0, $
inten:FLTARR(12)}, 100)
The concepts and combinations of subscripts, subscript arrays, subscript ranges, fields, nested structures, etc., are quite general and lead to many possibilities, only a small number of which can be explained here. In general, any structures that are similar to the examples above are allowed.
It is now possible to concatenate anonymous structures as long as they have the same field sizes and types. That is to say, they do not even have to have the same field names. For example, consider this code, written in IDL 6.2.
IDL> a = {Name: 'Larry', Age: 46} IDL> b = {LastName: 'Henderson', No_of_Dogs: 4} IDL> c = [ a, b] IDL> Help, c C STRUCT = -> Array[2]
IDL> a = b
IDL> Help, a, /str
a = {LastName: 'Henderson', No_of_Dogs: 4}
- IDL structures array
- IDL array subscript
- Array of Structures vs Structure of Arrays
- Pythonic Data Structures and Algorithms(Array 1)
- Pythonic Data Structures and Algorithms(Array 2)
- Pythonic Data Structures and Algorithms(Array 3)
- Pythonic Data Structures and Algorithms(Array 4)
- IDL
- IDL
- IDL
- IDL
- Data.Structures.For.Game.Programmers.PART2.Basics.3.Array
- Data Structures (Weiss) Chapter 3: The Queue ADT, Array
- Model Tree Structures with an Array of Ancestors
- double-array trie c代码 - a efficient implementation of trie structures
- Why do some structures end with an array of size 1?
- OPCCOMN.IDL
- IDL是什么?
- Eclipse开发android问题 - admob广告
- 关于unity中 使用Protorbuf-net 序列化对象(iphone)
- Tinyxml-2源码学习
- NFC支持所有类型的卡的读取
- CoreGraphics画线
- IDL structures array
- C++标准转换运算符const_cast
- DICOM医学图像处理:Orthanc Plugin SDK实现WADO服务
- java代码设计原则
- SVM推荐阅读文献及博客
- c#初体验
- dhcpd.conf 详解
- 杭电DP题库及解题思路
- CentOS 5.10 32位下安装配置redis