CmUtils::Utils

Useful routines for use in cmiss perl scripts and com files.

VERSION

1.03 (10 April 2001)
runningCmgui() and runningCm() functions now give correct information.
1.02 (2 April 2001)
Added runningCmgui() and runningCm() functions.
1.01 (28 March 2001)

Moved list_to_string() from CMISS::File::Utils as it is more globally useful than just in parsing Cmiss files.

Added doCmiss().

SUBROUTINES

doCmiss(command_string(s))

Executes a set of CMISS commands sequentially. Obvious method for calling is:

  doCmiss(<<EOF);
    fem define node;p
    fem define elem;p
EOF

which will execute both commands. Alternate method is:

  doCmiss("fem define node;p","fem define elem;p");
  doCmiss(@command_list);

which may be useful if a series of commands has been defined in an array

list_to_string(@list)

Converts a LIST of numbers to the shortest string describing that list. e.g.

  list_to_string(4,5,15,6,7,8,9,12,14,8..10)

is converted to

  4..10,12,14,15

List is sorted prior to condensing. Duplicate entries are ignored. May also be called with an array reference.

runningCmgui()

Returns the name of the cmgui process if Cmgui is running, undefined otherwise.

runningCm()

Returns the name of the cm process if Cm is running, undefined otherwise.