Class: Integer

Inherits:
Object
  • Object
show all
Defined in:
lib/BOAST/Language/Algorithm.rb

Instance Method Summary collapse

Instance Method Details

#to_varObject



264
265
266
267
268
269
270
271
272
# File 'lib/BOAST/Language/Algorithm.rb', line 264

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