Debian Codegraph @

terps/tads/tads3/test/data/testaddr3.t

raw
1 /*
2 * Test of address operator '&'. Starting in 3.1, &x doesn't necessarily
3 * mean that x is a property, as it did in the past. &x can now be used
4 * for function pointers and built-in function pointers as well.
5 * However, a symbol that's never defined anywhere in the project is
6 * still assumed to be a property as the type of last resort. This tests
7 * that we can use an unknown symbol with '&' and get a property pointer
8 * by default.
9 */
10
11 #include <tads.h>
12
13 obj1: object
14 p1 = 7
15 ;
16
17 main(args)
18 {
19 local a = &p1;
20 local b = &p2;
21
22 "obj1.(a) = <<obj1.(a)>>, obj1.(b) = <<obj1.(b)>>, dataType(b) = <<
23 dataType(b)>>\n";
24 }