Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Function Request
#1
Now FB has PRINT USING and PRINT # USING implemented, perhaps it's time to fill one of the QB shortcomings, the "format to string", a function returning a string formatted by USING, a sort of C's sprintf...

Probably PRINT USING is already using an internal buffer, it would be a matter of returning that buffer instead of printing.

In QB there was a hack using FIELD and a NUL file, but in FB FIELD has a different meaning...
Antoni
Reply
#2
that would be awesome!
url]http://fbide.sourceforge.net/[/url]
Reply
#3
Unfortunately, PRINT USING does not work in exponential format (at least in 0.12b). For instance, the following code:

Code:
x# = 1.23D-5
print using "#.##^^^^"; x#

prints 1.23

It seems that the caret string is simply ignored.

I asked the question on this forum some time ago, but Victor said that this could not be corrected Cry
ean Debord
----------------
Math library for FreeBasic:
http://www.unilim.fr/pages_perso/jean.de...fbmath.zip
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)