
Function afprintf(fn,onscreen,frmt,val1,val2,...)
s = afprintf(fn,onscreen,frmt,val1,val2,...)
formats values (of variables) val1, val2, ... according to
the sprintf() format string frmt, and:
-- appends the resulting string to the file with
filename fn (if fn is a non-empty string),
-- prints it on screen (if onscreen is 1), and/or:
-- returns it (if an output argument is requested).
(c) 2026 fabien van mook
2026.08.20 release of this file within package "fvm-miscellaneous" under GNU GPLv3+