Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Mumps V1 issues with Fileman: Issue 1

96 views
Skip to first unread message

Sam Habiel

unread,
May 23, 2013, 4:53:35 PM5/23/13
to
I am doing some work to get Fileman working on Mumps V1.

There are a couple of issues. I will make a couple of posts.

Fileman in some places opens $PRINCIPAL. The standard allows that, but for Mumps V1, it's a compilation error.

Sam

cais....@gmail.com

unread,
May 24, 2013, 2:12:49 AM5/24/13
to
Yes .
In MV1 $PRINCIPAL always return =0 . But channel parameter range of OPEN 1..15 .
Better , if $PRINCIPAL return the number of channel ?

Josef

Ray Newman

unread,
May 24, 2013, 6:01:26 PM5/24/13
to
From ISO/IEC 11756:1999 which is the only current standard for MUMPS:

$P[RINCIPAL] $PRINCIPAL identifies the principal I/O device.
The principal I/O device is the device that is current at the moment when the
process is stared, so that the value of $PRINCIPAL will be equal to the initial
value of $IO.

In other words 0 - $IO does not tell you anything of the device merely gives the channel number. This worked well in the days of DSM, ISM, MSM et al where the channel and device were the same thing. No longer true, I'm sorry.

I suggest that any use of $P be removed.

Ray Newman

LD Landis

unread,
May 28, 2013, 12:44:51 PM5/28/13
to
Dear Ray,

How do MUMPSV1 channels map to UNIX file descriptors?

It seems to me that the $P = 0 is consistent with the
UNIX stdin (file descriptor 0, which is the default
behavior at process creation) being assigned to channel
0.

So the question I have is what is the expected purpose
of doing an OPEN $P in the code. (Sorry, I don't know
the nuanced reason for this at the application level).

Also, I am unclear, is this a "compilation" issue or a
run-time issue?

It seems to me that OPEN $P does not make that much sense
in itself. That is the reason I said "nuance reason" for
doing an OPEN $P.

Cheers,
--ldl

Sam Habiel

unread,
May 28, 2013, 4:25:37 PM5/28/13
to
I asked George Timson. Here's his reply:

$P is the device when the process was started, not necessarily the
current device. It might have been closed by the process, requiring its
re-OPENing. Or in some cases, when the process is a background job, it
never is really a useable device; I think in some such cases I have even
seen $P equal the null string. In any case, I am just doing what the
commented-out code on the same line used to do without the $P syntax;
IO(0) was always, by convention, the starting device.

--

And I checked with Rick; opening $P is not disallowed in the '95 standard.

Sam

Ray Newman

unread,
May 28, 2013, 7:47:00 PM5/28/13
to
G'day, With MUMPS V1 and quite a few other implementations, the closing of $P dosen't actually colse it. So a USE $P would probable have the same effect.

Ray
0 new messages