in reply to how would you detect a math expression
To detect conversions - define the associated units as constants, and interpolate a multiplication, e.g. s/h/ * 3600/ to normalize hours and calculate with seconds. A hash table unit => constant is handy for that...
(just a half-baked idea .)
--shmem
_($_=" "x(1<<5)."?\n".q·/)Oo. G°\ /
/\_¯/(q /
---------------------------- \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: how would you detect a math expression
by Molt (Chaplain) on Feb 19, 2007 at 14:11 UTC | |
by shmem (Chancellor) on Feb 19, 2007 at 14:18 UTC | |
by Molt (Chaplain) on Feb 19, 2007 at 15:10 UTC | |
by shmem (Chancellor) on Feb 19, 2007 at 16:27 UTC |