module Main exposing (..)
import Html exposing (text)
main =
text "Hello, World!"
Julia
julia
println("Hello, World!")
Keep in mind that to run these snippets, you may need to have the corresponding programming environment installed on your system and sometimes wrap the code in a class or main function as appropriate for the language.
Of course! Here are "Hello, World!" examples in 50 different programming languages:
Python
python
print("Hello, World!")
Java
java
public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello, World!");
}
}
C
c
#include <stdio.h>
int main() {
printf("Hello, World!\n");
return 0;
}
module Main exposing (..)
import Html exposing (text)
main =
text "Hello, World!"
Julia
julia
println("Hello, World!")
Lisp
lisp
(print "Hello, World!")
Smalltalk
smalltalk
Transcript show: 'Hello, World!'; cr.
Tcl
tcl
puts "Hello, World!"
Logo
logo
print [Hello, World!]
CoffeeScript
coffeescript
console.log 'Hello, World!'
ActionScript
actionscript
trace("Hello, World!");
Assembly (x86 Intel syntax - NASM)
asm
section .text
global _start
_start:
mov edx,len
mov ecx,msg
mov ebx,1
mov eax,4
int 0x80
mov eax,1
int 0x80
section .data
msg db 'Hello, World!',0xa
len equ $ - msg
BASIC
basic
PRINT "Hello, World!"
OCaml
ocaml
print_endline "Hello, World!"
Crystal
crystal
puts "Hello, World!"
Nim
nim
echo "Hello, World!"
Boo
boo
print("Hello, World!")
PowerShell
powershell
Write-Host "Hello, World!"
Vala
vala
void main() {
print("Hello, World!\n");
}
Note: Some of the above code may require specific environments or compilers to run, and for compiled languages like C, C++, etc., the code needs to be compiled before execution.