summaryrefslogtreecommitdiff
path: root/dynsubscript.c
blob: e432c227fb16d221e7b120319e8e41a589f8fa95 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#include <u.h>
#include <libc.h>

typedef struct Num Num;

struct Num {
	int	v;
};

Num one = {1};
Num three = {3};
Num fourteen = {14};

char *list[] = {
[one.v]		"ein",
[three.v]	"drei",
[fourteen.v]	"vierzehn"
};

void
main()
{
	print("%s\n", list[one.v]);
	exits(0);
}