Article View: comp.std.mumps
Article #10$WRITE FUNCTION PROPOSAL FOR MDC
From: BROWN%FORUM.VA.GOV
Date: Thu, 23 Apr 1987 23:28
Date: Thu, 23 Apr 1987 23:28
56 lines
2366 bytes
2366 bytes
PROPOSAL FOR $WRITE FUNCTION
By: David B. Brown, COMP Consultants, MGlobal
Many times it is desirable to generate pre-formatted text into
MUMPS globals. Currently this must be done by concatenation of
various items or use of a non-standard "pipe" and write to one
device and read from the corresponding device.
The situation will become more accentuated if we proceed with the
device handling proposals.
The following proposal allows capture of output sequences for all
arguments of a WRITE command. These include format arguments
such as tab (?) and CRLF (!) as well as future items such as
/CUP:y:x to position the cursor.
Note that any limitations on the WRITE command (e.g. device
doesn't allow cursor positioning), would also be true of the
$WRITE function.
PROPOSAL:
add in section 1.2.7:
$WRITE returns a string
add in section 3.2.8:
$WRITE({U}L{u} {U}writeargument{u})
returns the processed results of the {U}writeargument{u}s. Each
{U}writeargument{u} is processed one at a time, in left-to-right
order. Each form of argument defines an output operation to the
accumulating result. The particular character output sequences
generated by each {U}writeargument{u} is the same as would be
output to the current I/O device as specified in section 3.6.18.
change the first paragraph of 3.5.4 to read:
3.5.4 {U}format{u} in READ and WRITE
The {U}format{u}, which can appear in READ and WRITE commands and
in the $WRITE function, specifies output format control. The
parameters of {U}format{u} are processed one at a time, in left-
to-right order.
EXAMPLES:
S ^XXX(I)=$WRITE(#!?20,"THIS IS A HEADING",!)
S ZZZ=$WRITE(/CUP:12:22,"Put this in the middle of the screen")
Technical Details
Message-ID:
<1730@plus5.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!clyde!rutgers!husc6!seismo!plus5!BROWN%FORUM.VA.GOVShow Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!clyde!rutgers!husc6!seismo!plus5!BROWN%FORUM.VA.GOV From: BROWN%FORUM.VA.GOV@plus5.UUCP Newsgroups: comp.std.mumps Subject: $WRITE FUNCTION PROPOSAL FOR MDC Message-ID: <1730@plus5.UUCP> Date: Thu, 23-Apr-87 19:28:00 EDT Article-I.D.: plus5.1730 Posted: Thu Apr 23 19:28:00 1987 Date-Received: Thu, 30-Apr-87 07:24:43 EDT Sender: hokey@plus5.UUCP Lines: 56 Approved: hokey@Plus5.Com Volume-Issue: X11/1987.06/comp.std.mumps/5