ZealOS/src/Demo/Print.ZC

34 lines
662 B
HolyC
Raw Normal View History

2021-07-02 00:53:42 +01:00
//ZealOS supports standard $LK,"Print",A="MN:Print"$()
2020-02-15 20:01:48 +00:00
//codes and extended ones.
//See $LK,"Print(\"\") Format Strings",A="FI:::/Doc/Print.DD"$.
2020-02-15 20:01:48 +00:00
//Demonstrates $LK,"aux_format_num",A="FF:::/Doc/Print.DD,aux_format_num:2"$ codes.
2020-02-15 20:01:48 +00:00
"%10h?d\n", 123456789;
"%10h?d\n", 12345;
2020-02-15 20:01:48 +00:00
"%10h3d\n", 123456789;
"%10h3d\n", 12345;
2020-02-15 20:01:48 +00:00
"\nWith the ',' flag:\n";
"%10,h3d\n", 123456789;
"%10,h3d\n", 12345;
2020-02-15 20:01:48 +00:00
"\nFloating Point:\n";
"%16h?n\n", .00123456789;
"%16h?n\n", 12345.0;
2020-02-15 20:01:48 +00:00
"%16.2h-6n\n", .00123456789;
"%16.2h-6n\n", 12345.0;
2020-02-15 20:01:48 +00:00
'\n';
"%h25c\n", 'x'; //Print 25 x's
2020-02-15 20:01:48 +00:00
"%h*c\n", 25, 'y'; //Print 25 y's
2020-02-15 20:01:48 +00:00
'zzzz\n'; //$LK,"PutChars",A="MN:PutChars"$() up to 8 characters.
'\n';