print_str

Prints a string.

void print_str(lprec *lp, char *str);

Return Value

print_str has no return value.

Parameters

lp

Pointer to previously created lp model. See return value of make_lp, read_lp, read_LP, read_lpt, read_LPT, read_mps, read_freemps, read_MPS, read_freeMPS, read_XLI

str

The string to print

Remarks

The print_str function prints a string. By default, the output is stdout. However this can be changed via a call to set_outputstream, set_outputfile.
This function can be usefull for debugging/demo purposes.

Example

#include <stdio.h>
#include <stdlib.h>
#include "lp_lib.h"

int main(void)
{
  lprec *lp;

  /* Create a new LP model */
  lp = make_lp(1, 1);
  if(lp == NULL) {
    fprintf(stderr, "Unable to create new LP model\n");
    return(1);
  }

  solve(lp);

  print_str(lp, "We are here\n");

  delete_lp(lp);

  return(0);
}

lp_solve API reference

See Also delete_lp, free_lp, make_lp, read_lp, read_LP, read_lpt, read_LPT, read_mps, read_freemps, read_MPS, read_freeMPS, read_XLI, print_objective, print_solution, print_constraints, print_duals, print_scales, print_tableau, set_outputstream, set_outputfile, print_debugdump