H
Hieran_Del8
Guest
I'm interested in having inline evaluations, but I'm not sure if GMS has something similar to the define keyword in C.
In C, it would look something like:
Is there something similar in GML? Like this:
In C, it would look something like:
C:
enum char_type {
Word = 0x100,
Digit = 0x200 | Word,
Letter = 0x400 | Word,
...etc...
};
#define char_is_word(c) (c & char_type.Word)
...
if (char_is_word(ch)) {
...
}
GML:
enum char_type {
Word = 0x100,
Digit = 0x200 | Word,
Letter = 0x400 | Word,
...etc...
}
#macro char_is_word(c) (c & char_type.Word)
...
if (char_is_word(ch)) {
...
}