It is currently Sun Jul 22, 2018 5:17 am


All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Unit 2 - Lesson 9: Expressions – Indirection
PostPosted: Wed Jun 22, 2011 8:39 am 
User avatar

Joined: Wed Nov 17, 2010 8:37 am
Posts: 136
Real Name: Terry L. Wiechmann
Began Programming in MUMPS: 0- 0-1971
Quote:
You must learn to walk before you can run.

There are two very powerful features of the MUMPS language:
  • Persistent Sparse Arrays
  • Indirection

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.

_________________
Terry L. Wiechmann


Top
Offline Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Theme created StylerBB.net