Devices

M言語プログラミングブック [WALTERS1997] から引用

Page 157-159

In order to utilize a resource in MUMPS, first gain access to the resource (ex: make OS call to set up printer), then use the resource, then release the resource for further use by others.

Device types: (not exhaustive, GT.M implementation)

Device Device Type
TRM Terminal or Printer
SD Sequencial disk file
FIFO FIFO
NULL Null devices
PIPE PIPE
SOC Socket devices

MUMPS uses device numbers to access resources and to interface with devices when using the OPEN, USE or CLOSE commands. Implementations vary and device types are not standardized across implementations.

Example of possible device numbers: (UCD MicroMUMPS implementation, example out of date)

Device Device Type
0 User Console
1 Printer
2 Disk File
3 Disk File
4 Disk File
5 External Communications port

Device numbers can be used to access the resource after it has been opened.

Previous topic

Array Sorting

Next topic

グローバル変数

This Page

inserted by FC2 system