(01-09-2026, 12:58 AM)hsiangch_ong Wrote: hello @fifi.
i'm glad for once that you have returned. at least for this occasion.
the problem is that in 3.7. was when _uprintstring was introduced. more functionality was added. that you might be interested in. if you use unicode fonts a lot in your programs. that keyword could interest you.
https://qb64phoenix.com/qb64wiki/index.php/UPRINTSTRING
Hi hsiangh_ong,
Thank you for your welcome back.
For what I've read from the link, this function looks for graphic mode only (
not for the console or file modes I use for several projects).
Further, it doesn't respond exactly to what I'm looking for.
Here is the point:
"Print Using" can separate the columns of the integer part of a float using a comma (",").and using a dot (".") to separate the decimal part when using a mask such as:
Code: (Select All)
' numbers.bas
' this small program shows the use of Print Using and the differences with the rounding depending of the value of the float!
'
n1# = 1234567.993
n2# = 1234567.994
n3# = 1234567.995
n4# = 1234567.9951
n5# = 0.993
n6# = 0.994
n7# = 0.995
n8# = 0.9951
Format$ = "#########,.##"
Text1$ = "This is how my number 123456789.993 is printed: " + Format$
Text2$ = "This is how my number 123456789.994 is printed: " + Format$
Text3$ = "This is how my number 123456789.995 is printed: " + Format$
Text4$ = "This is how my number 123456789.9951 is printed: " + Format$
Text5$ = "This is how my number 0.993 is printed: " + Format$
Text6$ = "This is how my number 0.994 is printed: " + Format$
Text7$ = "This is how my number 0.995 is printed: " + Format$
Text8$ = "This is how my number 0.9951 is printed: " + Format$
Print Using Text1$; n1#
Print Using Text2$; n2#
Print Using Text3$; n3#: Print "the result above is wrong and should be 1,234,567,99": Print
Print Using Text4$; n4#: Print "this one above is good!"
Print
Print Using Text5$; n5#
Print Using Text6$; n6#
Print Using Text7$; n7#: Print "the result above is good!": Print
Print Using Text8$; n8#: Print "this one above is good too!": Print
However, most of European users separate the columns of the integer part of a float with a dot (".") or a space (" ") and then use a comma (",") to separate the decimal part, or may use a dot (".") when they chose to separate the column parts of the integer with a space (" ").
e.g. You can check most of all the different formats of a number cell in Excel.
So, how can I print "1,234,567.99" or "1 234 567,99" or even "1 234 567.99" with QB64PE?
So, it would be nice to implement a new "Using" word (
e.g. Usinge for Europeans or Usingu for Universal) with two new more parameters, one for the character to use to separate the columns of the integer parts of a float and the second to specify the character used to print the decimal sign or whatever character you may need to use for these two parameters (
depending of your country).
Then, omitting one or two of these new parameters should run this new function just as the standard Using.
What do you think?
Moreover, there is a problem with the "rounding".
Please check the different rounding between the n3# and the n7# results.
TIA for any suggestion.