C++ What is and isn't implemented in the Arduino IDE

Dyslexicbloke:
sprintf being a prime example ...
I found it quite by accident and then discovered that the Arduino implementation is limited with respect to its standard form.

As far as I know, the only "problem" with sprintf (and sscanf) is that the default library excludes the floating point code in order to save space.

For what I do, I NEED floating point support, so I "patched" my "libc.a" files to remove the "standard" sprintf and sscanf code and replace it with the floating point version.

It does make the resulting sketches about 1.5K larger, but that's never been a problem for me (so far).

In case you are interested, here's a script to automate "fixing" libc.a to support floating point:

#!/bin/bash
################################################################################
# fixfp - script to install floating point support into Arduino printf library
#
# For more information, see this post:
# http://arduino.cc/forum/index.php/topic,124809.msg938573.html#msg938573
################################################################################

STATUS=0

## Exit if libc.a isn't here
test -e libc.a
if [ ${?} -ne 0 ]; then {
        echo "File 'libc.a' not found - exiting"
        exit 0
} fi

test -e libc.a.orig
let STATUS+=${?}

test -e vfprintf_flt.o
let STATUS+=${?}

test -e vfscanf_flt.o
let STATUS+=${?}

if [ $STATUS -eq 0 ]; then {
        echo "Floating point patch already performed - exiting"
        exit 0
} else {
        cp libc.a libc.a.orig
        ar -dv libc.a vfprintf_std.o
        ar -dv libc.a vfscanf_std.o
        ar -xv libprintf_flt.a vfprintf_flt.o
        ar -xv libscanf_flt.a vfscanf_flt.o
        ar -rv libc.a vfprintf_flt.o
        ar -rv libc.a vfscanf_flt.o
        echo "Floating point patch installed."
} fi

Hope this helps...