Say

From Esolang
Jump to navigation Jump to search

Say is an esolang invented by User:None1.

Syntax

Things in square brackets are optional, but if one is given, the others most be given too.

Variable: "[Yes/No, ]Variable2, it is Value[, not String]"

Value can be:

  • A string (surrounded by single quotes), then the string is stored into Variable2
  • A number, if it is i, then the i-th line (1-indexed) is jumped
  • what you think it is reads input as a string and stores the input into Variable2
  • what you think it is not prints Variable2

If the thing in the brackets are given, the line is only executed if String==Variable2 if the word is Yes, and String!=Variable2 if the word is No.

Reading nonexistent variables result in empty strings, variables only exist when they are modified.

Examples

Hello, World!

A: "X, it is 'Hello, World!'"
A: "A, it is what you think it is not"

Cat program

A: "A, it is what you think it is"
A: "A, it is what you think it is not"

Truth Machine

A: "A, it is what you think it is"
A: "A, it is what you think it is not"
A: "No, A, it is 2, not '0'"