Re: OT - Programming Languages w/o English Syntax
Am Fr, den 17.10.2003 schrieb Tom um 13:15:
> [OT, sorry -- but question is obscure, will be hard to google]
>
> Are any non-english-speaking readers aware of High-level programming
> languages using non-English syntax? Like, could I find a French C
> compiler that uses "pour" instead of "for" and "si" instead of "if"?
You can (mis-)use the C preprocessor to allow a non-English syntax in C
and add a non-English counterpart for every single keyword. It works for
almost everything except the preprocessor directives themselves.
But why should anyone want this?
--- german.h:
#define ganzzahl int
#define solange while
#define schreibef printf
----
--- test.c:
#include <stdio.h>
#include <german.h>
ganzzahl main() {
ganzzahl a = 0;
solange(a < 5) {
schreibef("Dies ist Zeile %d\n", a);
a++;
}
}
---
Regards,
Dennis
Reply to: