Bug(?): Numbers are not always numbers

In Dialog, there’s a general rule that numbers are always treated as numbers, not as dictionary words. This makes parsing more convenient and avoids clogging the game’s dictionary, and applies even when creating words by joining characters together.

However, it does not apply when splitting words apart into their constituent characters. If you split a number, every character is treated as a number; if you split a word, every character is treated as a word, even if it’s actually a number.

For example, if you (split word @a7 into $Chars), you get [@a @7], rather than the expected [@a 7].

(I call this a bug especially because all the number-parsing routines assume that numbers are always numbers, not words; there’s no predicate that expects @7 or the like.)

Thanks, well spotted! I’ve also realized that (get key $) returns things like @7 when a digit is pressed. Will fix both issues.

1 Like