root/lang/d/portingdemo/main.d @ 7585

Revision 7585, 0.6 kB (checked in by itkz, 5 years ago)

yasui omosirosou but kao ga yabai http://www.moe-tokyo.net/

Line 
1
2
3import std.string;
4
5import unko;
6
7
8int main(char[][] args)
9{
10        unko_t* unko = create_unko();
11        scope(exit) {
12                delete_unko(unko);
13        }
14
15        printf("%ld\n", add_long_and_int(15, 30));
16
17        printf(
18                "%d:%d:%d\n",
19                unko_t.first.offsetof, get_offsetof_first(), *unko.first);
20        printf(
21                "%d:%d:%d\n",
22                unko_t.second.offsetof, get_offsetof_second(), unko.second);
23        printf(
24                "%d:%d:%d\n",
25                unko_t.third.offsetof, get_offsetof_third(), unko.third);
26        printf(
27                "%d:%d:%d\n",
28                unko_t.fourth.offsetof, get_offsetof_fourth(), *unko.fourth);
29
30        return 0;
31}
Note: See TracBrowser for help on using the browser.