1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2025-08-09 20:25:17 +00:00
Files
kickc/src/test/kc/literal-string-array.c

23 lines
426 B
C

// Tests literal string array
char* const SCREEN = 0x0400;
void* const NUL = (void*)0;
// Works
// char*[] msgs = { (char*)"hello", (char*)"cruel", (char*)"world", (char*)NUL };
// Not working
char* msgs[] = { "hello", "cruel", "world", NUL };
void main() {
char i=0;
char** msg = msgs;
while(*msg) {
char* c = *msg;
while(*c) {
SCREEN[i++] = *c++;
}
msg++;
}
}