Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Core » Value: why not float support?
Re: Value: why not float support? [message #30176 is a reply to message #28537] Mon, 13 December 2010 15:47 Go to previous messageGo to previous message
kohait00 is currently offline  kohait00
Messages: 939
Registered: July 2009
Location: Germany
Experienced Contributor
sorry to bother again here..

in my struggle with the OSC protocol, a again came across this issue. OSC supports, together with int, int64, bool, etc.. the float AND double extra.

since i am using Value as the prefered container for all of it, i so far was working with the double as float Value, simply ignoring the fact that float doesnt exist.

i could use double for both, double and float, question, i need to distinguish them, because they need to be sent with different markers. so i have no means to distinguish them..

this is not possible when using double for both double and float:
...
if(v.Is<double>()) { /*send as double, "/osc/message,d 137884828388288.23828" */ }

else if(v.Is<float>()) { /*send as float, "/osc/message,f 123.43" */ }


and, also, the implicit conversions would be not possible.

any idea how to do that?

EDIT:
meanwhile i tried to extend value accordingly. here is a patchfile to revision 2902 to show where changes would occure.

[Updated on: Mon, 13 December 2010 16:31]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Core/Path.cpp: the limitation of GetCurrentDirectory for POSIX
Next Topic: InitCaps() proposal
Goto Forum:
  


Current Time: Fri Nov 01 01:58:29 CET 2024

Total time taken to generate the page: 0.02858 seconds