unitwise icon indicating copy to clipboard operation
unitwise copied to clipboard

Area are with deci prefix fails

Open phlegx opened this issue 9 years ago • 2 comments

Hi! I want to search deci are (d as prefix and ar as primary code):

Unitwise(1, 'dar')

but I get this error:

Unitwise::ExpressionError: Could not evaluate 'care'.

Any idea?

phlegx avatar Jun 04 '16 14:06 phlegx

The problem seams to be on the prefixes deka and deci:

- :names: deka
  :symbol: da
  :primary_code: da
  :secondary_code: DA
  :scalar: 1e1
- :names: deci
  :symbol: d
  :primary_code: d
  :secondary_code: D
  :scalar: 1e-1

Unitwise(1, 'dar') the parser finds before da as prefix instead of d.

Unitwise(1, 'deciare') works!

phlegx avatar Jun 04 '16 15:06 phlegx

@phlegx, thanks for the report. This certainly looks like a bug. dar should be something we can parse. We should be able to parse da as the same unit, but it fails in the same way.

I suspect that you are correct, and it has something to do with that da prefix being consumed by the parser.

joshwlewis avatar Mar 20 '17 22:03 joshwlewis