home *** CD-ROM | disk | FTP | other *** search
- package netrexx.lang;
-
- public final class RexxSet {
- public static final byte SCIENTIFIC = 0;
- public static final byte ENGINEERING = 1;
- public static final byte DEFAULT_FORM = 0;
- public static final int DEFAULT_DIGITS = 9;
- public int digits;
- public byte form;
- private static final Rexx $$1 = new Rexx('1');
- // $FF: renamed from: $0 java.lang.String
- private static final String field_0 = "RexxSet.nrx";
-
- public RexxSet() {
- this.digits = 9;
- this.form = 0;
- }
-
- public RexxSet(int var1) {
- this();
- this.digits = var1;
- }
-
- public RexxSet(int var1, byte var2) {
- this();
- this.digits = var1;
- this.form = var2;
- }
-
- public RexxSet(RexxSet var1) {
- this();
- this.digits = var1.digits;
- this.form = var1.form;
- }
-
- public void setDigits(Rexx var1) {
- Rexx var2 = var1.OpPlus(this);
- if (var2.ind == 1 && var2.datatype(new Rexx('w')).OpEqS((RexxSet)null, $$1) && var2.mant.length + var2.exp <= 9) {
- this.digits = var2.toint();
- } else {
- throw new BadNumericException(Rexx.toString(var1));
- }
- }
-
- public void setForm(Rexx var1) {
- if (var1.OpEq((RexxSet)null, Rexx.toRexx("engineering"))) {
- this.form = 1;
- } else if (var1.OpEq((RexxSet)null, Rexx.toRexx("scientific"))) {
- this.form = 0;
- } else {
- throw new BadNumericException(Rexx.toString(var1));
- }
- }
-
- public Rexx formword() {
- return this.form == 0 ? Rexx.toRexx("scientific") : Rexx.toRexx("engineering");
- }
- }
-