(PYVMS LOGO) Python on OpenVMS

(go to: table of contents, index, list of vms_lib, prev: GET_DATE_FORMAT, next: GET_FOREIGN)


GET_EF - Get Event Flag


get_ef() allocates an arbitrary event flag that is free while vms_lib.reserve_ef() allocates a specific event flag (which must be free).

Format:

    event_flag_number = vms_lib.get_ef ()
Returns:
event_flag_number
Number of the local event flag that was allocated.
Arguments:

vms_lib.get_ef() does not take any arguments.

Examples:

>>> import vms_lib

>>> event_flag_number = vms_lib.get_ef ()
>>> print event_flag_number
62
>>> print vms_lib.get_ef ()
61

>>> # event flags 1 - 23 are initially reserved
>>> #  (compatibility to the RSX operating system)
>>> vms_lib.free_ef (1)
>>> print vms_lib.get_ef ()
60

>>> while (1):
...     print vms_lib.get_ef ()
... <RETURN>
59
58
  ...
33
32
1
Traceback (innermost last):
  File "<stdin>", line 2, in ?
vms_lib.error: (1409684, '%LIB-F-INSEF, insufficient event flags')
>>>
(this example intentionally lets the loop be terminated by an exception)


(go to: table of contents, index, list of vms_lib, prev: GET_DATE_FORMAT, next: GET_FOREIGN)

30-SEP-1998 ZE.