[units] quantity to/from string / setting value component apart from the units
31 Jul
2011
31 Jul
'11
2:51 p.m.
Units developers/user, Preferably, I would like to get after a quantity's value and/or its units in string format, plumb that through to the .NET Managed environment. The managed plumbing is straightforward enough to research, no problem. Can I use boost::units::to_string(q), where q is declared something like quantitysi::length,float? And then, what can we expect after calling it? For instance, if q is set to 2.5 * meters, then can we expect "2.5 m"? Also, can I set a quantity value apart from its unit? In other words, if I've got a quantitysi::length,float q again, I'd like to do something like this: q.value(2.5); or: q = 2.5; Or some way that preserves the current quantity units. Thank you... Regards, Michael
4868
Age (days ago)
4868
Last active (days ago)
0 comments
1 participants
participants (1)
-
Michael Powell