ISO/IEC 11756:1999
(Main)Information technology — Programming languages — M
Information technology — Programming languages — M
This International Standard describes the M programming language.
Technologies de l'information — Langages de programmation — M
General Information
Relations
Standards Content (Sample)
INTERNATIONAL
ISOAEC
STANDARD
Second edition
1999-06-01
Information technology - Programming
languages - M
Technologies de I’informa tion - Langages de programmation - M
Reference number
ISO/I EC 11756: 1999(E)
lSO/lEC 11756:1999(E)
Contents
1. Scope . 1
2.Normativereferences .
3.Conformance .
3.1 Implementations
............................................ 2
3.2Programs. .
4.Definitions .
5. Metalanguage description
............................................. 7
6Routineroutine .
6.1 Routine head routinehead
.....................................
6.2 Routine body routinebody
.................................... IO
6.2.1 Level line levelline
........................................ IO
6.2.2 Formal line formalline
..................................... IO
6.2.3Labellabel .
IO
6.2.4 Label separator Is
.........................................
6.25 Line body linebodv
............................................
6.3 Routine execution
.......................................... II
6.3.1 Transaction processing
.................................... 12
6.3.2 Error processing
.......................................... 13
6.4 Embedded programs 14
.......................................
7.Expressionexpr.
..................................................
7.1 Expression atom expratom
................................... 15
7.1 .I Variables
................................................ 15
7.1.2 Variable name glvn
...........................................
7.1.2.1 Local variable name Ivn
..................................
7.1.2.2 Local variable handling.
.................................. 16
7.1.2.3 Process-stack
..........................................
7.1.2.4 Global variable name ovn
....................................
7.1.3 Structured system variable ssvn
............................. 21
7.1.3.1 *$CHARACTER
........................................ 21
7.1.3.2 *$DEVICE 23
.............................................
7.1.3.3 “$GLOBAL
............................................. 23
7.1.3.4”$JOB . 24
7.1.3.5*$LOCK
............................................... 24
7.1.3.6 *$ROUTINE
............................................
7.1.3.7*$SYSTEM
............................................. 25
7.1.3.8 *$Z[unspecified]
......................................... 25
7.1.3.9 ssvns specifying default environments
....................... 25
7.1.4 Expression item expritem
................................... 26
7.1.4.1 String literal strlit
........................................ 26
0 ISO/IEC 1999
All rights reserved. Unless otherwise specified, no part of this publication may be reproduced or
utilized in any form or by any means, electronic or mechanical, including photocopying and
microfilm, without permission in writing from the publisher.
ISO/IEC Copyright Office l Case Postale 56 l CH-1211 Geneve 20 l Switzerland
Printed in Switzerland
0 ISO/IEC lSO/lEC 11756:1999(E)
7.1.4.2 Numeric literal numlit . 27
7.1.4.3Numericdatavalues . 27
7.1.4.4 Meaning of numlit .
7.1.4.5 Numeric interpretation of data . 28
7.1.4.6 Integer interpretation . 29
7.1.4.7 Truth-value interpretation . 29
7.1.4.8 Extrinsic function exfunc . 29
7.1.4.9 Extrinsic special variable exvar
............................. 30
7.1.4.10 Intrinsic special variable names svn .
7.1.4.11 Unaryoperatorunatvop . r.
..........................
7.1.4.12Namevaluenamevalue . 35
7.1.5 Intrinsic function function . 35
7.1.5.1 $ASCII . 36
7.1.5.2 $CHAR
................................................ 37
7.1.5.3$DATA .
7.1.5.4 $EXTRACT . 37
7.1.5.5$FlND. . 38
7.1.5.6 $FNUMBER . 38
7.1.5.7$GET .
7.1.5.8 $JUSTlFY .
7.1.5.9 $LENGTH . 40
7.1.5.lO$NAME . 40
7.1.5.11 $ORDER
............................................. 41
7.1.5.12 $PIECE . 42
7.1.5.13$QLENGTH . 43
7.1.5.14 $QSUBSCRlPT . 44
7.1.5.15 $QUERY . 44
7.1.5.16 $RANDOM . 45
7.1.5.17 $REVERSE . 45
7.1.5.18 $SELECT . 45
7.1.5.19 $STACK . 45
7.1.5.20 $TEXT . 47
7.1.5.21 $TRANSLATE . 47
7.1.5.22$VIEW . 48
7.1.5.23$Z. . 48
7.2 Expression tail exprtail 48
..........................................
7.2.1 Binary operator binarvop .
7.2.1.1 Concatenation operator . 49
7.2.1.2 Arithmetic binary operators . 49
7.2.2 Truth operator truthop 49
......................................
7.2.2.1 Relational operator relation . 49
7.2.2.2 Numeric relations
....................................... 50
7.2.2.3 String relations . 50
7.2.2.4 Logical operator logicalop . 50
7.2.3 Pattern match pattern 51
........................................
8.Commands . 52
8.1 General command rules . 52
8.1.1 Spaces in commands .
8.1.2 Comment comment
....................................... 54
8.1.3 Command argument indirectio n .
8.1.4 Post conditional postcond . 54
8.1.5 Command timeout timeout . 55
8.1.6 Line reference lineref . 55
8.1.6.1 Entry reference entrvref 55
....................................
8.1.6.2 Label reference labelref .
8.1.6.3 External reference externref . 57
. . .
III
0 ISOAEC
lSO/lEC 11756:1999(E)
8.1.7 Parameter passing
........................................
8.2 Command definitions
........................................
8.2.1 BREAK
.................................................
8.2.2CLOSE
.................................................
8.2.3DO .
8.2.4ELSE .
8.2.5FOR .
8.2.6GOTO .
8.2.7HALT mmmmmm==m=m====m=====mmmrnmm~~m~~~~mm~~~~~m~~~mmmm~~
8.2.8HANG
..................................................
8.2.9IF .
8.2.10JOB .
8.2.11KlLL. .
8.2.12LOCK .
8.2.13MERGE. .
8.2.14NEW
..................................................
8.2.15 OPEN
................................................. 69
8.2.16QUl-T .
8.2.17 READ
.................................................
8.2.18SET
...................................................
8.2.19 TCOMMIT
..............................................
8.2.20 TRESTART
............................................. 76
8.2.21 TROLLBACK
...........................................
8.2.22 TSTART
...............................................
8.2.23USE.
.................................................
8.2.24VIEW .
8.2.25WRITE .
8.2.26 XECUTE
...............................................
8.2.27Z
.....................................................
9. Character Set Profile charset
.........................................
lO.Characterset
.....................................................
11. Expression elements
............................................... 81
ll.lNames .
11.2 External routines and names
1 1 .3 Loca I va r i a b I es
. . . . . . . . . .
................................................................
11.3.1 Number of local variables
................................. 81
11.3.2 Number of subscripts
..................................... 81
11.3.3 Values of subscripts
...................................... 82
11.4 Global variables
...........................................
11.4.1 Number of global variables
................................
11.4.2 Number of subscripts
.....................................
11.4.3 Values of subscripts
......................................
11.4.4 Numberof nodes
........................................
11.5Datatypes .
11.6 Number range
............................................
11.7lntegers .
11.8 Character strings
..........................................
11.9 Special variables
..........................................
12.Expressions .
12.1 Nesting of expressions
..................................... 83
12.2Results .
12.3 External references
......................................
. . 84
0 ISO/IEC
lSO/lEC 11756:1999(E)
13 Routines and command lines .
13.1 Command lines .
13.2 Number of command lines
..................................
13.3 Number of commands
..................................... 84
13.4Labels .
13.5 Number of labels
.......................................... 84
13.6 Number of routines .
14 External routine calls
............................................... 85
15 Character Set Profiles
.............................................. 85
16lndirection .
17 Storage space restrictions
........................................... 85
18Process-stack .
19Formats .
19.1 mnemonicspace
.......................................... 86
19.2 controlmnemonic
.......................................... 86
19.3 Parameters .
20Transactionprocessing .
20.1 Number of modifications in a TRANSACT10 N
20.2 Number of nested TSTARTs within a TRANSACTi~ N 1: 1: .
..:I 1: 1: 87
21 Other portability requirements
........................................ 87
22Thebinding. .
22.1 Control-functions with an effect on $X or $Y or both
22.2 Control-functions with an effect on $KEY
... .. ..... . . . .. . . . . . . .. . .. 89
22.3 Control-functions with an effect on $DEVICE
................... 89
22.4 Open-ended definitions .
23Portabilityissues . 91
23.1 Implementation
........................................... 91
23.2 Application
............................................... 91
24Conformance .
AnnexA .
AnnexB .
AnnexC .
AnnexD .
AnnexE .
AnnexF .
AnnexG .
AnnexH .
Index .
V
ISOllEC I 1756: 1999(E) 0 ISO/IEC
Foreword
IS0 (the International Organization for Standardization) and IEC (the International
Electrotechnical Commission) form the specialized system for worldwide
standardization. National bodies that are members of IS0 or IEC participate in the
development of International Standards through technical committees established
by the respective organization to deal with particular fields of technical activity. IS0
and IEC technical committees collaborate in fields of mutual interest. Other
international organizations, governmental and non-governmental, in liaison with IS0
and IEC, also take part in the work.
In the field of information technology, IS0 and IEC have established a joint
technical committee, ISO/IEC JTC I. Draft International Standards adopted by the
joint technical committee are circulated to national b
...








Questions, Comments and Discussion
Ask us and Technical Secretary will try to provide an answer. You can facilitate discussion about the standard in here.