ZealOS/src/Demo/DolDoc/DefineStr.ZC

21 lines
490 B
HolyC
Raw Normal View History

2020-02-15 20:01:48 +00:00
/*The +D flag causes a define-string
look-up and substitution.
It is available in the <CTRL-l> text-widget
menu under text entries for use in
documentation.
*/
DefineLoad("COMPANY", "Acme Inc");
2020-02-15 20:01:48 +00:00
"Company: $$TX,\"\",D=\"COMPANY\"$$\n";
DefinePrint("COMPANY_TIME", "%T", Now);
2020-02-15 20:01:48 +00:00
#exe {
StreamPrint("#define COMPANY_AGE %0.1f\n", (Now - Str2Date("8/1/2003")) / ToF64(1 << 32) / CDATE_YEAR_DAYS);
2020-02-15 20:01:48 +00:00
};
"Age : $$TX,\"\",D=\"COMPANY_AGE\"$$ years\n";
"Time: $$TX,\"\",D=\"COMPANY_TIME\"$$\n";