Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Happy New Year 2026.
#19
(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.
Before to send the arrow of truth, dip the head in a honey pot (Cheyenne saying).
Don't tell my Mom I'm on iMac with macOS, she thinks I work on PC with Windows. Tongue
Reply


Messages In This Thread
Happy New Year 2026. - by Fifi - 01-07-2026, 06:57 AM
RE: Happy New Year 2026. - by SMcNeill - 01-07-2026, 07:01 AM
RE: Happy New Year 2026. - by Fifi - 01-07-2026, 08:41 AM
RE: Happy New Year 2026. - by Pete - 01-07-2026, 07:03 AM
RE: Happy New Year 2026. - by Fifi - 01-07-2026, 08:31 AM
RE: Happy New Year 2026. - by Dav - 01-07-2026, 12:30 PM
RE: Happy New Year 2026. - by Fifi - 01-07-2026, 04:23 PM
RE: Happy New Year 2026. - by SMcNeill - 01-07-2026, 05:10 PM
RE: Happy New Year 2026. - by Fifi - 01-07-2026, 07:42 PM
RE: Happy New Year 2026. - by NakedApe - 01-07-2026, 07:11 PM
RE: Happy New Year 2026. - by SMcNeill - 01-07-2026, 07:35 PM
RE: Happy New Year 2026. - by SMcNeill - 01-07-2026, 07:48 PM
RE: Happy New Year 2026. - by a740g - 01-08-2026, 09:29 AM
RE: Happy New Year 2026. - by SMcNeill - 01-08-2026, 10:14 AM
RE: Happy New Year 2026. - by Fifi - 01-16-2026, 05:58 PM
RE: Happy New Year 2026. - by a740g - 01-08-2026, 11:47 AM
RE: Happy New Year 2026. - by Kernelpanic - 01-08-2026, 04:04 PM
RE: Happy New Year 2026. - by hsiangch_ong - 01-09-2026, 12:58 AM
RE: Happy New Year 2026. - by Fifi - 01-16-2026, 04:18 PM
RE: Happy New Year 2026. - by Magdha - 01-09-2026, 02:32 PM
RE: Happy New Year 2026. - by Fifi - 01-16-2026, 05:11 PM
RE: Happy New Year 2026. - by Magdha - 01-18-2026, 03:57 PM
RE: Happy New Year 2026. - by Magdha - 01-22-2026, 02:46 PM
RE: Happy New Year 2026. - by SMcNeill - 01-22-2026, 02:50 PM
RE: Happy New Year 2026. - by Magdha - 01-22-2026, 03:13 PM
RE: Happy New Year 2026. - by bplus - 01-22-2026, 03:58 PM
RE: Happy New Year 2026. - by SMcNeill - 01-22-2026, 04:43 PM
RE: Happy New Year 2026. - by bplus - 01-22-2026, 04:53 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Happy B Day Eric! bplus 3 481 11-04-2025, 06:59 AM
Last Post: Unseen Machine
  Happy New Year !!! dano 5 915 01-02-2025, 12:05 AM
Last Post: Kernelpanic
  Happy Pi day! TerryRitchie 10 1,944 03-15-2024, 03:34 AM
Last Post: Pete
Question What happened to end year holiday season code? mnrvovrfc 5 1,087 12-27-2023, 02:39 PM
Last Post: GareBear
Star One year of Phoenix Forums! mnrvovrfc 25 5,620 05-07-2023, 09:33 PM
Last Post: Wiggums

Forum Jump:


Users browsing this thread: 1 Guest(s)