IDL | Experiment 3, IDL programming drill

1. The purpose of the experiment

1. Understand the IDL program syntax structure, master the programming method of sequence structure, selection structure and loop structure syntax.
2. Master the use of IDL loop statements, conditional statements and jump statements.
3. Master the invocation of positional and keyword arguments.
4. Familiar with IDL program error handling methods and IDL efficient programming skills.
5. Master IDL object-oriented programming.

Second, the basic requirements of the experiment

  1. Read and master the code in this lab carefully before class.
  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

  1. Place:
  2. time:

4. Experimental conditions

  1. Hardware: PC computer (Windows 10 operating system)
  2. Software: IDL 8.5
  3. Reference materials: textbooks and courseware for class

5. Experiment content

  1. Use of loop statements such as for, foreach, while, repeat, and break, continue, and goto jump statements.
  2. Use of conditional statements such as if, case, and switch.
  3. Writing exercises positional and keyword argument passing and inheritance.
  4. Practice handling various types of IDL program errors
  5. Memory management and runtime optimization
  6. Design and Customization of IDL Object Classes

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. Distinguish between positional parameters and keyword parameters, and pay attention to the transmission form of parameters.

Seven, the main steps of the experiment

1. Use of loop statements such as for, foreach, while, repeat and break, continue and goto jump statements.

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. The use of conditional statements such as if, case, and switch.

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

3. Writing exercises to pass and inherit positional and keyword arguments.

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

4. Practice handling various IDL program errors

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

5. Memory management and runtime optimization

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

6. Design and customization of IDL object classes

insert image description here

Eight, experimental analysis summary

Through this experiment, I fully understood the IDL process and function calls, learned the use of loops and conditions such as for, switch, while, if, as well as the use of break and continue inserted in them, and understood parameters and keywords The difference, and how to optimize the programming code, improve the efficiency of programming and the occupation of memory space, learned how to write object-oriented programming, but there are some deficiencies, the code is not proficient and needs to be strengthened.

Guess you like

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