CancelScript

From Esolang
Jump to navigation Jump to search

CancelScript is an esoteric programming language some say is suggestive of the feeling of cancelling on plans with friends. It was conceived and its specification written after the author woke up in a sleep-deprived, alarm clock-induced daze the morning breakfast with a friend had been planned. Not moments after waking up, the author fell back asleep. Breakfast was cancelled.

Specification

Programs written in CancelScript can involve three components: the word "cancel" (case insensitive), whitespace characters, and non-whitespace characters not part of the word "cancel".

A CancelScript interpreter immediately terminates the program as soon as the word "cancel" is read. Any other non-whitespace character is unexpected input, and the program immediately terminates. Whitespace characters are ignored.

Implementations

The reference implementation is written in JavaScript and available on GitHub at the link given in the #External Resources section.

User:Zzo38 has written a `scanf` implementation in C, viewable on the talk page.

It is also possible that existing compilers or interpreters intended for a different purpose happen to be functionally equivalent to a CancelScript implementation.

External resources