
10 Jun
2006
10 Jun
'06
12:18 a.m.
Andy Little said: (by the date of Fri, 9 Jun 2006 16:11:14 +0100)
FWIW this syntax is trival in PQS:
typedef pqs::length::m length; typedef pqs::time::s time; typedef pqs::velocity::m_div_s velocity;
length meter(){return length(1);} time second(){return time(1);} velocity x = 10 * meter() / second();
IOW If you prefer to work this way you can.
It's a very interesting idea! Maybe you could provide some extra header file that will provide such functionality? Those functions - being inline should not even affect the runtime speed? mixed units (like velocity) would then default to the base si units (like m/s in this case) -- Janek Kozicki |