I’ve stumbled accross:
sprintf(buffer, "%!ld ", date);
I understand the ld is for long integer, but what is the purpose of the ! ? I can’t find any reference on this, and the output seems similar to the classical %ld for me
edit : apparently on my system it appends to the variable the string +to_date('01/01/1904','DD/MM/YYYY')) … this is indeed used to query database so it transforms the date into an actual oracle date (I think).
Now I’ll try to see if this is a special sprintf and where it comes from
It’s an invalid format string.
I think most printf implementations, when getting an invalid format string, treat the
%as a literal, not a special character. So it will print%!ld.If it works like
%ldfor you, then, as some comments say, perhaps it’s a non-standard extension of your platform.