Button for 1977 Button for 1984 Button for 1990 Button for 1995 Button for MDC Button for notes Button for examples
Left Hand Pointer

WAIT

Draft MDC Standard

Right Hand Pointer

4.2 WAIT [ (numexpr) ]

numexpr is a timeout value.

If the optional numexpr is present, the value must be nonnegative. If it is negative, the value 0 is used. numexpr denotes a t-second timeout, where t is the value of numexpr. If t = 0, the condition is tested. If t is positive, execution is suspended until the connection is made, but in any case no longer than t seconds.

The use of this controlmnemonic causes the process to wait for an event to occur on any socket associated with the device, subject to timeout. When this operation completes, $Key contains a value identifying the event that occurred.

In the event of a timeout or an error the empty string is returned in $Key.

If a listening server socket receives a connection request, $Key will contain the value "CONNECT". A new socket will be allocated to handle the connection with the client, and the new socket will become the current socket of the device.

If a message is received by a connectionless protocol, $Key will contain the value "Read". The socket which received the message will become the current socket of the device.

Button for 1977 Button for 1984 Button for 1990 Button for 1995 Button for MDC Button for notes Button for examples

Copyright © Standard Documents; 1977-2018 MUMPS Development Committee;
Copyright © Examples: 1995-2018 Ed de Moel;
Copyright © Annotations: 2003-2008 Jacquard Systems Research
Copyright © Annotations: 2008-2018 Ed de Moel.

Some specifications are "approved for inclusion in a future standard". Note that the MUMPS Development Committee cannot guarantee that such future standards will indeed be published.

This page most recently updated on 28-Feb-2004, 11:48:34 .

For comments, contact Ed de Moel (demoel@jacquardsystems.com)