Empty Program

From Esolang
Jump to navigation Jump to search

Empty Program is a program that doesn't do anything.

In Python, you just write nothing (a null program) to do it. But in C++, you need to write a main function with no operation except return 0.

C/C++

int main()
{
    return 0;
}

Java

public class EmptyProgram(){
    public static void main(){
        // TODO
    }
}

Pascal

begin
end.

PHP

<?php
?>

Go

package main()

func main(){
  // TODO
}

C♯ Mono

using System;

public class Empty(){
    private static void Main(){
        // TODO
    }
}

G#

make e; [return{}]

JavaScript(Node.JS)

process.exit()

Batch File

@echo off
GOTO end
:end

Assembly Language(Microsoft Macro Assembly)

assume cs:codesg
codesg segment
start:
    mov cx, 0
    jcxz end
end:
    mov ah, 4ch
    int 21h
codesg ends
end start

Rust

fn main(){}

VB Mono

Imports System

Module NOP
    Sub Main()
        
    End Sub
End Module

Brainfuck, JS, Python, Lua and many other languages

N

Befunge

@

‍true

­ 
­ 

易语言

Not shown here.

Scratch(text), Kitten3(text), Kitten4(text)

When "start" clicked
Stop [all] script

You can put this code into https://scratchblocks.github.io/ to view the result in Scratch.

when gf clicked
stop [all v]

See also