NNVText

From Esolang
Jump to navigation Jump to search

NNVText is a joke esolang created by User:None1.

The name of this esolang stands for 'Null Not Valid Text'

Execution

NNVText is almost the same as the esolang Text, the only difference is that an empty program is a valid program in Text, but not in NNVText.

Interpreters

Python

import sys
code=sys.stdin.read()
if not code:
    raise ValueError("Program invalid")
else:
    print(code)

It is recommended to use it with a pipe.

C++

#include<iostream>
#include<exception>
using namespace std;
int main(){
    int flag=0;
    while(1){
        char c;
        if(cin.get(c)){
            cout<<c;
            flag=1;
        }else{
            if(flag) return 0;
            else throw (new exception);
        }
    }
    return 0;
}

Again, it is recommended to use it with a pipe.