Tscope5
textio02.c
////////////////////////////////////////////////////////////////////////////////
//
// __ ______
// / /_______________ ____ ___ / ____/
// / __/ ___/ ___/ __ \/ __ \/ _ \ /___ )
// / /_(__ ) /__/ /_/ / /_/ / __/ ____/ /
// \__/____/\___/\____/ .___/\___/ /_____/
// /_/
//
// textio02.c
// - Example of printf style format strings.
////////////////////////////////////////////////////////////////////////////////
#include <tscope5.h>
int main()
{
int a = 200;
double b = TS5_PI;
char c = 'C';
char d[] = "Tscope";
ts5_printf(0.0, 60.0, "an integer in decimal format: %d", a);
ts5_printf(0.0, 40.0, "an integer in octal format: %o", a);
ts5_printf(0.0, 20.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, -20.0, "a double in exponential notation: %e", b);
ts5_printf(0.0, -40.0, "a character: %c", c);
ts5_printf(0.0, -60.0, "a character string: %s", d);
ts5_draw_mouse_button(ax(0.9), ay(-0.8));
return 0;
}