Ignore:
Timestamp:
07/25/08 16:37:58 (16 years ago)
Author:
ra33
Message:

Adding calculation stuff...

Location:
trunk/src/org/expeditee/simple
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/expeditee/simple/Primitives.java

    r115 r161  
    139139                // If one of them is a real and one is an integer then do a numeric
    140140                // comparison
    141                 if ((var1.startsWith(SReal.prefix) || var2
    142                                 .startsWith(SReal.prefix))) {
     141                if ((var1.startsWith(SReal.prefix) || var2.startsWith(SReal.prefix))) {
    143142                        double v1 = getDoubleValue(var1);
    144143                        double v2 = getDoubleValue(var2);
     
    182181        /**
    183182         * Adds two variables to gether returning the value in the first.
     183         *
    184184         * @param toSet
    185185         * @param amount
     
    265265                setValue(answer, new SBoolean(!getVariable(variable).booleanValue()));
    266266        }
     267
     268        public void addToParser(ExpediteeJEP myParser) {
     269                for (SPrimitive var : list_) {
     270                        try {
     271                                Double value = var.doubleValue();
     272                                myParser.addVariable(var.getName(), value);
     273                        } catch (Exception e) {
     274                        }
     275                }
     276        }
    267277}
Note: See TracChangeset for help on using the changeset viewer.