tmedwards / sugarcube-3

SugarCube is a free (gratis and libre) story format for Twine/Twee.
17 stars 1 forks source link

Printing undefined/null/NaN #14

Closed tmedwards closed 3 years ago

tmedwards commented 4 years ago

When printing, values like undefined, null, NaN, etc. are often elided or replaced—e.g., the naked variable markup simply reprints the variable name when encountering such values. This was done in an attempt at user friendliness, however, in hindsight it causes a not insignificant amount of confusion.

It would be better if such values either caused some kind of error—either a standard SugarCube error or something like the variable name and the value $someVar(undefined)—or simply printed a string representation of the value.

tmedwards commented 4 years ago

As a test, I've implemented the latter option noted above. We'll see how it works out.

tmedwards commented 3 years ago

DONE.