class Integer
Public Instance Methods
to_var()
click to toggle source
Creates a constant BOAST
Int Variable with a name corresponding to its value. The variable is signed only when negative.
# File lib/BOAST/Language/Algorithm.rb, line 214 def to_var if self < 0 then v = BOAST::Variable::new("#{self}", BOAST::Int, :signed => true, :constant => self ) else v = BOAST::Variable::new("#{self}", BOAST::Int, :signed => false, :constant => self ) end v.force_replace_constant = true return v end