From M Programming: A Comprehensive Guide
Chapter 7: Introduction to M Commands
Note to Experienced Programmers
This chapter covers the rudiments of command structures in M, using assignment and I/O statements (SET, KILL, READ, WRITE) as examples. The material is quite straightforward, although M does attach a syntactical significance to spaces that is not found in most other languages. In addition, the special forms of some of these commands might bear review. The summary at the end of the chapter, together with a review of the exercises, should tell the experienced reader if more detailed review is needed.
In the preceding chapters we learned some elements of the vocabulary of M, including operators, variables, and a few functions. Implicit in some of the material already covered was some introduction to the syntax of the language. Chapter 3 gave you enough information on M syntax to allow you to complete the examples in the early part of this text. In this chapter we will focus more on syntax, considering the concept of an M command and how that language element is used with the operators, variables, and functions described in previous sections. At the end of this chapter you will be ready to start writing complete M statements, and you will be well on your way to programming in M.
What is a command?
Consider the following three English sentences:
1. Stop.
2. Open the door.
3. Put the book on the table.
Each sentence is a command,...
Copyright Butterworth-Heinemann 1997 under license agreement with Books24x7

Products & Services
Computer Numerical Control Software (CNC)
Computer numerical control software (CNC) is used to create tool paths for CNC machine control systems, or to turn a personal computer (PC) into a CNC controller.
Programming Languages
Programming languages provide the commands, grammar and syntax for instructing digital devices and computers to perform specific tasks.
CNC Controllers
CNC controllers are used to control machines and processes. They provide capabilities ranging from simple point-to-point linear control to highly complex algorithms with multiple axes of control. CNC controllers are used to retrofit many types of machine shop equipment.
Integrated Development Environment (IDE)
Integrated development environment (IDE) applications are comprehensive programming platforms for authoring, modifying, compiling, deploying and debugging computer software.
Data Mining Software
Data mining software is used to sort large amounts of data and identify or mine relevant information. Applications use advanced search capabilities and statistical algorithms to identify patterns and correlations in a large database, data warehouse, or corpus.

Topics of Interest

Chapter 8: Command Lines and Conditional Tests Note to Experienced Programmers This chapter discusses the format of command lines, and it presents three forms of...

1.1 Introducing the Digital Command Language The OpenVMS operating system is an interactive, virtual memory operating system. When a user logs on the system, OpenVMS creates an environment from...

Chapter 3: Basic Components of M Note to Experienced Programmers Although much of the material in this chapter is probably familiar to individuals who have...

4.2 FORmula TRANslation Languages Students today have many choices of computer languages to use for implementing numerical algorithms. What are the issues that must be addressed in selecting a best...

Part I: M for the Novice Programmer Chapter List Chapter 1: A Brief Introduction to Computers Chapter 2: Introduction to M...