NO FRAMES

CPXmsg

int CPXPUBVARARGS CPXmsg(CPXCHANNELptr channel, const char * format, ... )
Definition file: cplex.h
Include files: cplex.h

The routine CPXmsg writes a message to a specified channel. Like the C function printf, it takes a variable number of arguments comprising the message to be written. The list of variables specified after the format string should be at least as long as the number of format codes in the format. The format string and variables are processed by the C library function vsprintf or a substitute on systems that do not have the vsprintf function.

The formatted string is limited to 1024 characters, and is usually output with the C function fputs to each output destination in the output destination list for a channel, except when a function has been specified by the routine CPXaddfuncdest as a destination.

The CPLEX Callable Library uses CPXmsg for all message output. The CPXmsg routine may also be used in applications to send messages to either CPLEX-defined or user-defined channels.

Note
CPXmsg is the only non-advanced CPLEX routine not requiring the CPLEX environment parameter.

Example

 CPXmsg (mychannel, "The objective value was %f.\n", objval);

See lpex5.c in the CPLEX User's Manual.

Parameters:

channel

The pointer to the channel receiving the message.

format

The format string controlling the message output. This string is used in a way identical to the format string in a printf statement.

Returns:

At completion, CPXmsg returns the number of characters in the formatted result string.