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: BOOLEAN_V, USERVALUE_V [REQUEST]
Re: Value: BOOLEAN_V, USERVALUE_V [REQUEST] [message #7131 is a reply to message #7126] Fri, 15 December 2006 10:40 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 14267
Registered: November 2005
Ultimate Member
fallingdutch wrote on Fri, 15 December 2006 03:41


luzr wrote on Thu, 14 December 2006 20:28


But IMHO be aware that such solution is extremely fragile because of conversions between numerical values (note that IsNumber is the recommended method of type inquiry there).

What about just adding a new ID BOOL_V and a function IsBool that



Well, that is what I have done yesterday.... (no IsBool there, but you can use GetType).

But still seems fragile to me.

Quote:


Why not? so anyone using u++ and wants to define his own id knows where to start: USERVALUE_V+k (k in {0,1,2, ...} is known to be unused.



The real question is where ends U++ and starts "user". In any case, Value.h is not the only place where these numbers are defined. Plus what if user has more than single package (so that 0,1,2,3 will start to clash).

Mirek
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: [XML] Assertion when GetAttrCount()
Next Topic: How to cast String to int64?
Goto Forum:
  


Current Time: Wed Sep 03 19:58:55 CEST 2025

Total time taken to generate the page: 0.05149 seconds