#PB_String_Numeric

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
IdeasVacuum
Always Here
Always Here
Posts: 6426
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

#PB_String_Numeric

Post by IdeasVacuum »

I just discovered that #PB_String_Numeric now accepts doubles, which is really good news. The icing on the cake though would be to have numbers right-justified too.

Edit: Ah, it only worked because the decimal point was not typed in, it was already there in the initial value :cry:
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
User avatar
Shield
Addict
Addict
Posts: 1021
Joined: Fri Jan 21, 2011 8:25 am
Location: 'stralia!
Contact:

Re: #PB_String_Numeric

Post by Shield »

The problem with fixed implementations like this is that they should follow the current
user locale, i.e. use "." or "," as the decimal separator (or whatever the locale demands).
It shouldn't be too difficult to implement that yourself though, using the appropriate events.
I have never used the new Gadget functionality, but it might even work without API. :)

Other than that, I'd actually like to see some kind of MaskedTextBox (.NET) where you can
specify a template for a valid input string, i.e. 0000-00-00 could be the template for a date. :)
Image
Blog: Why Does It Suck? (http://whydoesitsuck.com/)
"You can disagree with me as much as you want, but during this talk, by definition, anybody who disagrees is stupid and ugly."
- Linus Torvalds
Post Reply