• Print

Author Topic: C/C++ like standard libs for QB64  (Read 196 times)


  • Jr. Member
  • **
  • Posts: 75
  • 4 * 1.0079 = 4.0026
    • Email
C/C++ like standard libs for QB64
« on: March 14, 2013, 01:02:44 AM »
Hi all,

did you ever regret, that you can't use escape sequences in strings to insert special characters or inserting quotes without the bulky need to use a "+CHR$(34)+" notation, or did you never feel happy with the formatting tokens PRINT USING provides?
If so, then you should have a look on this library (include) files, which provides the standard C/C++ functions for formatted output and the required variable argument lists in some QB64 friendly SUBs and FUNCTIONs.

C/C++ like variable argument lists (qbstdarg.h/.bi/.bm)
Within these files you find definitions, SUBs and FUNCTIONs to setup variable argument lists (va_list) as needed by many C/C++ functions. The va_list will be emulated within a regular QB64 string.

C/C++ like stdio functions for formatted output (qbstdio.h/.bi/.bm)
This is a good alternative for PRINT USING, you may use formatting strings with most of the formatting tokens known to the C/C++ function printf() inclusive the valid escape sequences and octal or hex escaped characters. This include file builds on the va_list arguments provided via (qbstdarg.h/.bi/.bm).

So here's the download, its a zip folder which should be extracted into the QB64 folder:

Take a look into the StdLibs-HowTo.bas file located in the example sub-directory to get a first impression how the SUBs and FUNCTIONs of all the include files can be used.

It's likely, that more stdlib includes will follow step by step, as I'm in need for more functions.

Have fun...
« Last Edit: March 14, 2013, 01:44:13 AM by RhoSigma »
Download archives of my QB64 stuff:
Polygon functions: http://rhosigma-cw.net/down/GfxDemos.zip
Screen savers: http://rhosigma-cw.net/down/ScrSavers.zip
Libraries collection: http://rhosigma-cw.net/down/QB64Library.zip (extract into the QB64 folder, a new sub-folder "QB64Library" is created)


  • Jr. Member
  • **
  • Posts: 50
Re: C/C++ like standard libs for QB64
« Reply #1 on: March 14, 2013, 06:08:30 AM »
The how to example was helpful.  thanks

  • Print