|Unit 2 - Lesson 9: Expressions – Indirection
|Page 1 of 1|
|Author:||tlwiechmann [ Wed Jun 22, 2011 8:39 am ]|
|Post subject:||Unit 2 - Lesson 9: Expressions – Indirection|
You must learn to walk before you can run.
There are two very powerful features of the MUMPS language:
Every human being who is fortunate enough to go through an educational system encounters points where they must think more abstractly to understand the concepts being taught. A child starts out by learning the number system which is the first level of abstraction. Then they are pushed into another level where they must learn to perform arithmetic operations on those numbers. At another point, the familiar 1+1=2 becomes a+1=2 (symbol use) – another jump in abstraction. If a person pursues the field of mathematics, computer science, etc., they are expected to deal with abstract concepts.
The concept of Indirection requires you to think abstractly. Within MUMPS it is a powerful tool that can be used to write generalized programs. For example, this course is designed to teach you all the language elements needed to write a literal program such as the data entry routine for a Parts Inventory System. The goal is to bring the language elements together to build a simple routine before we jump to another level of abstraction (hence the quote). However, the MUMPS Programming II course is specifically designed to generalize these routines by using the various forms of indirection MUMPS supports.
We will first write a literal version of the data entry routine and then, through iterative steps, we will generalize it to the point where one generalized routine can be used to drive through a table that implements the Parts data entry function. You can then create a data entry table for other applications. The same routine will drive through that table and implement a completely different application. Indirection permits you to separate the data definition from the code and store it in a table.
Indirection made products like File Manager and EsiObjects possible. Without Indirection I cannot image building these development environments.
Indirection can be applied at all levels in life. For example, the inventors of MUMPS worked at the Laboratory of Computer Science at Massachusetts General Hospital. They got a NIH grant to build a medical record system. The technology was primitive at that time. They were faced with writing the system in assembly language. However, instead of doing that, they took the indirect approach and implemented a language that programmers could use to build the system.
Read the lesson on indirection and make sure you generally understand the concept. Do all the direct mode examples. Name, Subscript and Argument indirection should make sense since we have directly or indirectly covered those concepts. Don't worry about Pattern Indirection at this point – we will cover Operators in the next lesson.
|Page 1 of 1||All times are UTC - 8 hours [ DST ]|
|Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group