Run User Function

Procedure Name

MOM_run_user_function <shared_library_name> <entry_point_name>

Description

This function causes MOM to call the function named entry_point_name in the shared library named shared_library_name. That function can then extend the translator from which MOM_run_user_function was called. It will do this by calling a User Function function named UF_MOM_extend_translator( param, "extension_name", extension_entry_point ). The param will be passed into entry_point_name as the first argument. The signature of entry_point_name is the same as ufusr. The extension_name is the name of the function as it will appear in a TCL script. The extension_entry_point is the actual address of the function to be called by the interpreter when interpreting the extension_name call. (See Tcl_CmdProc.)

Input

shared_library_name - Full path name of the shared library where entry_point_name resides.

entry_point_name - Name of the entry point to execute.

Example

MOM_run_user_function /usr/local/shlib/lib.sl extendInterp

For a more thorough example, click here.

Set Address Format

Procedure Name

MOM_set_address_format <Address Name> <Format Name>

Description

This function redefines the format to be used for the <Address Name> as <Format Name> for outputting in a block. The <Format Name> must be defined in the Definition File.

Input

address name, format name

Example

MOM_set_address_format F F_ipm

Set Line Leader

Procedure Name

MOM_set_line_leader <Always | Once | Off > <"string">

Description

This function causes MOM to set the line leader to string with the indicated status. If a line leader is to be output is output as the first characters of the output line (i.e., before the SEQUENCE).

Input

modality attribute, string

Example

MOM_set_line_leader Always "/"

Set Sequence On

Procedure Name

MOM_set_seq_on

Description

Allow output of the sequence number if a SEQUENCE specifier was given in the definition file.Return the sequence setting at the time the command is exectued.

eg. set current_status [MOM_set_seq_on]
...
if ($current_status = = "off") {
MOM_set_seq_off
}

Input

none

Set Sequence Off

Procedure Name

MOM_set_seq_off

Description

Do not output a sequence number. Return the sequence setting at the time the command is exectued.

eg. set current_status [MOM_set_seq_off]
...
if ($current_status = = "on") {
MOM_set_seq_on
}

 

Input

None

Suppress

Procedure Name

MOM_suppress <Always | Once | Off > <Address_1 ... Address_n>

Description

The next time that a block template that contains a reference to any of the input address names is evaluated, the word that contains the address will not be output regardless of its modality attribute.

User

 

MOM Architecture

 

 

MOM_suppress

ONCE---->

MOM_force
MOM_suppress

ONCE---->
ONCE---->

False
True

MOM_suppress

OFF---->

MOM_supress is set to

OFF

 

MOM_supress

ALWAYS---->

MOM_force
MOM_suppress is set to

OFF
ALWAYS

 

Input

modality attribute, address names

Example

MOM_suppress_address Always N X Y

 

Address output with MOM_suppress OFF programmed in tcl (default state)

 

Programmed in tcl

Definition file

MOM_force ONCE

MOM_suppress ONCE

 Neither

Force OFF(modal)

Yes

No

If different

Force ALWAYS(non-modal)

Yes

No

Yes

 

If both MOM_force ONCE and MOM_suppress once are programmed, the last one will take effect.

If MOM_suppress ALWAYS is programmed, the address will never be output. All MOM_force ONCE and MOM_suppress ONCE commands are ignored.

In the definition file, Force OFF or Force ALWAYS should define the modality of the address. Using MOM_force OFF or MOM_force ALWAYS to redefine the modality in the tcl is not recommended.