Class Variable
java.lang.Object
com.webcodepro.applecommander.compiler.Variable
Contains information referring to a BASIC variable.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
static final int
static final int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetName()
Answers with the variable name.int
getType()
Answers with the variable type.getValue()
Return the value.boolean
Answers true if this is a constant value.boolean
Answers true if this is a floating point constant.boolean
Answers true if this is an integer constant.boolean
Answers true if this is a string constant.boolean
isNumber()
Answers true if this is a number.boolean
Answers true if this variable is floating point.boolean
Answers true if this variable is integer.boolean
Answers true if this variable is string.boolean
Answers true if this is a variable.
-
Field Details
-
TYPE_STRING
public static final int TYPE_STRING- See Also:
-
TYPE_INTEGER
public static final int TYPE_INTEGER- See Also:
-
TYPE_FLOAT
public static final int TYPE_FLOAT- See Also:
-
CONST_STRING
public static final int CONST_STRING- See Also:
-
CONST_INTEGER
public static final int CONST_INTEGER- See Also:
-
CONST_FLOAT
public static final int CONST_FLOAT- See Also:
-
-
Constructor Details
-
Variable
Construct a Variable.
-
-
Method Details
-
getName
Answers with the variable name. -
getType
public int getType()Answers with the variable type. -
isTypeString
public boolean isTypeString()Answers true if this variable is string. -
isTypeInteger
public boolean isTypeInteger()Answers true if this variable is integer. -
isTypeFloat
public boolean isTypeFloat()Answers true if this variable is floating point. -
isVariableType
public boolean isVariableType()Answers true if this is a variable. -
isNumber
public boolean isNumber()Answers true if this is a number. -
isConstantString
public boolean isConstantString()Answers true if this is a string constant. -
isConstantInteger
public boolean isConstantInteger()Answers true if this is an integer constant. -
isConstantFloat
public boolean isConstantFloat()Answers true if this is a floating point constant. -
isConstant
public boolean isConstant()Answers true if this is a constant value. -
getValue
Return the value.
-