delorie.com/archives/browse.cgi | search |
Evan Foss: > For the over bar on things we have the \_ what if we declared \S to > delineate the part of the attribute that is the scale? Alternatively > we could go the mathcad route and put a multiplication sight between > the scale and the units but I think that looks ugly. Why not write it as an engineer/scientist would do it? E.g. 10 Hz, 10Hz, 10 1/s, 15 A/V, 25 m/s2, 2e-4mmol, 3 km/ms, 3 V/As ... It cannot be that hard to parse that, something like: value : number dimension dimension : tdimension | tdimension "/" tdimension tdimension : "" | "1" | prefix unit | tdimension sep tdimension | tdimension exponent | "(" tdimension ")" exponent sep : " " | "*" Regards, /Karl Hammar ----------------------------------------------------------------------- Aspö Data Lilla Aspö 148 S-742 94 Östhammar Sweden +46 173 140 57
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |