Class LongRealValue
java.lang.Object
svm.value.Value
svm.value.LongRealValue
LongRealValue.
longreal_value ::= c-lreal real_literal:string
A real literal is a string:
<sign>? <digit>* < . <digit>+ >? < & <sign>? <digit>+ >?
Note that a real literal may not contain spaces.
Link to GitHub: Source File.
- Author:
- S-Port: Definition of S-code, Øystein Myhre Andersen
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionDefault ConstructorprivateLongRealValue(double value) Construct a new LongRealValue -
Method Summary
Modifier and TypeMethodDescriptionReturns the result of: this value + other valuebooleanCompare this Value with the given Value according to the given relation.Returns the result of: this value / other valuevoidemit(DataSegment dseg) Add this value to the given DataSegmentReturns the result of: this value * other valueneg()Returns the negative value of this Value object.static LongRealValueof(double value) Create a new LongRealValue with the given parameterstatic LongRealValueofScode()Scans the remaining S-Code belonging to this longreal_value.static LongRealValueread(AttributeInputStream inpt) Reads a BooleanValue from the given input.Returns the result of: this value - other valuedoubletoDouble()Returns the double value of this Value object.floattoFloat()Returns the float value of this Value object.toString()voidwrite(AttributeOutputStream oupt) Writes this Value to the given output.
-
Field Details
-
value
public double valueThe double value
-
-
Constructor Details
-
LongRealValue
public LongRealValue()Default Constructor -
LongRealValue
private LongRealValue(double value) Construct a new LongRealValue- Parameters:
value- the double value
-
-
Method Details
-
of
Create a new LongRealValue with the given parameter- Parameters:
value- the double value- Returns:
- an LongRealValue or null
-
ofScode
Scans the remaining S-Code belonging to this longreal_value. Then construct a new LongRealValue object.- Returns:
- that LongRealValue object or null.
-
emit
Description copied from class:ValueAdd this value to the given DataSegment -
toFloat
-
toDouble
-
neg
-
add
-
sub
-
mult
-
div
-
compare
Description copied from class:ValueCompare this Value with the given Value according to the given relation. -
toString
-
write
Description copied from class:ValueWrites this Value to the given output.- Overrides:
writein classValue- Parameters:
oupt- the output stream- Throws:
IOException- if IOException occur
-
read
Reads a BooleanValue from the given input.- Parameters:
inpt- the AttributeInputStream- Returns:
- the BooleanValue read
- Throws:
IOException- if IOException occur
-