IDL | Experiment 2, IDL Grammar Fundamentals

1. The purpose of the experiment

  1. Recognize IDL system variables and local variables.
  2. Master the creation and use of commonly used data types and their variables in IDL.
  3. Master the use of IDL operators.

Second, the basic requirements of the experiment

  1. Carefully read and master the code in this lab.
  2. On the computer to practice the operation of this experimental program.
  3. Save and record experimental results, and analyze and summarize.

3. Experiment time and place

4. Experimental conditions

  1. Hardware: PC computer (Windows 10 operating system)
  2. Software: IDL 8.5
  3. References: textbook

5. Experiment content

  1. Compare local and system variables.
  2. Creation and operation of data type variables such as arrays, strings, pointers, objects, structures, linked lists and hash tables
  3. Writing practice the use of common IDL symbols such as mathematical operators, logical operators, relational operators and other symbols

6. Matters needing attention

1. When typing the code, pay attention to the difference between Chinese and English punctuation. All IDL commands are entered in English half-width characters
. 2. Differentiate between arrays, pointers, structures, and objects in c. Summarize and think about the advantages of IDL.

Seven, the main steps of the experiment

1. Compare local and system variables.

insert image description here
insert image description here

2. Creation and operation of data type variables such as arrays, strings, pointers, objects, structures, linked lists and hash tables

(1) Array operation

insert image description here
insert image description here
insert image description here

insert image description here
insert image description here
insert image description here
insert image description here
insert image description here
insert image description here

insert image description here
insert image description here
insert image description here
insert image description here
insert image description here
insert image description here
insert image description here

insert image description here

insert image description here
insert image description here
insert image description here
insert image description here
insert image description here
insert image description here

insert image description here
insert image description here
insert image description here
insert image description here
insert image description here
insert image description here
insert image description here

(2) String operations

insert image description here
insert image description here

insert image description here
insert image description here
insert image description here
insert image description here

insert image description here
insert image description here
insert image description here
insert image description here
insert image description here
insert image description here
insert image description here
insert image description here
insert image description here
insert image description here
insert image description here
insert image description here
insert image description here
insert image description here
insert image description here

(3) Pointer

insert image description here
insert image description here
insert image description here
insert image description here
insert image description here

insert image description here

(4) Structure

insert image description here

insert image description here
insert image description here
insert image description here

insert image description here

3. Write and practice the use of common IDL symbols such as mathematical operators, logical operators, relational operators and other symbols

insert image description here
insert image description here
insert image description here
insert image description here
insert image description here
insert image description here
insert image description here
insert image description here
insert image description here
insert image description here
insert image description here
insert image description here
insert image description here
insert image description here

insert image description here
insert image description here
insert image description here

Eight, experimental analysis summary

Through this experiment, I learned that in IDL, arrays can directly participate in operations, unlike some other programming languages ​​that can only be implemented through loops, this change in IDL speeds up the operation of arrays, making the work easier, Efficient; when sorting an array using sort(), the output is only the subscript of the sorting, not the specific value of the array when sorting. To output the specific value, a similar arr[sort(arr)] structure should be used; the basic Grammar is the most basic thing to learn a programming language, just like pinyin and a single word in language learning, only by truly mastering the grammar can you build a good program.

Guess you like

Origin blog.csdn.net/chengzilhc/article/details/104805101