def use_dimension
      return if @dim && @factor
      if @expr && @dim.nil?
        #puts "unit='#{@name}', parsing '#{@expr}'..." if Unit.debug
        unit = Unit.parse(@expr)
        case unit
        when Unit
          @dim = unit.dim
          @factor = unit.factor
          if @dim.nil? || @factor.nil?
            raise UnitError,"parse error : #{unit.inspect}"
          end
        when Numeric
          @factor = unit
          alloc_dim
        else
          raise UnitError,"parse error : #{self.inspect}"
        end
      else
        raise UnitError,"undefined unit?: #{self.inspect}"
      end
    end
def use_dimension
      return if @dim && @factor
      if @expr && @dim.nil?
        #puts "unit='#{@name}', parsing '#{@expr}'..." if Unit.debug
        unit = Unit.parse(@expr)
        case unit
        when Unit
          @dim = unit.dim
          @factor = unit.factor
          if @dim.nil? || @factor.nil?
            raise UnitError,"parse error : #{unit.inspect}"
          end
        when Numeric
          @factor = unit
          alloc_dim
        else
          raise UnitError,"parse error : #{self.inspect}"
        end
      else
        raise UnitError,"undefined unit?: #{self.inspect}"
      end
    end
(internal use)
 Parse @expr string if it has not been parsed yet.
 This function must be called before access to @dim or @factor.
 @return [nil]
 @raise [UnitError] if unit parse error.
 @visibility private