Definitely unusable

From Esolang
Jump to navigation Jump to search

Definitely unusable is a language that is supposed to be a derivative of Line Feed. Sadly, there is a bug in the implementation!PrySigneToFry maded Python implementation and it has no bug, even better than JS

Syntax

The only valid program is the single newline, which does nothing. Anything else will print out an error.

Implementations

Written in JavaScript:

function interpret(code) {
    if(code=='\n') {}
    else {
        console.log('Syntax Error:')
        // Uhhh...
        // How to print the contents of a variable?
        eval(code)
        // is that how you do it?
    }
}

Another implementation in Python

import sys
code = sys.stdin.read()
if code == "\n":
    pass
else:
    print(f"Syntax Error: {code}")

See also