Code: Select all
100000000 -> 100,000,000
Code: Select all
100000000 -> 100,000,000
Code: Select all
Procedure Test(a, b=0)
Debug a
Debug b
EndProcedure
Test(123,456)
Code: Select all
Procedure EZ(num$)
ProcedureReturn ValD(RemoveString(num$,","))
EndProcedure
; Add 100000000 and 222222222 together:
Debug EZ("100,000,000")+EZ("222,222,222")
Wow, talk about code bloat! Might work for an "occasional" number, but I certainly would not use that for numerous numbers.PB wrote:Code: Select all
Procedure EZ(num$) ProcedureReturn ValD(RemoveString(num$,",")) EndProcedure ; Add 100000000 and 222222222 together: Debug EZ("100,000,000")+EZ("222,222,222")
HLA (high level assembly) does that.Tenaja wrote: Anyway, I have a compiler (not for PCs) that allows the underscore anywhere in the middle of a number.
Euphoria 4.x ( which is a Basic-like programming language, not a drugluis wrote:HLA (high level assembly) does that.Tenaja wrote: Anyway, I have a compiler (not for PCs) that allows the underscore anywhere in the middle of a number.
Agreed.luis wrote:The ability to space out big decimal numbers, or the byte/words components in binary and hex numbers is really helpful.
Underscore '_' is a good idea. Because numbers can't contain it. If a number is started (at parsing), ignoring any underscores would be possible.PB wrote:That's a nice idea, Michael; but which character are you going to use?
As I showed above, commas aren't used in every language of the world.
So you meant locale system setting for a tooltip? 1,000,000 or 1.000.000?PB wrote:I'd prefer no numbers be touched, anyway. Are we coders or not?
Code: Select all
Macro Num(a=,b=,c=,d=,e=,f=)
a#b#c#d#e#f
EndMacro
Debug Num(1,000)
Debug Num(1,000,000)
Nice idea, if you want to use comma ',' as thousands separator (english notation).freak wrote:Just use a macro:Code: Select all
Macro Num(a=,b=,c=,d=,e=,f=) a#b#c#d#e#f EndMacro Debug Num(1,000) Debug Num(1,000,000)