Description
The CPXmsg() routine 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.fputs() to each output destination in the output destination list for a channel, except when a function has been specified by the CPXaddfuncdest() routine as a destination. 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.
|
|
CPXmsg() is the only CPLEX routine not requiring the CPLEX environment parameter.
|
CPXmsg() returns the number of characters in the formatted result string.
int CPXmsg (CPXCHANNELptr channel,
char *format,
(Any types)...);
CPXCHANNELptr channelThe pointer to the channel receiving the message.
char *formatThe format string controlling the message output. This string is used in a manner identical to the format string in a
printf() statement.
(Any types)...The list of variables to be printed in the message.
CPXmsg (mychannel, "The objective value was %f.\n", objval);