cfad47cfa3/t3compiler/tads3/test/data/predef.t

4b825dc642cb6eb9a060e54bf8d69288fbee4904cfad47cfa334b206c65f22086bcc5d63e6f70944
1
/*
2
 *   test of pre-defined compiler macros 
3
 */
4
5
#include "t3.h"
6
#include "tads.h"
7
8
_say_embed(str) { tadsSay(str); }
9
10
_main(args)
11
{
12
    t3SetSay(&_say_embed);
13
14
#if defined(__DEBUG)
15
    "This program was compiled for debugging.\n";
16
#else
17
    "This program was not compiled for debugging.\n";
18
#endif
19
20
    "The compiler version number is:
21
    <<__TADS_VERSION_MAJOR>>.<<__TADS_VERSION_MINOR>>.\n";
22
23
    "The compiler system name is <<__TADS_SYSTEM_NAME>>.\n";
24
25
#if defined(__TADS_SYS_MSDOS)
26
    "Compiled for MSDOS\n";
27
#elif defined(__TADS_SYS_WIN32)
28
    "Compiled for Win32\n";
29
#elif defined(__TADS_SYS_MAC)
30
    "Compiled for Macintosh\n";
31
#else
32
    "Compiled for unknown system\n";
33
#endif
34
35
#ifndef LINEDEF
36
#define LINEDEF 'not defined using -D'
37
#endif
38
    
39
    "The value of LINEDEF is '<<LINEDEF>>'.\n";
40
}
41