package nxm.sys.intr;

import nxm.sys.lib.Intrinsic;

/**
  Echos text to the terminal.

  @author Jeff Schoen
*/
public class Say extends Intrinsic {

  /** default constructor */
  public Say () {}

  public int process() {

    String text = MA.getCS("TEXT");
    if (MA.getState("/L", true)) {
      M.println(text);              // Use M.println to work with logger - since 3.7.1 for NXM-2813
    } else {
      M.print(text);                // Use M.print to work with logger - since 3.7.1 for NXM-2813
    }
    return FINISH;
  }
}
