package nxm.sys.intr;

/** Handles the creation of results parameters.
    As of NeXtMidas 2.5.0 this is simply a minor extension
    of the {@link Results RES} command that handles only the setting of a result.

    @author  J. Czechowski IV
 */
public class Set extends Results {

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

  public int open() {
    label = MA.getU("LABEL");
    value = MA.getUQ("VALUE");
    isSet = true;
    return NORMAL;
  }

  public int process() {
    super.process();
    // loop on multiple args
    for (int i=3; i<=MA.getNArgs(); ) {
      label  = MA.getU(i++);
      value  = MA.getUQ(i++);
      super.process();
    }
    return FINISH;
  }

}
