Tscope5
textio2.c

format string

#include <tscope5.h>
int main()
{
int a = 200;
double b = TS5_PI;
char c = 'C';
char d[] = "Tscope";
ts5_printf(0.0, 45.0, "an integer in decimal format: %d", a);
ts5_printf(0.0, 30.0, "an integer in octal format: %o", a);
ts5_printf(0.0, 15.0, "an integer in hexadecimal format: %x", a);
ts5_printf(0.0, 0.0, "a double in normal notation: %6.5f", b);
ts5_printf(0.0, -15.0, "a double in exponential notation: %e", b);
ts5_printf(0.0, -30.0, "a character: %c", c);
ts5_printf(0.0, -45.0, "a character string: %s", d);
return 0;
}