zettacode 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.ruby-version +1 -0
- data/.standard.yml +4 -0
- data/CHANGELOG.md +5 -0
- data/Gemfile +10 -0
- data/LICENSE +674 -0
- data/README.md +47 -0
- data/Rakefile +21 -0
- data/bin/zcode +3 -0
- data/bin/zettacode +28 -0
- data/config/analize.yaml +11 -0
- data/config/scrap.yaml +2 -0
- data/docs/parse.md +9 -0
- data/docs/scrap.md +15 -0
- data/lib/zettacode/parse/parse.rb +113 -0
- data/lib/zettacode/scrap/scrap.rb +57 -0
- data/lib/zettacode/version.rb +5 -0
- data/lib/zettacode.rb +10 -0
- data/sig/zettacode.rbs +4 -0
- data/tasks/devel.rb +8 -0
- data/zcode-scrap +7 -0
- data/zettacode.files/arithmetic.integer/0815}.txt +14 -0
- data/zettacode.files/arithmetic.integer/11l}.txt +9 -0
- data/zettacode.files/arithmetic.integer/360_assembly.txt +55 -0
- data/zettacode.files/arithmetic.integer/6502_assembly}.txt +50 -0
- data/zettacode.files/arithmetic.integer/68000_assembly.txt +24 -0
- data/zettacode.files/arithmetic.integer/aarch64_assembly.txt +137 -0
- data/zettacode.files/arithmetic.integer/abap.txt +25 -0
- data/zettacode.files/arithmetic.integer/acl2.txt +21 -0
- data/zettacode.files/arithmetic.integer/action!.txt +36 -0
- data/zettacode.files/arithmetic.integer/ada.txt +20 -0
- data/zettacode.files/arithmetic.integer/aikido.txt +10 -0
- data/zettacode.files/arithmetic.integer/algol_68.txt +14 -0
- data/zettacode.files/arithmetic.integer/algol_w.txt +16 -0
- data/zettacode.files/arithmetic.integer/amigae.txt +14 -0
- data/zettacode.files/arithmetic.integer/apl.txt +7 -0
- data/zettacode.files/arithmetic.integer/applescript.txt +16 -0
- data/zettacode.files/arithmetic.integer/arm_assembly.txt +293 -0
- data/zettacode.files/arithmetic.integer/arturo.txt +10 -0
- data/zettacode.files/arithmetic.integer/asymptote.txt +17 -0
- data/zettacode.files/arithmetic.integer/autohotkey.txt +20 -0
- data/zettacode.files/arithmetic.integer/avail.txt +13 -0
- data/zettacode.files/arithmetic.integer/awk.txt +12 -0
- data/zettacode.files/arithmetic.integer/basic.txt +56 -0
- data/zettacode.files/arithmetic.integer/basic256.txt +11 -0
- data/zettacode.files/arithmetic.integer/batch_file.txt +7 -0
- data/zettacode.files/arithmetic.integer/bbc_basic.txt +9 -0
- data/zettacode.files/arithmetic.integer/bc.txt +8 -0
- data/zettacode.files/arithmetic.integer/befunge.txt +6 -0
- data/zettacode.files/arithmetic.integer/bqn.txt +22 -0
- data/zettacode.files/arithmetic.integer/bracmat.txt +19 -0
- data/zettacode.files/arithmetic.integer/brat.txt +8 -0
- data/zettacode.files/arithmetic.integer/c++.txt +12 -0
- data/zettacode.files/arithmetic.integer/c.txt +17 -0
- data/zettacode.files/arithmetic.integer/c_sharp|c#.txt +17 -0
- data/zettacode.files/arithmetic.integer/chef.txt +37 -0
- data/zettacode.files/arithmetic.integer/clipper.txt +11 -0
- data/zettacode.files/arithmetic.integer/clojure.txt +18 -0
- data/zettacode.files/arithmetic.integer/cobol.txt +44 -0
- data/zettacode.files/arithmetic.integer/common_lisp.txt +29 -0
- data/zettacode.files/arithmetic.integer/component_pascal.txt +32 -0
- data/zettacode.files/arithmetic.integer/crystal.txt +11 -0
- data/zettacode.files/arithmetic.integer/d.txt +17 -0
- data/zettacode.files/arithmetic.integer/dc.txt +10 -0
- data/zettacode.files/arithmetic.integer/dcl.txt +8 -0
- data/zettacode.files/arithmetic.integer/delphi.txt +19 -0
- data/zettacode.files/arithmetic.integer/dwscript.txt +9 -0
- data/zettacode.files/arithmetic.integer/dyalect.txt +13 -0
- data/zettacode.files/arithmetic.integer/e.txt +9 -0
- data/zettacode.files/arithmetic.integer/easylang.txt +9 -0
- data/zettacode.files/arithmetic.integer/ecl.txt +33 -0
- data/zettacode.files/arithmetic.integer/efene.txt +16 -0
- data/zettacode.files/arithmetic.integer/eiffel.txt +32 -0
- data/zettacode.files/arithmetic.integer/elena.txt +16 -0
- data/zettacode.files/arithmetic.integer/elixir.txt +26 -0
- data/zettacode.files/arithmetic.integer/emojicode.txt +9 -0
- data/zettacode.files/arithmetic.integer/erlang.txt +15 -0
- data/zettacode.files/arithmetic.integer/erre.txt +20 -0
- data/zettacode.files/arithmetic.integer/euphoria.txt +13 -0
- data/zettacode.files/arithmetic.integer/excel.txt +32 -0
- data/zettacode.files/arithmetic.integer/f_sharp|f#.txt +15 -0
- data/zettacode.files/arithmetic.integer/factor.txt +17 -0
- data/zettacode.files/arithmetic.integer/false.txt +8 -0
- data/zettacode.files/arithmetic.integer/fermat.txt +10 -0
- data/zettacode.files/arithmetic.integer/forth.txt +19 -0
- data/zettacode.files/arithmetic.integer/fortran.txt +15 -0
- data/zettacode.files/arithmetic.integer/freebasic.txt +18 -0
- data/zettacode.files/arithmetic.integer/friendly_interactive_shell.txt +10 -0
- data/zettacode.files/arithmetic.integer/frink.txt +10 -0
- data/zettacode.files/arithmetic.integer/futurebasic.txt +158 -0
- data/zettacode.files/arithmetic.integer/gambas.txt +30 -0
- data/zettacode.files/arithmetic.integer/gap.txt +15 -0
- data/zettacode.files/arithmetic.integer/genie.txt +23 -0
- data/zettacode.files/arithmetic.integer/george.txt +7 -0
- data/zettacode.files/arithmetic.integer/go.txt +66 -0
- data/zettacode.files/arithmetic.integer/groovy.txt +18 -0
- data/zettacode.files/arithmetic.integer/harbour.txt +11 -0
- data/zettacode.files/arithmetic.integer/haskell.txt +16 -0
- data/zettacode.files/arithmetic.integer/haxe.txt +13 -0
- data/zettacode.files/arithmetic.integer/hicest.txt +26 -0
- data/zettacode.files/arithmetic.integer/holyc.txt +14 -0
- data/zettacode.files/arithmetic.integer/i.txt +11 -0
- data/zettacode.files/arithmetic.integer/icon}}_and_{{header|unicon.txt +13 -0
- data/zettacode.files/arithmetic.integer/inform_7.txt +27 -0
- data/zettacode.files/arithmetic.integer/j.txt +18 -0
- data/zettacode.files/arithmetic.integer/java.txt +22 -0
- data/zettacode.files/arithmetic.integer/javascript.txt +30 -0
- data/zettacode.files/arithmetic.integer/jq.txt +17 -0
- data/zettacode.files/arithmetic.integer/jsish.txt +33 -0
- data/zettacode.files/arithmetic.integer/julia.txt +4 -0
- data/zettacode.files/arithmetic.integer/kotlin.txt +41 -0
- data/zettacode.files/arithmetic.integer/labview.txt +2 -0
- data/zettacode.files/arithmetic.integer/lambdatalk.txt +23 -0
- data/zettacode.files/arithmetic.integer/lasso.txt +8 -0
- data/zettacode.files/arithmetic.integer/lfe.txt +32 -0
- data/zettacode.files/arithmetic.integer/liberty_basic.txt +12 -0
- data/zettacode.files/arithmetic.integer/lil.txt +14 -0
- data/zettacode.files/arithmetic.integer/lingo.txt +10 -0
- data/zettacode.files/arithmetic.integer/little.txt +15 -0
- data/zettacode.files/arithmetic.integer/livecode.txt +17 -0
- data/zettacode.files/arithmetic.integer/logo.txt +11 -0
- data/zettacode.files/arithmetic.integer/lse64.txt +10 -0
- data/zettacode.files/arithmetic.integer/lua.txt +9 -0
- data/zettacode.files/arithmetic.integer/m2000_interpreter.txt +54 -0
- data/zettacode.files/arithmetic.integer/m4.txt +17 -0
- data/zettacode.files/arithmetic.integer/maple.txt +25 -0
- data/zettacode.files/arithmetic.integer/mathcad.txt +51 -0
- data/zettacode.files/arithmetic.integer/mathematica}}-{{header|wolfram_language.txt +18 -0
- data/zettacode.files/arithmetic.integer/matlab}}_-_{{header|octave.txt +8 -0
- data/zettacode.files/arithmetic.integer/maxima.txt +10 -0
- data/zettacode.files/arithmetic.integer/maxscript.txt +8 -0
- data/zettacode.files/arithmetic.integer/mercury.txt +44 -0
- data/zettacode.files/arithmetic.integer/metafont.txt +19 -0
- data/zettacode.files/arithmetic.integer/min.txt +5 -0
- data/zettacode.files/arithmetic.integer/ml-i.txt +18 -0
- data/zettacode.files/arithmetic.integer/modula-2.txt +31 -0
- data/zettacode.files/arithmetic.integer/modula-3.txt +15 -0
- data/zettacode.files/arithmetic.integer/mumps.txt +52 -0
- data/zettacode.files/arithmetic.integer/nanoquery.txt +13 -0
- data/zettacode.files/arithmetic.integer/nemerle.txt +18 -0
- data/zettacode.files/arithmetic.integer/netrexx.txt +14 -0
- data/zettacode.files/arithmetic.integer/newlisp.txt +26 -0
- data/zettacode.files/arithmetic.integer/nial.txt +23 -0
- data/zettacode.files/arithmetic.integer/nim.txt +25 -0
- data/zettacode.files/arithmetic.integer/nsis.txt +25 -0
- data/zettacode.files/arithmetic.integer/oberon-2.txt +14 -0
- data/zettacode.files/arithmetic.integer/objeck.txt +17 -0
- data/zettacode.files/arithmetic.integer/ocaml.txt +9 -0
- data/zettacode.files/arithmetic.integer/oforth.txt +9 -0
- data/zettacode.files/arithmetic.integer/ol.txt +23 -0
- data/zettacode.files/arithmetic.integer/onyx.txt +44 -0
- data/zettacode.files/arithmetic.integer/openscad.txt +6 -0
- data/zettacode.files/arithmetic.integer/oz.txt +19 -0
- data/zettacode.files/arithmetic.integer/panda.txt +2 -0
- data/zettacode.files/arithmetic.integer/pari-gp.txt +9 -0
- data/zettacode.files/arithmetic.integer/pascal.txt +14 -0
- data/zettacode.files/arithmetic.integer/perl.txt +12 -0
- data/zettacode.files/arithmetic.integer/phix.txt +49 -0
- data/zettacode.files/arithmetic.integer/phixmonti.txt +14 -0
- data/zettacode.files/arithmetic.integer/phl.txt +20 -0
- data/zettacode.files/arithmetic.integer/php.txt +13 -0
- data/zettacode.files/arithmetic.integer/picat.txt +8 -0
- data/zettacode.files/arithmetic.integer/picolisp.txt +8 -0
- data/zettacode.files/arithmetic.integer/piet.txt +38 -0
- data/zettacode.files/arithmetic.integer/pl-i.txt +8 -0
- data/zettacode.files/arithmetic.integer/plain_english.txt +26 -0
- data/zettacode.files/arithmetic.integer/pop11.txt +12 -0
- data/zettacode.files/arithmetic.integer/postscript.txt +10 -0
- data/zettacode.files/arithmetic.integer/powershell.txt +15 -0
- data/zettacode.files/arithmetic.integer/processing.txt +7 -0
- data/zettacode.files/arithmetic.integer/prodos.txt +35 -0
- data/zettacode.files/arithmetic.integer/prolog.txt +33 -0
- data/zettacode.files/arithmetic.integer/purebasic.txt +17 -0
- data/zettacode.files/arithmetic.integer/python.txt +47 -0
- data/zettacode.files/arithmetic.integer/qb64.txt +21 -0
- data/zettacode.files/arithmetic.integer/quackery.txt +12 -0
- data/zettacode.files/arithmetic.integer/r.txt +11 -0
- data/zettacode.files/arithmetic.integer/racket.txt +8 -0
- data/zettacode.files/arithmetic.integer/raku.txt +12 -0
- data/zettacode.files/arithmetic.integer/raven.txt +9 -0
- data/zettacode.files/arithmetic.integer/rebol.txt +51 -0
- data/zettacode.files/arithmetic.integer/relation.txt +11 -0
- data/zettacode.files/arithmetic.integer/rescript.txt +15 -0
- data/zettacode.files/arithmetic.integer/retro.txt +10 -0
- data/zettacode.files/arithmetic.integer/rexx.txt +47 -0
- data/zettacode.files/arithmetic.integer/ring.txt +11 -0
- data/zettacode.files/arithmetic.integer/robotic.txt +13 -0
- data/zettacode.files/arithmetic.integer/ruby.txt +12 -0
- data/zettacode.files/arithmetic.integer/run_basic.txt +9 -0
- data/zettacode.files/arithmetic.integer/rust.txt +15 -0
- data/zettacode.files/arithmetic.integer/sass-scss.txt +36 -0
- data/zettacode.files/arithmetic.integer/scala.txt +9 -0
- data/zettacode.files/arithmetic.integer/scheme.txt +27 -0
- data/zettacode.files/arithmetic.integer/seed7.txt +20 -0
- data/zettacode.files/arithmetic.integer/sensetalk.txt +12 -0
- data/zettacode.files/arithmetic.integer/sidef.txt +6 -0
- data/zettacode.files/arithmetic.integer/slate.txt +9 -0
- data/zettacode.files/arithmetic.integer/smalltalk.txt +28 -0
- data/zettacode.files/arithmetic.integer/smart_basic.txt +18 -0
- data/zettacode.files/arithmetic.integer/snobol4.txt +12 -0
- data/zettacode.files/arithmetic.integer/snusp.txt +61 -0
- data/zettacode.files/arithmetic.integer/sql.txt +68 -0
- data/zettacode.files/arithmetic.integer/ssem.txt +15 -0
- data/zettacode.files/arithmetic.integer/standard_ml.txt +13 -0
- data/zettacode.files/arithmetic.integer/swift.txt +11 -0
- data/zettacode.files/arithmetic.integer/tcl.txt +19 -0
- data/zettacode.files/arithmetic.integer/terraform.txt +33 -0
- data/zettacode.files/arithmetic.integer/ti-83_basic.txt +14 -0
- data/zettacode.files/arithmetic.integer/ti-89_basic.txt +8 -0
- data/zettacode.files/arithmetic.integer/toka.txt +7 -0
- data/zettacode.files/arithmetic.integer/tuscript.txt +9 -0
- data/zettacode.files/arithmetic.integer/unix_shell.txt +29 -0
- data/zettacode.files/arithmetic.integer/ursa.txt +27 -0
- data/zettacode.files/arithmetic.integer/v_(vlang).txt +29 -0
- data/zettacode.files/arithmetic.integer/vba.txt +19 -0
- data/zettacode.files/arithmetic.integer/vbscript.txt +51 -0
- data/zettacode.files/arithmetic.integer/vedit_macro_language.txt +8 -0
- data/zettacode.files/arithmetic.integer/verilog.txt +26 -0
- data/zettacode.files/arithmetic.integer/vim_script.txt +10 -0
- data/zettacode.files/arithmetic.integer/visual_basic_.net.txt +14 -0
- data/zettacode.files/arithmetic.integer/wart.txt +9 -0
- data/zettacode.files/arithmetic.integer/wren.txt +16 -0
- data/zettacode.files/arithmetic.integer/x86_assembly.txt +23 -0
- data/zettacode.files/arithmetic.integer/xlisp.txt +17 -0
- data/zettacode.files/arithmetic.integer/xpl0.txt +10 -0
- data/zettacode.files/arithmetic.integer/xslt.txt +10 -0
- data/zettacode.files/arithmetic.integer/yabasic.txt +11 -0
- data/zettacode.files/arithmetic.integer/yorick.txt +8 -0
- data/zettacode.files/arithmetic.integer/zkl.txt +7 -0
- data/zettacode.files/arithmetic.integer/zonnon.txt +13 -0
- data/zettacode.files/arithmetic.integer/zx_spectrum_basic.txt +11 -0
- data/zettacode.files/arithmetic.integer//320/274/320/272-61-52.txt +7 -0
- data/zettacode.files/hello_world.text/0815.txt +7 -0
- data/zettacode.files/hello_world.text/11l.txt +1 -0
- data/zettacode.files/hello_world.text/360_assembly.txt +17 -0
- data/zettacode.files/hello_world.text/4dos_batch.txt +1 -0
- data/zettacode.files/hello_world.text/6502_assembly.txt +22 -0
- data/zettacode.files/hello_world.text/6800_assembly.txt +31 -0
- data/zettacode.files/hello_world.text/8080_assembly.txt +12 -0
- data/zettacode.files/hello_world.text/8086_assembly.txt +30 -0
- data/zettacode.files/hello_world.text/8th.txt +1 -0
- data/zettacode.files/hello_world.text/aarch64_assembly.txt +22 -0
- data/zettacode.files/hello_world.text/abap.txt +2 -0
- data/zettacode.files/hello_world.text/acl2.txt +2 -0
- data/zettacode.files/hello_world.text/action!.txt +3 -0
- data/zettacode.files/hello_world.text/actionscript.txt +1 -0
- data/zettacode.files/hello_world.text/ada.txt +6 -0
- data/zettacode.files/hello_world.text/agda.txt +14 -0
- data/zettacode.files/hello_world.text/agena.txt +1 -0
- data/zettacode.files/hello_world.text/aime.txt +11 -0
- data/zettacode.files/hello_world.text/algae.txt +1 -0
- data/zettacode.files/hello_world.text/algol-m.txt +3 -0
- data/zettacode.files/hello_world.text/algol_60.txt +4 -0
- data/zettacode.files/hello_world.text/algol_68.txt +3 -0
- data/zettacode.files/hello_world.text/algol_w.txt +3 -0
- data/zettacode.files/hello_world.text/alore.txt +1 -0
- data/zettacode.files/hello_world.text/amazing_hopper.txt +21 -0
- data/zettacode.files/hello_world.text/ambienttalk.txt +1 -0
- data/zettacode.files/hello_world.text/amigae.txt +3 -0
- data/zettacode.files/hello_world.text/angelscript.txt +1 -0
- data/zettacode.files/hello_world.text/antlang.txt +3 -0
- data/zettacode.files/hello_world.text/anyways.txt +4 -0
- data/zettacode.files/hello_world.text/apl.txt +1 -0
- data/zettacode.files/hello_world.text/applescript.txt +5 -0
- data/zettacode.files/hello_world.text/applesoft_basic.txt +5 -0
- data/zettacode.files/hello_world.text/apricot.txt +1 -0
- data/zettacode.files/hello_world.text/arc.txt +1 -0
- data/zettacode.files/hello_world.text/arendelle.txt +1 -0
- data/zettacode.files/hello_world.text/argile.txt +3 -0
- data/zettacode.files/hello_world.text/arm_assembly.txt +13 -0
- data/zettacode.files/hello_world.text/arnoldc.txt +3 -0
- data/zettacode.files/hello_world.text/arturo.txt +1 -0
- data/zettacode.files/hello_world.text/asciidots.txt +4 -0
- data/zettacode.files/hello_world.text/astro.txt +1 -0
- data/zettacode.files/hello_world.text/asymptote.txt +2 -0
- data/zettacode.files/hello_world.text/ats.txt +1 -0
- data/zettacode.files/hello_world.text/autohotkey.txt +9 -0
- data/zettacode.files/hello_world.text/autoit.txt +1 -0
- data/zettacode.files/hello_world.text/autolisp.txt +1 -0
- data/zettacode.files/hello_world.text/avail.txt +1 -0
- data/zettacode.files/hello_world.text/awk.txt +30 -0
- data/zettacode.files/hello_world.text/axe.txt +2 -0
- data/zettacode.files/hello_world.text/b.txt +6 -0
- data/zettacode.files/hello_world.text/b4x.txt +1 -0
- data/zettacode.files/hello_world.text/babel.txt +2 -0
- data/zettacode.files/hello_world.text/bash.txt +1 -0
- data/zettacode.files/hello_world.text/basic.txt +14 -0
- data/zettacode.files/hello_world.text/basic256.txt +1 -0
- data/zettacode.files/hello_world.text/batch_file.txt +6 -0
- data/zettacode.files/hello_world.text/battlestar.txt +4 -0
- data/zettacode.files/hello_world.text/bbc_basic.txt +1 -0
- data/zettacode.files/hello_world.text/bc.txt +2 -0
- data/zettacode.files/hello_world.text/bcpl.txt +6 -0
- data/zettacode.files/hello_world.text/beef.txt +11 -0
- data/zettacode.files/hello_world.text/beeswax.txt +23 -0
- data/zettacode.files/hello_world.text/befunge.txt +1 -0
- data/zettacode.files/hello_world.text/binary_lambda_calculus.txt +2 -0
- data/zettacode.files/hello_world.text/bird.txt +6 -0
- data/zettacode.files/hello_world.text/blade.txt +6 -0
- data/zettacode.files/hello_world.text/blast.txt +10 -0
- data/zettacode.files/hello_world.text/blue.txt +18 -0
- data/zettacode.files/hello_world.text/blz.txt +1 -0
- data/zettacode.files/hello_world.text/bml.txt +1 -0
- data/zettacode.files/hello_world.text/boo.txt +1 -0
- data/zettacode.files/hello_world.text/bootbasic.txt +1 -0
- data/zettacode.files/hello_world.text/bqn.txt +4 -0
- data/zettacode.files/hello_world.text/brace.txt +4 -0
- data/zettacode.files/hello_world.text/bracmat.txt +1 -0
- data/zettacode.files/hello_world.text/brainf***.txt +83 -0
- data/zettacode.files/hello_world.text/brat.txt +1 -0
- data/zettacode.files/hello_world.text/brlcad.txt +6 -0
- data/zettacode.files/hello_world.text/burlesque.txt +6 -0
- data/zettacode.files/hello_world.text/c++-cli.txt +5 -0
- data/zettacode.files/hello_world.text/c++.txt +5 -0
- data/zettacode.files/hello_world.text/c.txt +37 -0
- data/zettacode.files/hello_world.text/c1r.txt +1 -0
- data/zettacode.files/hello_world.text/c2.txt +7 -0
- data/zettacode.files/hello_world.text/c3.txt +7 -0
- data/zettacode.files/hello_world.text/c_sharp|c#.txt +19 -0
- data/zettacode.files/hello_world.text/casio_basic.txt +3 -0
- data/zettacode.files/hello_world.text/cat.txt +1 -0
- data/zettacode.files/hello_world.text/cduce.txt +1 -0
- data/zettacode.files/hello_world.text/cfengine.txt +11 -0
- data/zettacode.files/hello_world.text/chapel.txt +1 -0
- data/zettacode.files/hello_world.text/chef.txt +36 -0
- data/zettacode.files/hello_world.text/chuck.txt +1 -0
- data/zettacode.files/hello_world.text/cind.txt +6 -0
- data/zettacode.files/hello_world.text/clay.txt +3 -0
- data/zettacode.files/hello_world.text/clean.txt +1 -0
- data/zettacode.files/hello_world.text/clio.txt +1 -0
- data/zettacode.files/hello_world.text/clipper.txt +1 -0
- data/zettacode.files/hello_world.text/clips.txt +1 -0
- data/zettacode.files/hello_world.text/clojure.txt +1 -0
- data/zettacode.files/hello_world.text/clu.txt +4 -0
- data/zettacode.files/hello_world.text/cmake.txt +5 -0
- data/zettacode.files/hello_world.text/cobol.txt +22 -0
- data/zettacode.files/hello_world.text/cobra.txt +3 -0
- data/zettacode.files/hello_world.text/coffeescript.txt +4 -0
- data/zettacode.files/hello_world.text/coldfusion.txt +1 -0
- data/zettacode.files/hello_world.text/comal.txt +1 -0
- data/zettacode.files/hello_world.text/comefrom0x10.txt +3 -0
- data/zettacode.files/hello_world.text/commodore_basic.txt +5 -0
- data/zettacode.files/hello_world.text/common_lisp.txt +18 -0
- data/zettacode.files/hello_world.text/component_pascal.txt +10 -0
- data/zettacode.files/hello_world.text/coq.txt +5 -0
- data/zettacode.files/hello_world.text/corescript.txt +1 -0
- data/zettacode.files/hello_world.text/cowgol.txt +4 -0
- data/zettacode.files/hello_world.text/crack.txt +4 -0
- data/zettacode.files/hello_world.text/creative_basic.txt +15 -0
- data/zettacode.files/hello_world.text/crystal.txt +1 -0
- data/zettacode.files/hello_world.text/d.txt +6 -0
- data/zettacode.files/hello_world.text/dafny.txt +6 -0
- data/zettacode.files/hello_world.text/dao.txt +1 -0
- data/zettacode.files/hello_world.text/dart.txt +4 -0
- data/zettacode.files/hello_world.text/dataweave.txt +1 -0
- data/zettacode.files/hello_world.text/dbl.txt +15 -0
- data/zettacode.files/hello_world.text/dc.txt +3 -0
- data/zettacode.files/hello_world.text/dcl.txt +1 -0
- data/zettacode.files/hello_world.text/ddnc.txt +40 -0
- data/zettacode.files/hello_world.text/delphi.txt +7 -0
- data/zettacode.files/hello_world.text/deviousyarn.txt +1 -0
- data/zettacode.files/hello_world.text/dibol-11.txt +14 -0
- data/zettacode.files/hello_world.text/diego.txt +12 -0
- data/zettacode.files/hello_world.text/div_games_studio.txt +12 -0
- data/zettacode.files/hello_world.text/dm.txt +5 -0
- data/zettacode.files/hello_world.text/draco.txt +3 -0
- data/zettacode.files/hello_world.text/dragon.txt +3 -0
- data/zettacode.files/hello_world.text/dwscript.txt +3 -0
- data/zettacode.files/hello_world.text/dyalect.txt +1 -0
- data/zettacode.files/hello_world.text/dylan.net.txt +28 -0
- data/zettacode.files/hello_world.text/dylan.txt +5 -0
- data/zettacode.files/hello_world.text/d/303/251j/303/240_vu.txt +1 -0
- data/zettacode.files/hello_world.text/e.txt +3 -0
- data/zettacode.files/hello_world.text/easylang.txt +2 -0
- data/zettacode.files/hello_world.text/ec.txt +7 -0
- data/zettacode.files/hello_world.text/echolisp.txt +3 -0
- data/zettacode.files/hello_world.text/ecl.txt +3 -0
- data/zettacode.files/hello_world.text/ecstasy.txt +8 -0
- data/zettacode.files/hello_world.text/edsac_order_code.txt +34 -0
- data/zettacode.files/hello_world.text/efene.txt +10 -0
- data/zettacode.files/hello_world.text/egel.txt +3 -0
- data/zettacode.files/hello_world.text/egison.txt +6 -0
- data/zettacode.files/hello_world.text/egl.txt +9 -0
- data/zettacode.files/hello_world.text/eiffel.txt +11 -0
- data/zettacode.files/hello_world.text/ela.txt +2 -0
- data/zettacode.files/hello_world.text/elan.txt +1 -0
- data/zettacode.files/hello_world.text/elastic.txt +20 -0
- data/zettacode.files/hello_world.text/elena.txt +5 -0
- data/zettacode.files/hello_world.text/elisa.txt +1 -0
- data/zettacode.files/hello_world.text/elixir.txt +3 -0
- data/zettacode.files/hello_world.text/elm.txt +1 -0
- data/zettacode.files/hello_world.text/emacs_lisp.txt +6 -0
- data/zettacode.files/hello_world.text/emojicode.txt +3 -0
- data/zettacode.files/hello_world.text/erlang.txt +1 -0
- data/zettacode.files/hello_world.text/erre.txt +7 -0
- data/zettacode.files/hello_world.text/euler_math_toolbox.txt +4 -0
- data/zettacode.files/hello_world.text/extended_brainf***.txt +2 -0
- data/zettacode.files/hello_world.text/ezhil.txt +5 -0
- data/zettacode.files/hello_world.text/f_sharp|f#.txt +3 -0
- data/zettacode.files/hello_world.text/factor.txt +1 -0
- data/zettacode.files/hello_world.text/falcon.txt +4 -0
- data/zettacode.files/hello_world.text/false.txt +2 -0
- data/zettacode.files/hello_world.text/fantom.txt +10 -0
- data/zettacode.files/hello_world.text/fennel.txt +1 -0
- data/zettacode.files/hello_world.text/ferite.txt +3 -0
- data/zettacode.files/hello_world.text/fermat.txt +1 -0
- data/zettacode.files/hello_world.text/fexl.txt +1 -0
- data/zettacode.files/hello_world.text/fhidwfe.txt +1 -0
- data/zettacode.files/hello_world.text/fish.txt +9 -0
- data/zettacode.files/hello_world.text/focal.txt +1 -0
- data/zettacode.files/hello_world.text/forth.txt +5 -0
- data/zettacode.files/hello_world.text/fortran.txt +16 -0
- data/zettacode.files/hello_world.text/fortress.txt +3 -0
- data/zettacode.files/hello_world.text/free_pascal.txt +21 -0
- data/zettacode.files/hello_world.text/freebasic.txt +3 -0
- data/zettacode.files/hello_world.text/frege.txt +5 -0
- data/zettacode.files/hello_world.text/friendly_interactive_shell.txt +2 -0
- data/zettacode.files/hello_world.text/frink.txt +3 -0
- data/zettacode.files/hello_world.text/funl.txt +2 -0
- data/zettacode.files/hello_world.text/furor.txt +1 -0
- data/zettacode.files/hello_world.text/futurebasic.txt +4 -0
- data/zettacode.files/hello_world.text/fuze_basic.txt +1 -0
- data/zettacode.files/hello_world.text/gambas.txt +6 -0
- data/zettacode.files/hello_world.text/gap.txt +10 -0
- data/zettacode.files/hello_world.text/gb_basic.txt +1 -0
- data/zettacode.files/hello_world.text/gecho.txt +1 -0
- data/zettacode.files/hello_world.text/gema.txt +5 -0
- data/zettacode.files/hello_world.text/genie.txt +4 -0
- data/zettacode.files/hello_world.text/gentee.txt +4 -0
- data/zettacode.files/hello_world.text/gfa_basic.txt +1 -0
- data/zettacode.files/hello_world.text/glbasic.txt +1 -0
- data/zettacode.files/hello_world.text/glee.txt +13 -0
- data/zettacode.files/hello_world.text/global_script.txt +3 -0
- data/zettacode.files/hello_world.text/glovepie.txt +1 -0
- data/zettacode.files/hello_world.text/gml.txt +2 -0
- data/zettacode.files/hello_world.text/go.txt +6 -0
- data/zettacode.files/hello_world.text/golfscript.txt +1 -0
- data/zettacode.files/hello_world.text/gosu.txt +1 -0
- data/zettacode.files/hello_world.text/grain.txt +1 -0
- data/zettacode.files/hello_world.text/groovy.txt +1 -0
- data/zettacode.files/hello_world.text/gw-basic.txt +1 -0
- data/zettacode.files/hello_world.text/hack.txt +1 -0
- data/zettacode.files/hello_world.text/halon.txt +3 -0
- data/zettacode.files/hello_world.text/harbour.txt +1 -0
- data/zettacode.files/hello_world.text/hare.txt +5 -0
- data/zettacode.files/hello_world.text/haskell.txt +3 -0
- data/zettacode.files/hello_world.text/haxe.txt +1 -0
- data/zettacode.files/hello_world.text/hexiscript.txt +1 -0
- data/zettacode.files/hello_world.text/hicest.txt +1 -0
- data/zettacode.files/hello_world.text/hla.txt +7 -0
- data/zettacode.files/hello_world.text/holyc.txt +1 -0
- data/zettacode.files/hello_world.text/hoon.txt +1 -0
- data/zettacode.files/hello_world.text/hpppl.txt +1 -0
- data/zettacode.files/hello_world.text/hq9+.txt +7 -0
- data/zettacode.files/hello_world.text/html5.txt +8 -0
- data/zettacode.files/hello_world.text/huginn.txt +8 -0
- data/zettacode.files/hello_world.text/hy.txt +1 -0
- data/zettacode.files/hello_world.text/i.txt +3 -0
- data/zettacode.files/hello_world.text/icon}}_and_{{header|unicon.txt +3 -0
- data/zettacode.files/hello_world.text/idl.txt +1 -0
- data/zettacode.files/hello_world.text/idris.txt +4 -0
- data/zettacode.files/hello_world.text/inform_6.txt +3 -0
- data/zettacode.files/hello_world.text/inko.txt +4 -0
- data/zettacode.files/hello_world.text/integer_basic.txt +4 -0
- data/zettacode.files/hello_world.text/intercal.txt +17 -0
- data/zettacode.files/hello_world.text/io.txt +1 -0
- data/zettacode.files/hello_world.text/ioke.txt +1 -0
- data/zettacode.files/hello_world.text/is-basic.txt +1 -0
- data/zettacode.files/hello_world.text/isabelle.txt +5 -0
- data/zettacode.files/hello_world.text/iwbasic.txt +15 -0
- data/zettacode.files/hello_world.text/j.txt +40 -0
- data/zettacode.files/hello_world.text/jack.txt +7 -0
- data/zettacode.files/hello_world.text/jacquard_loom.txt +88 -0
- data/zettacode.files/hello_world.text/java.txt +7 -0
- data/zettacode.files/hello_world.text/javascript.txt +12 -0
- data/zettacode.files/hello_world.text/jcl.txt +1 -0
- data/zettacode.files/hello_world.text/jinja.txt +9 -0
- data/zettacode.files/hello_world.text/joy.txt +1 -0
- data/zettacode.files/hello_world.text/jq.txt +1 -0
- data/zettacode.files/hello_world.text/jse.txt +1 -0
- data/zettacode.files/hello_world.text/jsish.txt +1 -0
- data/zettacode.files/hello_world.text/julia.txt +1 -0
- data/zettacode.files/hello_world.text/k.txt +14 -0
- data/zettacode.files/hello_world.text/kabap.txt +1 -0
- data/zettacode.files/hello_world.text/kaya.txt +6 -0
- data/zettacode.files/hello_world.text/kdf9_usercode.txt +13 -0
- data/zettacode.files/hello_world.text/keg.txt +1 -0
- data/zettacode.files/hello_world.text/kite.txt +4 -0
- data/zettacode.files/hello_world.text/kitten.txt +2 -0
- data/zettacode.files/hello_world.text/koka.txt +3 -0
- data/zettacode.files/hello_world.text/konsolscript.txt +4 -0
- data/zettacode.files/hello_world.text/kotlin.txt +3 -0
- data/zettacode.files/hello_world.text/kql.txt +2 -0
- data/zettacode.files/hello_world.text/ksi.txt +5 -0
- data/zettacode.files/hello_world.text/lambdatalk.txt +5 -0
- data/zettacode.files/hello_world.text/lang5.txt +1 -0
- data/zettacode.files/hello_world.text/langur.txt +1 -0
- data/zettacode.files/hello_world.text/lasso.txt +2 -0
- data/zettacode.files/hello_world.text/latex.txt +4 -0
- data/zettacode.files/hello_world.text/latitude.txt +1 -0
- data/zettacode.files/hello_world.text/lc3_assembly.txt +18 -0
- data/zettacode.files/hello_world.text/ldpl.txt +4 -0
- data/zettacode.files/hello_world.text/lean.txt +3 -0
- data/zettacode.files/hello_world.text/lfe.txt +3 -0
- data/zettacode.files/hello_world.text/liberty_basic.txt +1 -0
- data/zettacode.files/hello_world.text/lil.txt +5 -0
- data/zettacode.files/hello_world.text/lily.txt +7 -0
- data/zettacode.files/hello_world.text/lilypond.txt +11 -0
- data/zettacode.files/hello_world.text/limbo.txt +14 -0
- data/zettacode.files/hello_world.text/lingo.txt +5 -0
- data/zettacode.files/hello_world.text/lisaac.txt +16 -0
- data/zettacode.files/hello_world.text/little.txt +9 -0
- data/zettacode.files/hello_world.text/livecode.txt +15 -0
- data/zettacode.files/hello_world.text/llvm.txt +13 -0
- data/zettacode.files/hello_world.text/lobster.txt +1 -0
- data/zettacode.files/hello_world.text/logo.txt +4 -0
- data/zettacode.files/hello_world.text/logtalk.txt +7 -0
- data/zettacode.files/hello_world.text/lolcode.txt +6 -0
- data/zettacode.files/hello_world.text/lotusscript.txt +5 -0
- data/zettacode.files/hello_world.text/lse.txt +1 -0
- data/zettacode.files/hello_world.text/lse64.txt +1 -0
- data/zettacode.files/hello_world.text/lua.txt +12 -0
- data/zettacode.files/hello_world.text/luna.txt +3 -0
- data/zettacode.files/hello_world.text/m2000_interpreter.txt +5 -0
- data/zettacode.files/hello_world.text/m4.txt +2 -0
- data/zettacode.files/hello_world.text/maclisp.txt +3 -0
- data/zettacode.files/hello_world.text/macro-10.txt +24 -0
- data/zettacode.files/hello_world.text/macro-11.txt +28 -0
- data/zettacode.files/hello_world.text/mad.txt +4 -0
- data/zettacode.files/hello_world.text/make.txt +9 -0
- data/zettacode.files/hello_world.text/malbolge.txt +7 -0
- data/zettacode.files/hello_world.text/manool.txt +10 -0
- data/zettacode.files/hello_world.text/maple.txt +4 -0
- data/zettacode.files/hello_world.text/mathcad.txt +3 -0
- data/zettacode.files/hello_world.text/mathematica}}_-_{{header|wolfram_language.txt +1 -0
- data/zettacode.files/hello_world.text/matlab.txt +2 -0
- data/zettacode.files/hello_world.text/maude.txt +13 -0
- data/zettacode.files/hello_world.text/maxima.txt +1 -0
- data/zettacode.files/hello_world.text/maxscript.txt +3 -0
- data/zettacode.files/hello_world.text/mdl.txt +2 -0
- data/zettacode.files/hello_world.text/mel.txt +3 -0
- data/zettacode.files/hello_world.text/melonbasic.txt +3 -0
- data/zettacode.files/hello_world.text/mercury.txt +8 -0
- data/zettacode.files/hello_world.text/metafont.txt +1 -0
- data/zettacode.files/hello_world.text/min.txt +1 -0
- data/zettacode.files/hello_world.text/miniscript.txt +1 -0
- data/zettacode.files/hello_world.text/minizinc.txt +2 -0
- data/zettacode.files/hello_world.text/mips_assembly.txt +12 -0
- data/zettacode.files/hello_world.text/mirc_scripting_language.txt +1 -0
- data/zettacode.files/hello_world.text/ml-i.txt +1 -0
- data/zettacode.files/hello_world.text/modula-2.txt +24 -0
- data/zettacode.files/hello_world.text/modula-3.txt +7 -0
- data/zettacode.files/hello_world.text/montilang.txt +1 -0
- data/zettacode.files/hello_world.text/morfa.txt +7 -0
- data/zettacode.files/hello_world.text/mosaic.txt +3 -0
- data/zettacode.files/hello_world.text/muf.txt +4 -0
- data/zettacode.files/hello_world.text/mumps.txt +1 -0
- data/zettacode.files/hello_world.text/mydef.txt +27 -0
- data/zettacode.files/hello_world.text/myrtlescript.txt +6 -0
- data/zettacode.files/hello_world.text/mysql.txt +2 -0
- data/zettacode.files/hello_world.text/mythryl.txt +2 -0
- data/zettacode.files/hello_world.text/n-t-roff.txt +6 -0
- data/zettacode.files/hello_world.text/nanoquery.txt +1 -0
- data/zettacode.files/hello_world.text/neat.txt +2 -0
- data/zettacode.files/hello_world.text/neko.txt +1 -0
- data/zettacode.files/hello_world.text/nemerle.txt +13 -0
- data/zettacode.files/hello_world.text/netrexx.txt +1 -0
- data/zettacode.files/hello_world.text/never.txt +4 -0
- data/zettacode.files/hello_world.text/newlisp.txt +2 -0
- data/zettacode.files/hello_world.text/nickle.txt +1 -0
- data/zettacode.files/hello_world.text/nim.txt +3 -0
- data/zettacode.files/hello_world.text/nit.txt +1 -0
- data/zettacode.files/hello_world.text/nix.txt +1 -0
- data/zettacode.files/hello_world.text/nlp++.txt +5 -0
- data/zettacode.files/hello_world.text/ns-hubasic.txt +6 -0
- data/zettacode.files/hello_world.text/nyquist.txt +15 -0
- data/zettacode.files/hello_world.text/oberon-2.txt +11 -0
- data/zettacode.files/hello_world.text/objeck.txt +6 -0
- data/zettacode.files/hello_world.text/objective-c.txt +42 -0
- data/zettacode.files/hello_world.text/ocaml.txt +1 -0
- data/zettacode.files/hello_world.text/occam.txt +5 -0
- data/zettacode.files/hello_world.text/octave.txt +5 -0
- data/zettacode.files/hello_world.text/odin.txt +6 -0
- data/zettacode.files/hello_world.text/oforth.txt +1 -0
- data/zettacode.files/hello_world.text/ol.txt +1 -0
- data/zettacode.files/hello_world.text/onyx.txt +1 -0
- data/zettacode.files/hello_world.text/ooc.txt +8 -0
- data/zettacode.files/hello_world.text/oorexx.txt +4 -0
- data/zettacode.files/hello_world.text/openlisp.txt +10 -0
- data/zettacode.files/hello_world.text/openscad.txt +5 -0
- data/zettacode.files/hello_world.text/oxygene.txt +25 -0
- data/zettacode.files/hello_world.text/oz.txt +1 -0
- data/zettacode.files/hello_world.text/pari-gp.txt +2 -0
- data/zettacode.files/hello_world.text/pascal.txt +5 -0
- data/zettacode.files/hello_world.text/pasm.txt +2 -0
- data/zettacode.files/hello_world.text/pdp-11_assembly.txt +15 -0
- data/zettacode.files/hello_world.text/pdp-1_assembly.txt +22 -0
- data/zettacode.files/hello_world.text/pepsiscript.txt +16 -0
- data/zettacode.files/hello_world.text/perl.txt +11 -0
- data/zettacode.files/hello_world.text/peylang.txt +1 -0
- data/zettacode.files/hello_world.text/pharo.txt +4 -0
- data/zettacode.files/hello_world.text/phix.txt +4 -0
- data/zettacode.files/hello_world.text/phl.txt +7 -0
- data/zettacode.files/hello_world.text/php.txt +5 -0
- data/zettacode.files/hello_world.text/picat.txt +1 -0
- data/zettacode.files/hello_world.text/picolisp.txt +1 -0
- data/zettacode.files/hello_world.text/pict.txt +6 -0
- data/zettacode.files/hello_world.text/pikachu.txt +23 -0
- data/zettacode.files/hello_world.text/pike.txt +3 -0
- data/zettacode.files/hello_world.text/pilot.txt +1 -0
- data/zettacode.files/hello_world.text/pir.txt +3 -0
- data/zettacode.files/hello_world.text/pixilang.txt +1 -0
- data/zettacode.files/hello_world.text/pl-i.txt +3 -0
- data/zettacode.files/hello_world.text/pl-m.txt +13 -0
- data/zettacode.files/hello_world.text/pl-sql.txt +21 -0
- data/zettacode.files/hello_world.text/plain_english.txt +7 -0
- data/zettacode.files/hello_world.text/plan.txt +14 -0
- data/zettacode.files/hello_world.text/pony.txt +3 -0
- data/zettacode.files/hello_world.text/pop11.txt +1 -0
- data/zettacode.files/hello_world.text/portugol.txt +11 -0
- data/zettacode.files/hello_world.text/postscript.txt +31 -0
- data/zettacode.files/hello_world.text/potion.txt +1 -0
- data/zettacode.files/hello_world.text/powerbasic.txt +7 -0
- data/zettacode.files/hello_world.text/powershell.txt +4 -0
- data/zettacode.files/hello_world.text/processing.txt +1 -0
- data/zettacode.files/hello_world.text/prodos.txt +1 -0
- data/zettacode.files/hello_world.text/programming_language.txt +5 -0
- data/zettacode.files/hello_world.text/prolog.txt +1 -0
- data/zettacode.files/hello_world.text/promal.txt +7 -0
- data/zettacode.files/hello_world.text/psql.txt +7 -0
- data/zettacode.files/hello_world.text/pure.txt +5 -0
- data/zettacode.files/hello_world.text/purebasic.txt +5 -0
- data/zettacode.files/hello_world.text/python.txt +19 -0
- data/zettacode.files/hello_world.text/qb64.txt +1 -0
- data/zettacode.files/hello_world.text/quackery.txt +1 -0
- data/zettacode.files/hello_world.text/quill.txt +1 -0
- data/zettacode.files/hello_world.text/quite_basic.txt +1 -0
- data/zettacode.files/hello_world.text/r.txt +5 -0
- data/zettacode.files/hello_world.text/ra.txt +8 -0
- data/zettacode.files/hello_world.text/racket.txt +3 -0
- data/zettacode.files/hello_world.text/raku.txt +4 -0
- data/zettacode.files/hello_world.text/rasel.txt +1 -0
- data/zettacode.files/hello_world.text/ratfor.txt +11 -0
- data/zettacode.files/hello_world.text/raven.txt +1 -0
- data/zettacode.files/hello_world.text/realbasic.txt +7 -0
- data/zettacode.files/hello_world.text/rebol.txt +1 -0
- data/zettacode.files/hello_world.text/red.txt +1 -0
- data/zettacode.files/hello_world.text/relation.txt +4 -0
- data/zettacode.files/hello_world.text/rescript.txt +2 -0
- data/zettacode.files/hello_world.text/retro.txt +4 -0
- data/zettacode.files/hello_world.text/rexx.txt +13 -0
- data/zettacode.files/hello_world.text/ring.txt +1 -0
- data/zettacode.files/hello_world.text/risc-v.txt +11 -0
- data/zettacode.files/hello_world.text/rockstar.txt +1 -0
- data/zettacode.files/hello_world.text/rtl-2.txt +12 -0
- data/zettacode.files/hello_world.text/ruby.txt +11 -0
- data/zettacode.files/hello_world.text/run_basic.txt +1 -0
- data/zettacode.files/hello_world.text/rust.txt +13 -0
- data/zettacode.files/hello_world.text/salmon.txt +9 -0
- data/zettacode.files/hello_world.text/sas.txt +4 -0
- data/zettacode.files/hello_world.text/sasl.txt +4 -0
- data/zettacode.files/hello_world.text/sather.txt +5 -0
- data/zettacode.files/hello_world.text/scala.txt +19 -0
- data/zettacode.files/hello_world.text/scheme.txt +21 -0
- data/zettacode.files/hello_world.text/scilab.txt +1 -0
- data/zettacode.files/hello_world.text/scratchscript.txt +4 -0
- data/zettacode.files/hello_world.text/sed.txt +3 -0
- data/zettacode.files/hello_world.text/seed7.txt +6 -0
- data/zettacode.files/hello_world.text/self.txt +1 -0
- data/zettacode.files/hello_world.text/sensetalk.txt +1 -0
- data/zettacode.files/hello_world.text/set_lang.txt +12 -0
- data/zettacode.files/hello_world.text/setl.txt +1 -0
- data/zettacode.files/hello_world.text/setl4.txt +1 -0
- data/zettacode.files/hello_world.text/shen.txt +1 -0
- data/zettacode.files/hello_world.text/shiny.txt +1 -0
- data/zettacode.files/hello_world.text/sidef.txt +1 -0
- data/zettacode.files/hello_world.text/simplecode.txt +3 -0
- data/zettacode.files/hello_world.text/simpol.txt +2 -0
- data/zettacode.files/hello_world.text/simula.txt +5 -0
- data/zettacode.files/hello_world.text/sing.txt +7 -0
- data/zettacode.files/hello_world.text/sisal.txt +10 -0
- data/zettacode.files/hello_world.text/skookumscript.txt +3 -0
- data/zettacode.files/hello_world.text/slate.txt +1 -0
- data/zettacode.files/hello_world.text/slope.txt +1 -0
- data/zettacode.files/hello_world.text/smalltalk.txt +4 -0
- data/zettacode.files/hello_world.text/smart_basic.txt +1 -0
- data/zettacode.files/hello_world.text/smilebasic.txt +1 -0
- data/zettacode.files/hello_world.text/snobol4.txt +3 -0
- data/zettacode.files/hello_world.text/snusp.txt +11 -0
- data/zettacode.files/hello_world.text/soneking_assembly.txt +10 -0
- data/zettacode.files/hello_world.text/sparc_assembly.txt +18 -0
- data/zettacode.files/hello_world.text/sparkling.txt +1 -0
- data/zettacode.files/hello_world.text/spl.txt +1 -0
- data/zettacode.files/hello_world.text/sql.txt +12 -0
- data/zettacode.files/hello_world.text/sql_pl.txt +35 -0
- data/zettacode.files/hello_world.text/standard_ml.txt +1 -0
- data/zettacode.files/hello_world.text/stata.txt +1 -0
- data/zettacode.files/hello_world.text/suneido.txt +1 -0
- data/zettacode.files/hello_world.text/swahili.txt +1 -0
- data/zettacode.files/hello_world.text/swift.txt +4 -0
- data/zettacode.files/hello_world.text/symsyn.txt +3 -0
- data/zettacode.files/hello_world.text/tailspin.txt +1 -0
- data/zettacode.files/hello_world.text/tcl.txt +5 -0
- data/zettacode.files/hello_world.text/teco.txt +2 -0
- data/zettacode.files/hello_world.text/tern.txt +1 -0
- data/zettacode.files/hello_world.text/terra.txt +6 -0
- data/zettacode.files/hello_world.text/terraform.txt +3 -0
- data/zettacode.files/hello_world.text/testml.txt +2 -0
- data/zettacode.files/hello_world.text/ti-83_basic.txt +2 -0
- data/zettacode.files/hello_world.text/ti-89_basic.txt +1 -0
- data/zettacode.files/hello_world.text/tiny_basic.txt +5 -0
- data/zettacode.files/hello_world.text/tmg.txt +2 -0
- data/zettacode.files/hello_world.text/torquescript.txt +1 -0
- data/zettacode.files/hello_world.text/tpp.txt +1 -0
- data/zettacode.files/hello_world.text/transact-sql.txt +2 -0
- data/zettacode.files/hello_world.text/transd.txt +2 -0
- data/zettacode.files/hello_world.text/transforth.txt +1 -0
- data/zettacode.files/hello_world.text/trith.txt +1 -0
- data/zettacode.files/hello_world.text/true_basic.txt +5 -0
- data/zettacode.files/hello_world.text/tuscript.txt +8 -0
- data/zettacode.files/hello_world.text/ubasic-4th.txt +1 -0
- data/zettacode.files/hello_world.text/uniface.txt +3 -0
- data/zettacode.files/hello_world.text/unison.txt +3 -0
- data/zettacode.files/hello_world.text/unix_shell.txt +9 -0
- data/zettacode.files/hello_world.text/unlambda.txt +1 -0
- data/zettacode.files/hello_world.text/ursa.txt +1 -0
- data/zettacode.files/hello_world.text/ursala.txt +10 -0
- data/zettacode.files/hello_world.text/v.txt +1 -0
- data/zettacode.files/hello_world.text/v_(vlang).txt +3 -0
- data/zettacode.files/hello_world.text/vala.txt +3 -0
- data/zettacode.files/hello_world.text/vax_assembly.txt +10 -0
- data/zettacode.files/hello_world.text/vba.txt +6 -0
- data/zettacode.files/hello_world.text/vbscript.txt +2 -0
- data/zettacode.files/hello_world.text/vedit_macro_language.txt +1 -0
- data/zettacode.files/hello_world.text/verbexx.txt +2 -0
- data/zettacode.files/hello_world.text/verilog.txt +8 -0
- data/zettacode.files/hello_world.text/vhdl.txt +16 -0
- data/zettacode.files/hello_world.text/vim_script.txt +1 -0
- data/zettacode.files/hello_world.text/visual_basic.txt +22 -0
- data/zettacode.files/hello_world.text/visual_basic_.net.txt +7 -0
- data/zettacode.files/hello_world.text/viua_vm_assembly.txt +6 -0
- data/zettacode.files/hello_world.text/vtl-2.txt +1 -0
- data/zettacode.files/hello_world.text/wart.txt +2 -0
- data/zettacode.files/hello_world.text/wdte.txt +1 -0
- data/zettacode.files/hello_world.text/webassembly.txt +38 -0
- data/zettacode.files/hello_world.text/wee_basic.txt +2 -0
- data/zettacode.files/hello_world.text/whenever.txt +2 -0
- data/zettacode.files/hello_world.text/whiley.txt +5 -0
- data/zettacode.files/hello_world.text/whitespace.txt +1 -0
- data/zettacode.files/hello_world.text/wisp.txt +8 -0
- data/zettacode.files/hello_world.text/wolfram_language.txt +1 -0
- data/zettacode.files/hello_world.text/wren.txt +1 -0
- data/zettacode.files/hello_world.text/x10.txt +8 -0
- data/zettacode.files/hello_world.text/x86-64_assembly.txt +44 -0
- data/zettacode.files/hello_world.text/x86_assembly.txt +37 -0
- data/zettacode.files/hello_world.text/xbasic.txt +12 -0
- data/zettacode.files/hello_world.text/xeec.txt +4 -0
- data/zettacode.files/hello_world.text/xl.txt +2 -0
- data/zettacode.files/hello_world.text/xlisp.txt +2 -0
- data/zettacode.files/hello_world.text/xpath.txt +1 -0
- data/zettacode.files/hello_world.text/xpl0.txt +3 -0
- data/zettacode.files/hello_world.text/xslt.txt +5 -0
- data/zettacode.files/hello_world.text/yabasic.txt +3 -0
- data/zettacode.files/hello_world.text/yorick.txt +1 -0
- data/zettacode.files/hello_world.text/z80_assembly.txt +21 -0
- data/zettacode.files/hello_world.text/zig.txt +4 -0
- data/zettacode.files/hello_world.text/zkl.txt +2 -0
- data/zettacode.files/hello_world.text/zoea.txt +2 -0
- data/zettacode.files/hello_world.text/zoea_visual.txt +1 -0
- data/zettacode.files/hello_world.text/zoomscript.txt +5 -0
- data/zettacode.files/hello_world.text/zx_spectrum_basic.txt +4 -0
- data/zettacode.files/hello_world.text//340/256/211/340/256/257/340/256/277/340/256/260/340/257/215-uyir.txt +5 -0
- data/zettacode.files/input/aritmetic-integer.xml +5876 -0
- data/zettacode.files/input/hello-world-text.xml +4498 -0
- data/zettacode.gemspec +45 -0
- metadata +892 -0
@@ -0,0 +1,4498 @@
|
|
1
|
+
<mediawiki xmlns="http://www.mediawiki.org/xml/export-0.11/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.mediawiki.org/xml/export-0.11/ http://www.mediawiki.org/xml/export-0.11.xsd" version="0.11" xml:lang="en">
|
2
|
+
<siteinfo>
|
3
|
+
<sitename>Rosetta Code</sitename>
|
4
|
+
<dbname>rosettacodewiki</dbname>
|
5
|
+
<base>https://rosettacode.org/wiki/Rosetta_Code</base>
|
6
|
+
<generator>MediaWiki 1.38.4</generator>
|
7
|
+
<case>first-letter</case>
|
8
|
+
<namespaces>
|
9
|
+
<namespace key="-2" case="first-letter">Media</namespace>
|
10
|
+
<namespace key="-1" case="first-letter">Special</namespace>
|
11
|
+
<namespace key="0" case="first-letter" />
|
12
|
+
<namespace key="1" case="first-letter">Talk</namespace>
|
13
|
+
<namespace key="2" case="first-letter">User</namespace>
|
14
|
+
<namespace key="3" case="first-letter">User talk</namespace>
|
15
|
+
<namespace key="4" case="first-letter">Rosetta Code</namespace>
|
16
|
+
<namespace key="5" case="first-letter">Rosetta Code talk</namespace>
|
17
|
+
<namespace key="6" case="first-letter">File</namespace>
|
18
|
+
<namespace key="7" case="first-letter">File talk</namespace>
|
19
|
+
<namespace key="8" case="first-letter">MediaWiki</namespace>
|
20
|
+
<namespace key="9" case="first-letter">MediaWiki talk</namespace>
|
21
|
+
<namespace key="10" case="first-letter">Template</namespace>
|
22
|
+
<namespace key="11" case="first-letter">Template talk</namespace>
|
23
|
+
<namespace key="12" case="first-letter">Help</namespace>
|
24
|
+
<namespace key="13" case="first-letter">Help talk</namespace>
|
25
|
+
<namespace key="14" case="first-letter">Category</namespace>
|
26
|
+
<namespace key="15" case="first-letter">Category talk</namespace>
|
27
|
+
<namespace key="102" case="first-letter">Property</namespace>
|
28
|
+
<namespace key="103" case="first-letter">Property talk</namespace>
|
29
|
+
<namespace key="108" case="first-letter">Concept</namespace>
|
30
|
+
<namespace key="109" case="first-letter">Concept talk</namespace>
|
31
|
+
<namespace key="112" case="first-letter">smw/schema</namespace>
|
32
|
+
<namespace key="113" case="first-letter">smw/schema talk</namespace>
|
33
|
+
<namespace key="114" case="first-letter">Rule</namespace>
|
34
|
+
<namespace key="115" case="first-letter">Rule talk</namespace>
|
35
|
+
<namespace key="460" case="case-sensitive">Campaign</namespace>
|
36
|
+
<namespace key="461" case="case-sensitive">Campaign talk</namespace>
|
37
|
+
<namespace key="828" case="first-letter">Module</namespace>
|
38
|
+
<namespace key="829" case="first-letter">Module talk</namespace>
|
39
|
+
</namespaces>
|
40
|
+
</siteinfo>
|
41
|
+
<page>
|
42
|
+
<title>Hello world/Text</title>
|
43
|
+
<ns>0</ns>
|
44
|
+
<id>19</id>
|
45
|
+
<revision>
|
46
|
+
<id>333704</id>
|
47
|
+
<parentid>333232</parentid>
|
48
|
+
<timestamp>2022-11-18T07:27:26Z</timestamp>
|
49
|
+
<contributor>
|
50
|
+
<username>Star651</username>
|
51
|
+
<id>475</id>
|
52
|
+
</contributor>
|
53
|
+
<comment>My new favorite language is Rockstar, just started learning it, so I'm implementing tasks starting with the simplest in Rockstar</comment>
|
54
|
+
<origin>333704</origin>
|
55
|
+
<model>wikitext</model>
|
56
|
+
<format>text/x-wiki</format>
|
57
|
+
<text bytes="122926" sha1="pvejvhhj3r3js3coyflyl113kmxoycz" xml:space="preserve">{{task|Basic language learning}}
|
58
|
+
{{selection|Short Circuit|Console Program Basics}}
|
59
|
+
[[Category:Simple]]
|
60
|
+
|
61
|
+
;Task:
|
62
|
+
Display the string '''Hello world!''' on a text console.
|
63
|
+
|
64
|
+
;Related tasks:
|
65
|
+
* &nbsp; [[Hello world/Graphical]]
|
66
|
+
* &nbsp; [[Hello world/Line Printer]]
|
67
|
+
* &nbsp; [[Hello world/Newbie]]
|
68
|
+
* &nbsp; [[Hello world/Newline omission]]
|
69
|
+
* &nbsp; [[Hello world/Standard error]]
|
70
|
+
* &nbsp; [[Hello world/Web server]]
|
71
|
+
<br><br>
|
72
|
+
|
73
|
+
=={{header|0815}}==
|
74
|
+
<syntaxhighlight lang="0815">
|
75
|
+
<:48:x<:65:=<:6C:$=$=$$~<:03:+
|
76
|
+
$~<:ffffffffffffffb1:+$<:77:~$
|
77
|
+
~<:fffffffffffff8:x+$~<:03:+$~
|
78
|
+
<:06:x-$x<:0e:x-$=x<:43:x-$
|
79
|
+
|
80
|
+
</syntaxhighlight>
|
81
|
+
|
82
|
+
=={{header|11l}}==
|
83
|
+
<syntaxhighlight lang="11l">print(‘Hello world!’)</syntaxhighlight>
|
84
|
+
|
85
|
+
=={{header|360 Assembly}}==
|
86
|
+
Using native SVC (Supervisor Call) to write to system console:
|
87
|
+
<syntaxhighlight lang="360 assembly">
|
88
|
+
HELLO CSECT
|
89
|
+
USING HELLO,15
|
90
|
+
LA 1,MSGAREA Point Register 1 to message area
|
91
|
+
SVC 35 Invoke SVC 35 (Write to Operator)
|
92
|
+
BR 14 Return
|
93
|
+
MSGAREA EQU * Message Area
|
94
|
+
DC AL2(19) Total area length = 19 (Prefix length:4 + Data Length:15)
|
95
|
+
DC XL2'00' 2 bytes binary of zeros
|
96
|
+
DC C'Hello world!' Text to be written to system console
|
97
|
+
END</syntaxhighlight>
|
98
|
+
Using WTO Macro to generate SVC 35 and message area:
|
99
|
+
<syntaxhighlight lang="360 assembly"> WTO 'Hello world!'
|
100
|
+
BR 14 Return
|
101
|
+
END
|
102
|
+
</syntaxhighlight>
|
103
|
+
|
104
|
+
=={{header|4DOS Batch}}==
|
105
|
+
<syntaxhighlight lang="4dos">echo Hello world!</syntaxhighlight>
|
106
|
+
|
107
|
+
=={{header|6502 Assembly}}==
|
108
|
+
<syntaxhighlight lang="asm">; goodbyeworld.s for C= 8-bit machines, ca65 assembler format.
|
109
|
+
; String printing limited to strings of 256 characters or less.
|
110
|
+
|
111
|
+
a_cr = $0d ; Carriage return.
|
112
|
+
bsout = $ffd2 ; C64 KERNEL ROM, output a character to current device.
|
113
|
+
; use $fded for Apple 2, $ffe3 (ascii) or $ffee (raw) for BBC.
|
114
|
+
.code
|
115
|
+
|
116
|
+
ldx #0 ; Starting index 0 in X register.
|
117
|
+
printnext:
|
118
|
+
lda text,x ; Get character from string.
|
119
|
+
beq done ; If we read a 0 we're done.
|
120
|
+
jsr bsout ; Output character.
|
121
|
+
inx ; Increment index to next character.
|
122
|
+
bne printnext ; Repeat if index doesn't overflow to 0.
|
123
|
+
done:
|
124
|
+
rts ; Return from subroutine.
|
125
|
+
|
126
|
+
.rodata
|
127
|
+
|
128
|
+
text:
|
129
|
+
.byte "Hello world!", a_cr, 0</syntaxhighlight>
|
130
|
+
|
131
|
+
=={{header|6800 Assembly}}==
|
132
|
+
<syntaxhighlight lang="text"> .cr 6800
|
133
|
+
.tf gbye6800.obj,AP1
|
134
|
+
.lf gbye6800
|
135
|
+
;=====================================================;
|
136
|
+
; Hello world! for the Motorola 6800 ;
|
137
|
+
; by barrym 2013-03-17 ;
|
138
|
+
;-----------------------------------------------------;
|
139
|
+
; Prints the message "Hello world!" to an ascii ;
|
140
|
+
; terminal (console) connected to a 1970s vintage ;
|
141
|
+
; SWTPC 6800 system, which is the target device for ;
|
142
|
+
; this assembly. ;
|
143
|
+
; Many thanks to: ;
|
144
|
+
; swtpc.com for hosting Michael Holley's documents! ;
|
145
|
+
; sbprojects.com for a very nice assembler! ;
|
146
|
+
; swtpcemu.com for a very capable emulator! ;
|
147
|
+
; reg x is the string pointer ;
|
148
|
+
; reg a holds the ascii char to be output ;
|
149
|
+
;-----------------------------------------------------;
|
150
|
+
outeee = $e1d1 ;ROM: console putchar routine
|
151
|
+
.or $0f00
|
152
|
+
;-----------------------------------------------------;
|
153
|
+
main ldx #string ;Point to the string
|
154
|
+
bra puts ; and print it
|
155
|
+
outs jsr outeee ;Emit a as ascii
|
156
|
+
inx ;Advance the string pointer
|
157
|
+
puts ldaa ,x ;Load a string character
|
158
|
+
bne outs ;Print it if non-null
|
159
|
+
swi ; else return to the monitor
|
160
|
+
;=====================================================;
|
161
|
+
string .as "Hello world!",#13,#10,#0
|
162
|
+
.en</syntaxhighlight>
|
163
|
+
|
164
|
+
=={{header|8080 Assembly}}==
|
165
|
+
|
166
|
+
<syntaxhighlight lang="8080asm"> ; This is Hello World, written in 8080 assembly to run under CP/M
|
167
|
+
; As you can see, it is similar to the 8086, and CP/M is very
|
168
|
+
; similar to DOS in the way it is called.
|
169
|
+
org 100h ; CP/M .COM entry point is 100h - like DOS
|
170
|
+
mvi c,9 ; C holds the syscall, 9 = print string - like DOS
|
171
|
+
lxi d,msg ; DE holds a pointer to the string
|
172
|
+
jmp 5 ; CP/M calls are accessed through the jump at 05h
|
173
|
+
; Normally you'd CALL it, but since you'd end the program by RETurning,
|
174
|
+
; JMP saves a byte (if you've only got 64k of address space you want to
|
175
|
+
; save bytes).
|
176
|
+
msg: db 'Hello world!$'</syntaxhighlight>
|
177
|
+
|
178
|
+
=={{header|8086 Assembly}}==
|
179
|
+
|
180
|
+
<syntaxhighlight lang="masm">DOSSEG
|
181
|
+
.MODEL TINY
|
182
|
+
.DATA
|
183
|
+
TXT DB "Hello world!$"
|
184
|
+
.CODE
|
185
|
+
START:
|
186
|
+
MOV ax, @DATA
|
187
|
+
MOV ds, ax
|
188
|
+
|
189
|
+
MOV ah, 09h ; prepare output function
|
190
|
+
MOV dx, OFFSET TXT ; set offset
|
191
|
+
INT 21h ; output string TXT
|
192
|
+
|
193
|
+
MOV AX, 4C00h ; go back to DOS
|
194
|
+
INT 21h
|
195
|
+
END START</syntaxhighlight>
|
196
|
+
|
197
|
+
With A86 or NASM syntax:
|
198
|
+
<pre> org 100h
|
199
|
+
|
200
|
+
mov dx, msg
|
201
|
+
mov ah, 9
|
202
|
+
int 21h
|
203
|
+
|
204
|
+
mov ax, 4c00h
|
205
|
+
int 21h
|
206
|
+
|
207
|
+
msg:
|
208
|
+
db "Hello world!$"</pre>
|
209
|
+
|
210
|
+
=={{header|8th}}==
|
211
|
+
<syntaxhighlight lang="forth">"Hello world!\n" . bye</syntaxhighlight>
|
212
|
+
|
213
|
+
=={{header|AArch64 Assembly}}==
|
214
|
+
<syntaxhighlight lang="arm_assembly">.equ STDOUT, 1
|
215
|
+
.equ SVC_WRITE, 64
|
216
|
+
.equ SVC_EXIT, 93
|
217
|
+
|
218
|
+
.text
|
219
|
+
.global _start
|
220
|
+
|
221
|
+
_start:
|
222
|
+
stp x29, x30, [sp, -16]!
|
223
|
+
mov x0, #STDOUT
|
224
|
+
ldr x1, =msg
|
225
|
+
mov x2, 13
|
226
|
+
mov x8, #SVC_WRITE
|
227
|
+
mov x29, sp
|
228
|
+
svc #0 // write(stdout, msg, 13);
|
229
|
+
ldp x29, x30, [sp], 16
|
230
|
+
mov x0, #0
|
231
|
+
mov x8, #SVC_EXIT
|
232
|
+
svc #0 // exit(0);
|
233
|
+
|
234
|
+
msg: .ascii "Hello World!\n"
|
235
|
+
.align 4</syntaxhighlight>
|
236
|
+
|
237
|
+
=={{header|ABAP}}==
|
238
|
+
<syntaxhighlight lang="abap">REPORT zgoodbyeworld.
|
239
|
+
WRITE 'Hello world!'.</syntaxhighlight>
|
240
|
+
|
241
|
+
=={{header|ACL2}}==
|
242
|
+
<syntaxhighlight lang="lisp">(cw "Hello world!~%")</syntaxhighlight>
|
243
|
+
|
244
|
+
|
245
|
+
=={{header|Action!}}==
|
246
|
+
<syntaxhighlight lang="action!">Proc Main()
|
247
|
+
Print("Hello world!")
|
248
|
+
Return</syntaxhighlight>
|
249
|
+
|
250
|
+
=={{header|ActionScript}}==
|
251
|
+
<syntaxhighlight lang="actionscript">trace("Hello world!");</syntaxhighlight>
|
252
|
+
|
253
|
+
=={{header|Ada}}==
|
254
|
+
{{works with|GCC|4.1.2}}
|
255
|
+
<syntaxhighlight lang="ada">with Ada.Text_IO; use Ada.Text_IO;
|
256
|
+
procedure Main is
|
257
|
+
begin
|
258
|
+
Put_Line ("Hello world!");
|
259
|
+
end Main;</syntaxhighlight>
|
260
|
+
|
261
|
+
=={{header|Agda}}==
|
262
|
+
For Agda 2.6.2, based on its [https://agda.readthedocs.io/en/v2.6.2/getting-started/hello-world.html documentation].
|
263
|
+
<syntaxhighlight lang="agda">module helloworld where
|
264
|
+
|
265
|
+
open import Agda.Builtin.IO using (IO)
|
266
|
+
open import Agda.Builtin.Unit renaming (⊤ to Unit)
|
267
|
+
open import Agda.Builtin.String using (String)
|
268
|
+
|
269
|
+
postulate putStrLn : String -> IO Unit
|
270
|
+
{-# FOREIGN GHC import qualified Data.Text as T #-}
|
271
|
+
{-# COMPILE GHC putStrLn = putStrLn . T.unpack #-}
|
272
|
+
|
273
|
+
main : IO Unit
|
274
|
+
main = putStrLn "Hello world!"
|
275
|
+
</syntaxhighlight>
|
276
|
+
|
277
|
+
=={{header|Agena}}==
|
278
|
+
<syntaxhighlight lang="agena">print( "Hello world!" )</syntaxhighlight>
|
279
|
+
|
280
|
+
=={{header|Aime}}==
|
281
|
+
<syntaxhighlight lang="aime">o_text("Hello world!\n");</syntaxhighlight>
|
282
|
+
|
283
|
+
or:
|
284
|
+
|
285
|
+
<syntaxhighlight lang="aime">integer
|
286
|
+
main(void)
|
287
|
+
{
|
288
|
+
o_text("Hello world!\n");
|
289
|
+
|
290
|
+
return 0;
|
291
|
+
}</syntaxhighlight>
|
292
|
+
|
293
|
+
=={{header|Algae}}==
|
294
|
+
<syntaxhighlight lang="algae">printf("Hello world!\n");</syntaxhighlight>
|
295
|
+
|
296
|
+
=={{header|ALGOL 60}}==
|
297
|
+
<syntaxhighlight lang="algol60">'BEGIN'
|
298
|
+
OUTSTRING(1,'('Hello world!')');
|
299
|
+
SYSACT(1,14,1)
|
300
|
+
'END'</syntaxhighlight>
|
301
|
+
|
302
|
+
=={{header|ALGOL 68}}==
|
303
|
+
<syntaxhighlight lang="algol68">main: (
|
304
|
+
printf($"Hello world!"l$)
|
305
|
+
)</syntaxhighlight>
|
306
|
+
|
307
|
+
=={{header|ALGOL W}}==
|
308
|
+
<syntaxhighlight lang="algolw">begin
|
309
|
+
write( "Hello world!" )
|
310
|
+
end.</syntaxhighlight>
|
311
|
+
|
312
|
+
=={{header|ALGOL-M}}==
|
313
|
+
<syntaxhighlight lang="algol">BEGIN
|
314
|
+
WRITE( "Hello world!" );
|
315
|
+
END</syntaxhighlight>
|
316
|
+
|
317
|
+
=={{header|Alore}}==
|
318
|
+
<syntaxhighlight lang="alore">Print('Hello world!')</syntaxhighlight>
|
319
|
+
=={{header|Amazing Hopper}}==
|
320
|
+
|
321
|
+
1)
|
322
|
+
<syntaxhighlight lang="amazing hopper">
|
323
|
+
main:
|
324
|
+
{"Hello world!\n"}print
|
325
|
+
exit(0)
|
326
|
+
</syntaxhighlight>
|
327
|
+
<pre>execute with: hopper helloworld.com</pre>
|
328
|
+
2)
|
329
|
+
<syntaxhighlight lang="amazing hopper">
|
330
|
+
#include <hopper.h>
|
331
|
+
main:
|
332
|
+
exit("Hello world!\n")
|
333
|
+
</syntaxhighlight>
|
334
|
+
<pre>execute with: hopper helloworld.com -d</pre>
|
335
|
+
3)
|
336
|
+
<syntaxhighlight lang="amazing hopper">
|
337
|
+
main:
|
338
|
+
{"Hello world!\n"}return
|
339
|
+
</syntaxhighlight>
|
340
|
+
<pre>execute with: hopper helloworld.com -d</pre>
|
341
|
+
|
342
|
+
=={{header|AmbientTalk}}==
|
343
|
+
<syntaxhighlight lang="ambienttalk">system.println("Hello world!")</syntaxhighlight>
|
344
|
+
|
345
|
+
=={{header|AmigaE}}==
|
346
|
+
<syntaxhighlight lang="amigae">PROC main()
|
347
|
+
WriteF('Hello world!\n')
|
348
|
+
ENDPROC</syntaxhighlight>
|
349
|
+
|
350
|
+
=={{header|AngelScript}}==
|
351
|
+
<syntaxhighlight lang="angelscript">void main() { print("Hello world\n"); }</syntaxhighlight>
|
352
|
+
|
353
|
+
=={{header|AntLang}}==
|
354
|
+
Note, that "Hello, World!" prints twice in interactive mode.
|
355
|
+
One time as side-effect and one as the return value of echo.
|
356
|
+
<syntaxhighlight lang="antlang">echo["Hello, World!"]</syntaxhighlight>
|
357
|
+
|
358
|
+
=={{header|Anyways}}==
|
359
|
+
|
360
|
+
<syntaxhighlight lang="anyways">There was a guy called Hello World
|
361
|
+
"Ow!" it said.
|
362
|
+
That's all folks!</syntaxhighlight>
|
363
|
+
|
364
|
+
=={{header|APL}}==
|
365
|
+
<syntaxhighlight lang="apl">'Hello world!'</syntaxhighlight>
|
366
|
+
|
367
|
+
=={{header|AppleScript}}==
|
368
|
+
To show in Script Editor Result pane:
|
369
|
+
<syntaxhighlight lang="applescript">"Hello world!"</syntaxhighlight>
|
370
|
+
|
371
|
+
To show in Script Editor Event Log pane:
|
372
|
+
<syntaxhighlight lang="applescript">log "Hello world!"</syntaxhighlight>
|
373
|
+
|
374
|
+
=={{header|Applesoft BASIC}}==
|
375
|
+
<!-- {{incorrect|Applesoft BASIC|output isn't consistent with the task's requirements: mixed case.}} -->
|
376
|
+
|
377
|
+
Important Note: Although Applesoft BASIC allowed the storage and output of mixed-case strings, the ability to enter mixed-case via the keyboard and to output mixed-case on the default display was not offered as standard equipment on the original Apple II/II+. Since Applesoft WAS the default programming language for the Apple II+, perhaps some flexibility in the task specification could be offered, for this and for other systems that lacked proper mixed-case I/O capabilities in at least one popular configuration.
|
378
|
+
|
379
|
+
<syntaxhighlight lang="applesoft basic"> PRINT "Hello world!"</syntaxhighlight>
|
380
|
+
|
381
|
+
=={{header|Apricot}}==
|
382
|
+
<syntaxhighlight lang="apricot">(puts "Hello world!")</syntaxhighlight>
|
383
|
+
|
384
|
+
=={{header|Arc}}==
|
385
|
+
<syntaxhighlight lang="arc">(prn "Hello world!")</syntaxhighlight>
|
386
|
+
|
387
|
+
=={{header|Arendelle}}==
|
388
|
+
<pre>"Hello world!"</pre>
|
389
|
+
|
390
|
+
=={{header|Argile}}==
|
391
|
+
<syntaxhighlight lang="argile">use std
|
392
|
+
print "Hello world!"</syntaxhighlight>
|
393
|
+
compile with: arc hello_world.arg -o hello_world.c && gcc -o hello_world hello_world.c
|
394
|
+
|
395
|
+
=={{header|ARM Assembly}}==
|
396
|
+
|
397
|
+
<syntaxhighlight lang="arm_assembly">.global main
|
398
|
+
|
399
|
+
message:
|
400
|
+
.asciz "Hello world!\n"
|
401
|
+
.align 4
|
402
|
+
|
403
|
+
main:
|
404
|
+
ldr r0, =message
|
405
|
+
bl printf
|
406
|
+
|
407
|
+
mov r7, #1
|
408
|
+
swi 0</syntaxhighlight>
|
409
|
+
|
410
|
+
=={{header|ArnoldC}}==
|
411
|
+
<syntaxhighlight lang="arnoldc">IT'S SHOWTIME
|
412
|
+
TALK TO THE HAND "Hello world!"
|
413
|
+
YOU HAVE BEEN TERMINATED</syntaxhighlight>
|
414
|
+
|
415
|
+
=={{header|Arturo}}==
|
416
|
+
<syntaxhighlight lang="rebol">print "Hello world!"</syntaxhighlight>
|
417
|
+
|
418
|
+
{{out}}
|
419
|
+
|
420
|
+
<pre>Hello world!</pre>
|
421
|
+
|
422
|
+
=={{header|AsciiDots}}==
|
423
|
+
|
424
|
+
<syntaxhighlight lang="asciidots">
|
425
|
+
.-$'Hello, World!'
|
426
|
+
</syntaxhighlight>
|
427
|
+
|
428
|
+
=={{header|Astro}}==
|
429
|
+
<syntaxhighlight lang="python">print "Hello world!"</syntaxhighlight>
|
430
|
+
|
431
|
+
=={{header|Asymptote}}==
|
432
|
+
|
433
|
+
<syntaxhighlight lang="asymptote">write('Hello world!');</syntaxhighlight>
|
434
|
+
|
435
|
+
=={{header|ATS}}==
|
436
|
+
<syntaxhighlight lang="ats">implement main0 () = print "Hello world!\n"</syntaxhighlight>
|
437
|
+
|
438
|
+
=={{header|AutoHotkey}}==
|
439
|
+
script launched from windows explorer
|
440
|
+
<syntaxhighlight lang="autohotkey">DllCall("AllocConsole")
|
441
|
+
FileAppend, Goodbye`, World!, CONOUT$
|
442
|
+
FileReadLine, _, CONIN$, 1</syntaxhighlight>
|
443
|
+
scripts run from shell
|
444
|
+
[requires Windows XP or higher; older Versions of Windows don´t have the "AttachConsole" function]
|
445
|
+
<syntaxhighlight lang="autohotkey">DllCall("AttachConsole", "int", -1)
|
446
|
+
FileAppend, Goodbye`, World!, CONOUT$</syntaxhighlight>
|
447
|
+
<syntaxhighlight lang="autohotkey">SendInput Hello world!{!}</syntaxhighlight>
|
448
|
+
|
449
|
+
=={{header|AutoIt}}==
|
450
|
+
<syntaxhighlight lang="autoit">ConsoleWrite("Hello world!" & @CRLF)</syntaxhighlight>
|
451
|
+
|
452
|
+
=={{header|AutoLISP}}==
|
453
|
+
<syntaxhighlight lang="cadlisp">(printc "Hello World!")</syntaxhighlight>
|
454
|
+
|
455
|
+
=={{header|Avail}}==
|
456
|
+
<syntaxhighlight lang="avail">Print: "Hello World!";</syntaxhighlight>
|
457
|
+
|
458
|
+
=={{header|AWK}}==
|
459
|
+
<syntaxhighlight lang="awk">BEGIN{print "Hello world!"}</syntaxhighlight>
|
460
|
+
|
461
|
+
|
462
|
+
"BEGIN" is a "special pattern" - code within "{}" is executed before the input file is read, even if there is no input. "END" is a similar pattern, for after completion of main processing.
|
463
|
+
<syntaxhighlight lang="awk">
|
464
|
+
END {
|
465
|
+
print "Hello world!"
|
466
|
+
}
|
467
|
+
</syntaxhighlight>
|
468
|
+
|
469
|
+
For a file containing data, the work can be done in the "body". The "//" is "match anything" so gets the first data, the "exit" halts processing the file (any "END" would then be executed). Or instead of //, simply 1 is true.
|
470
|
+
<syntaxhighlight lang="awk">
|
471
|
+
// {
|
472
|
+
print "Hello world!"
|
473
|
+
exit
|
474
|
+
}
|
475
|
+
</syntaxhighlight>
|
476
|
+
|
477
|
+
|
478
|
+
For a "single record" file.
|
479
|
+
<syntaxhighlight lang="awk">
|
480
|
+
// {
|
481
|
+
print "Hello world!"
|
482
|
+
}
|
483
|
+
</syntaxhighlight>
|
484
|
+
|
485
|
+
For a "single record" file containing - Hello world! -. The "default" action for a "pattern match" (the "/" and "/" define a "pattern" to match data) is to "print" the record.
|
486
|
+
<syntaxhighlight lang="awk">
|
487
|
+
//
|
488
|
+
</syntaxhighlight>
|
489
|
+
|
490
|
+
=={{header|Axe}}==
|
491
|
+
Note that the i here is the imaginary ''i'', not the lowercase letter i.
|
492
|
+
<syntaxhighlight lang="axe">Disp "Hello world!",i</syntaxhighlight>
|
493
|
+
|
494
|
+
=={{header|B}}==
|
495
|
+
{{works with|The Amsterdam Compiler Kit - B|V6.1pre1}}
|
496
|
+
<syntaxhighlight lang="b">main()
|
497
|
+
{
|
498
|
+
putstr("Hello world!*n");
|
499
|
+
return(0);
|
500
|
+
}</syntaxhighlight>
|
501
|
+
|
502
|
+
=={{header|B4X}}==
|
503
|
+
<syntaxhighlight lang="b4x">Log("Hello world!")</syntaxhighlight>
|
504
|
+
|
505
|
+
=={{header|Babel}}==
|
506
|
+
|
507
|
+
<syntaxhighlight lang="babel">"Hello world!" <<</syntaxhighlight>
|
508
|
+
|
509
|
+
=={{header|bash}}==
|
510
|
+
<syntaxhighlight lang="bash">echo "Hello world!"</syntaxhighlight>
|
511
|
+
|
512
|
+
=={{header|BASIC}}==
|
513
|
+
{{works with|BASICA}}
|
514
|
+
{{works with|Commodore BASIC}}
|
515
|
+
{{works with|Locomotive Basic}}
|
516
|
+
{{works with|M2000 Interpreter}}
|
517
|
+
{{works with|MSX BASIC}}
|
518
|
+
{{works with|Tiny BASIC}}
|
519
|
+
<syntaxhighlight lang="qbasic">10 print "Hello world!"</syntaxhighlight>
|
520
|
+
|
521
|
+
{{works with|7Basic}}
|
522
|
+
{{works with|BaCon}} [[Category:BaCon]]
|
523
|
+
{{works with|QBasic}}
|
524
|
+
{{works with|M2000 Interpreter}}
|
525
|
+
{{works with|Script Basic}}
|
526
|
+
<syntaxhighlight lang="qbasic">PRINT "Hello world!"</syntaxhighlight>
|
527
|
+
|
528
|
+
=={{header|BASIC256}}==
|
529
|
+
<syntaxhighlight lang="basic256">PRINT "Hello world!"</syntaxhighlight>
|
530
|
+
|
531
|
+
=={{header|Batch File}}==
|
532
|
+
'''Under normal circumstances, when delayed expansion is disabled'''
|
533
|
+
<syntaxhighlight lang="dos">echo Hello world!</syntaxhighlight>
|
534
|
+
|
535
|
+
'''If delayed expansion is enabled, then the ! must be escaped twice'''
|
536
|
+
<syntaxhighlight lang="dos">setlocal enableDelayedExpansion
|
537
|
+
echo Hello world!^^!</syntaxhighlight>
|
538
|
+
|
539
|
+
=={{header|Battlestar}}==
|
540
|
+
<!--- supports C syntax highlighting --->
|
541
|
+
<syntaxhighlight lang="c">const hello = "Hello world!\n"
|
542
|
+
|
543
|
+
print(hello)</syntaxhighlight>
|
544
|
+
|
545
|
+
=={{header|BBC BASIC}}==
|
546
|
+
<syntaxhighlight lang="bbcbasic"> PRINT "Hello world!"</syntaxhighlight>
|
547
|
+
|
548
|
+
=={{header|bc}}==
|
549
|
+
<syntaxhighlight lang="bc">"Hello world!
|
550
|
+
"</syntaxhighlight>
|
551
|
+
|
552
|
+
=={{header|BCPL}}==
|
553
|
+
<syntaxhighlight lang="bcpl">GET "libhdr"
|
554
|
+
|
555
|
+
LET start() = VALOF
|
556
|
+
{ writef("Hello world!")
|
557
|
+
RESULTIS 0
|
558
|
+
}</syntaxhighlight>
|
559
|
+
|
560
|
+
=={{header|Beef}}==
|
561
|
+
<syntaxhighlight lang=csharp>Using System;
|
562
|
+
namespace HelloWorld {
|
563
|
+
class Program
|
564
|
+
{
|
565
|
+
static void Main()
|
566
|
+
{
|
567
|
+
Console.Writeln("Hello World!");
|
568
|
+
}
|
569
|
+
}
|
570
|
+
}
|
571
|
+
</syntaxhighlight>
|
572
|
+
|
573
|
+
=={{header|beeswax}}==
|
574
|
+
Straightforward:
|
575
|
+
|
576
|
+
<syntaxhighlight lang="beeswax">*`Hello, World!</syntaxhighlight>
|
577
|
+
|
578
|
+
Less obvious way:
|
579
|
+
|
580
|
+
<syntaxhighlight lang="beeswax">>`ld!
|
581
|
+
`
|
582
|
+
r
|
583
|
+
o
|
584
|
+
W
|
585
|
+
`
|
586
|
+
b` ,olleH`_</syntaxhighlight>
|
587
|
+
|
588
|
+
Even less obvious, demonstrating the creation and execution order of instruction pointers, and the hexagonal layout of beeswax programs:
|
589
|
+
|
590
|
+
<syntaxhighlight lang="beeswax">r l
|
591
|
+
l o
|
592
|
+
``
|
593
|
+
ol`*`,d!
|
594
|
+
``
|
595
|
+
e H
|
596
|
+
W</syntaxhighlight>
|
597
|
+
|
598
|
+
=={{header|Befunge}}==
|
599
|
+
<syntaxhighlight lang="befunge">52*"!dlroW ,olleH">:#,_@</syntaxhighlight>
|
600
|
+
|
601
|
+
=={{header|Binary Lambda Calculus}}==
|
602
|
+
As explained at https://www.ioccc.org/2012/tromp/hint.html
|
603
|
+
<syntaxhighlight lang="blc"> Hello world!</syntaxhighlight>
|
604
|
+
|
605
|
+
=={{header|Bird}}==
|
606
|
+
It's not possible to print exclamation marks in [[Bird]] which is why it is not used in this example.
|
607
|
+
<syntaxhighlight lang="bird">use Console
|
608
|
+
|
609
|
+
define Main
|
610
|
+
Console.Println "Hello world"
|
611
|
+
end</syntaxhighlight>
|
612
|
+
|
613
|
+
=={{header|Blade}}==
|
614
|
+
<syntaxhighlight lang="blade">echo 'Hello world!'</syntaxhighlight>
|
615
|
+
or
|
616
|
+
<syntaxhighlight lang="blade">print('Hello world!')</syntaxhighlight>
|
617
|
+
or
|
618
|
+
<syntaxhighlight lang="blade">import io
|
619
|
+
io.stdout.write('Hello world!')</syntaxhighlight>
|
620
|
+
|
621
|
+
=={{header|Blast}}==
|
622
|
+
<syntaxhighlight lang="blast"># This will display a goodbye message on the terminal screen
|
623
|
+
.begin
|
624
|
+
display "Hello world!"
|
625
|
+
return
|
626
|
+
# This is the end of the script.</syntaxhighlight>
|
627
|
+
|
628
|
+
=={{Header|BlitzMax}}==
|
629
|
+
<syntaxhighlight lang="blitzmax">
|
630
|
+
print "Hello world!"
|
631
|
+
</syntaxhighlight>
|
632
|
+
|
633
|
+
=={{header|Blue}}==
|
634
|
+
|
635
|
+
Linux/x86
|
636
|
+
|
637
|
+
<syntaxhighlight lang="blue">global _start
|
638
|
+
|
639
|
+
: syscall ( num:eax -- result:eax ) syscall ;
|
640
|
+
|
641
|
+
: exit ( status:edi -- noret ) 60 syscall ;
|
642
|
+
: bye ( -- noret ) 0 exit ;
|
643
|
+
|
644
|
+
1 const stdout
|
645
|
+
|
646
|
+
: write ( buf:esi len:edx fd:edi -- ) 1 syscall drop ;
|
647
|
+
: print ( buf len -- ) stdout write ;
|
648
|
+
|
649
|
+
: greet ( -- ) s" Hello world!\n" print ;
|
650
|
+
|
651
|
+
: _start ( -- noret ) greet bye ;</syntaxhighlight>
|
652
|
+
|
653
|
+
=={{header|blz}}==
|
654
|
+
<syntaxhighlight lang="blz">print("Hello world!")</syntaxhighlight>
|
655
|
+
|
656
|
+
=={{header|BML}}==
|
657
|
+
<syntaxhighlight lang="bml">display "Hello world!"</syntaxhighlight>
|
658
|
+
|
659
|
+
=={{header|Boo}}==
|
660
|
+
<syntaxhighlight lang="boo">print "Hello world!"</syntaxhighlight>
|
661
|
+
|
662
|
+
=={{header|bootBASIC}}==
|
663
|
+
<syntaxhighlight lang="bootbasic">10 print "Hello world!"</syntaxhighlight>
|
664
|
+
|
665
|
+
=={{header|BQN}}==
|
666
|
+
|
667
|
+
Works in: [[CBQN]]
|
668
|
+
|
669
|
+
<syntaxhighlight lang="bqn">•Out "Hello world!"</syntaxhighlight>
|
670
|
+
|
671
|
+
=={{header|Brace}}==
|
672
|
+
<syntaxhighlight lang="brace">#!/usr/bin/env bx
|
673
|
+
use b
|
674
|
+
Main:
|
675
|
+
say("Hello world!")</syntaxhighlight>
|
676
|
+
|
677
|
+
=={{header|Bracmat}}==
|
678
|
+
<syntaxhighlight lang="bracmat">put$"Hello world!"</syntaxhighlight>
|
679
|
+
|
680
|
+
=={{header|Brainf***}}==
|
681
|
+
To print text, we need the ascii-value of each character to output.<br>
|
682
|
+
So, we wanna make a series of round numbers going like:
|
683
|
+
|
684
|
+
10 close to newline and carriage return
|
685
|
+
30 close to ! and SPACE
|
686
|
+
40 close to COMMA
|
687
|
+
70 close to G
|
688
|
+
80 close to W
|
689
|
+
90 close to b
|
690
|
+
100 is d and close to e and l
|
691
|
+
110 close to o
|
692
|
+
120 close to y
|
693
|
+
|
694
|
+
forming all the letters we need if we just add up a bit
|
695
|
+
|
696
|
+
Commented version:
|
697
|
+
<syntaxhighlight lang="bf">+++++ +++++ First cell 10 (its a counter and we will be "multiplying")
|
698
|
+
|
699
|
+
[
|
700
|
+
>+ 10 times 1 is 10
|
701
|
+
>+++ 10 times 3 is 30
|
702
|
+
>++++ etc etc
|
703
|
+
>+++++ ++
|
704
|
+
>+++++ +++
|
705
|
+
>+++++ ++++
|
706
|
+
>+++++ +++++
|
707
|
+
>+++++ ++++++
|
708
|
+
>+++++ +++++++
|
709
|
+
<<<<<<<<< - go back to counter and subtract 1
|
710
|
+
]
|
711
|
+
|
712
|
+
printing G
|
713
|
+
>>>> + .
|
714
|
+
|
715
|
+
o twice
|
716
|
+
>>>> + ..
|
717
|
+
|
718
|
+
d
|
719
|
+
< .
|
720
|
+
|
721
|
+
b
|
722
|
+
< +++++ +++ .
|
723
|
+
|
724
|
+
y
|
725
|
+
>>> + .
|
726
|
+
|
727
|
+
e
|
728
|
+
<< + .
|
729
|
+
|
730
|
+
COMMA
|
731
|
+
<<<< ++++ .
|
732
|
+
|
733
|
+
SPACE
|
734
|
+
< ++ .
|
735
|
+
|
736
|
+
W
|
737
|
+
>>> +++++ ++ .
|
738
|
+
|
739
|
+
o
|
740
|
+
>>> .
|
741
|
+
|
742
|
+
r
|
743
|
+
+++ .
|
744
|
+
|
745
|
+
l
|
746
|
+
< +++++ ++ .
|
747
|
+
|
748
|
+
d
|
749
|
+
----- --- .
|
750
|
+
|
751
|
+
!
|
752
|
+
<<<<< + .
|
753
|
+
|
754
|
+
CRLF
|
755
|
+
< +++ . --- .</syntaxhighlight>
|
756
|
+
|
757
|
+
Uncommented:
|
758
|
+
<syntaxhighlight lang="bf">++++++++++[>+>+++>++++>+++++++>++++++++>+++++++++>++
|
759
|
+
++++++++>+++++++++++>++++++++++++<<<<<<<<<-]>>>>+.>>>
|
760
|
+
>+..<.<++++++++.>>>+.<<+.<<<<++++.<++.>>>+++++++.>>>.+++.
|
761
|
+
<+++++++.--------.<<<<<+.<+++.---.</syntaxhighlight>
|
762
|
+
It can most likely be optimized, but this is a nice way to show
|
763
|
+
how character printing works in Brainf*** :)
|
764
|
+
|
765
|
+
=={{header|Brat}}==
|
766
|
+
<syntaxhighlight lang="brat">p "Hello world!"</syntaxhighlight>
|
767
|
+
|
768
|
+
=={{header|Brlcad}}==
|
769
|
+
|
770
|
+
The mged utility can output text to the terminal:
|
771
|
+
|
772
|
+
<syntaxhighlight lang="brlcad">
|
773
|
+
echo Hello world!
|
774
|
+
</syntaxhighlight>
|
775
|
+
|
776
|
+
=={{header|Burlesque}}==
|
777
|
+
|
778
|
+
<syntaxhighlight lang="burlesque">
|
779
|
+
"Hello world!"sh
|
780
|
+
</syntaxhighlight>
|
781
|
+
|
782
|
+
Although please note that ''sh'' actually does not print anything.
|
783
|
+
|
784
|
+
=={{header|C}}==
|
785
|
+
{{works with|gcc|4.0.1}}
|
786
|
+
<syntaxhighlight lang="c">#include <stdlib.h>
|
787
|
+
#include <stdio.h>
|
788
|
+
|
789
|
+
int main(void)
|
790
|
+
{
|
791
|
+
printf("Hello world!\n");
|
792
|
+
return EXIT_SUCCESS;
|
793
|
+
}</syntaxhighlight>
|
794
|
+
Or:
|
795
|
+
<syntaxhighlight lang="c">#include <stdlib.h>
|
796
|
+
#include <stdio.h>
|
797
|
+
|
798
|
+
int main(void)
|
799
|
+
{
|
800
|
+
puts("Hello world!");
|
801
|
+
return EXIT_SUCCESS;
|
802
|
+
}</syntaxhighlight>
|
803
|
+
Or, the eternal favourite :)
|
804
|
+
<syntaxhighlight lang="c">
|
805
|
+
#include<stdio.h>
|
806
|
+
|
807
|
+
int main()
|
808
|
+
{
|
809
|
+
printf("\nHello world!");
|
810
|
+
return 0;
|
811
|
+
}</syntaxhighlight>
|
812
|
+
|
813
|
+
or better yet...
|
814
|
+
<syntaxhighlight lang="c">
|
815
|
+
#include<stdio.h>
|
816
|
+
|
817
|
+
int main()
|
818
|
+
{
|
819
|
+
return printf("\nHello World!");
|
820
|
+
}
|
821
|
+
</syntaxhighlight>
|
822
|
+
|
823
|
+
=={{header|C sharp|C#}}==
|
824
|
+
{{works with|Mono|1.2}}
|
825
|
+
{{works with|Visual C sharp|Visual C#|2003}}
|
826
|
+
<syntaxhighlight lang="csharp">namespace HelloWorld
|
827
|
+
{
|
828
|
+
class Program
|
829
|
+
{
|
830
|
+
static void Main(string[] args)
|
831
|
+
{
|
832
|
+
System.Console.WriteLine("Hello world!");
|
833
|
+
}
|
834
|
+
}
|
835
|
+
}</syntaxhighlight>
|
836
|
+
|
837
|
+
{{works with|Visual C sharp|Visual C#|9.0+}}
|
838
|
+
C# 9.0 allows statements at the top level of a source file (a ''compilation_unit'' in the specification) between any using statements and namespace declarations. These statements become the program entry point and are placed in a method in a compiler-generated type.
|
839
|
+
<syntaxhighlight lang="csharp">System.Console.WriteLine("Hello world!");</syntaxhighlight>
|
840
|
+
or
|
841
|
+
<syntaxhighlight lang="csharp">using System;
|
842
|
+
Console.WriteLine("Hello world!");</syntaxhighlight>
|
843
|
+
|
844
|
+
=={{header|C++}}==
|
845
|
+
<syntaxhighlight lang="cpp">#include <iostream>
|
846
|
+
|
847
|
+
int main () {
|
848
|
+
std::cout << "Hello world!" << std::endl;
|
849
|
+
}</syntaxhighlight>
|
850
|
+
|
851
|
+
=={{header|C++/CLI}}==
|
852
|
+
<syntaxhighlight lang="cpp">using namespace System;
|
853
|
+
int main()
|
854
|
+
{
|
855
|
+
Console::WriteLine("Hello world!");
|
856
|
+
}</syntaxhighlight>
|
857
|
+
|
858
|
+
=={{header|C1R}}==
|
859
|
+
<syntaxhighlight lang="c0h">Hello_world/Text</syntaxhighlight>
|
860
|
+
{{out}}
|
861
|
+
<pre>
|
862
|
+
$ echo Hello_world/Text >hw.c1r
|
863
|
+
$ ./c1r hw.c1r
|
864
|
+
$ ./a.out
|
865
|
+
Hello world!
|
866
|
+
</pre>
|
867
|
+
|
868
|
+
=={{header|C2}}==
|
869
|
+
<syntaxhighlight lang="c2">module hello_world;
|
870
|
+
import stdio as io;
|
871
|
+
|
872
|
+
func i32 main(i32 argc, char** argv) {
|
873
|
+
io.printf("Hello World!\n");
|
874
|
+
return 0;
|
875
|
+
}</syntaxhighlight>
|
876
|
+
|
877
|
+
=={{header|C3}}==
|
878
|
+
<syntaxhighlight lang="c3">import std::io;
|
879
|
+
|
880
|
+
fn int main()
|
881
|
+
{
|
882
|
+
io::println("Hello, World!");
|
883
|
+
return 0;
|
884
|
+
}</syntaxhighlight>
|
885
|
+
|
886
|
+
=={{header|Casio BASIC}}==
|
887
|
+
<syntaxhighlight lang="basic casio">Locate 1,1,"Hello World!"</syntaxhighlight>
|
888
|
+
or just
|
889
|
+
<syntaxhighlight lang="basic casio">"Hello World!"</syntaxhighlight>
|
890
|
+
|
891
|
+
=={{header|Cat}}==
|
892
|
+
<syntaxhighlight lang="cat">"Hello world!" writeln</syntaxhighlight>
|
893
|
+
|
894
|
+
=={{header|Cduce}}==
|
895
|
+
<syntaxhighlight lang="cduce">print "Hello world!";;</syntaxhighlight>
|
896
|
+
|
897
|
+
=={{header|CFEngine}}==
|
898
|
+
<syntaxhighlight lang="cfengine3">#!/usr/bin/env cf-agent
|
899
|
+
# without --no-lock option to cf-agent
|
900
|
+
# this output will only occur once per minute
|
901
|
+
# this is by design.
|
902
|
+
bundle agent main
|
903
|
+
{
|
904
|
+
reports:
|
905
|
+
"Hello world!";
|
906
|
+
}</syntaxhighlight>
|
907
|
+
|
908
|
+
See https://docs.cfengine.com/docs/master/examples.html for a more complete example and introduction.
|
909
|
+
|
910
|
+
=={{header|Chapel}}==
|
911
|
+
<syntaxhighlight lang="chapel">writeln("Hello world!");</syntaxhighlight>
|
912
|
+
|
913
|
+
=={{header|Chef}}==
|
914
|
+
<syntaxhighlight lang="chef">Goodbye World Souffle.
|
915
|
+
|
916
|
+
Ingredients.
|
917
|
+
71 g green beans
|
918
|
+
111 cups oil
|
919
|
+
98 g butter
|
920
|
+
121 ml yogurt
|
921
|
+
101 eggs
|
922
|
+
44 g wheat flour
|
923
|
+
32 zucchinis
|
924
|
+
119 ml water
|
925
|
+
114 g red salmon
|
926
|
+
108 g lard
|
927
|
+
100 g dijon mustard
|
928
|
+
33 potatoes
|
929
|
+
|
930
|
+
Method.
|
931
|
+
Put potatoes into the mixing bowl.
|
932
|
+
Put dijon mustard into the mixing bowl.
|
933
|
+
Put lard into the mixing bowl.
|
934
|
+
Put red salmon into the mixing bowl.
|
935
|
+
Put oil into the mixing bowl.
|
936
|
+
Put water into the mixing bowl.
|
937
|
+
Put zucchinis into the mixing bowl.
|
938
|
+
Put wheat flour into the mixing bowl.
|
939
|
+
Put eggs into the mixing bowl.
|
940
|
+
Put yogurt into the mixing bowl.
|
941
|
+
Put butter into the mixing bowl.
|
942
|
+
Put dijon mustard into the mixing bowl.
|
943
|
+
Put oil into the mixing bowl.
|
944
|
+
Put oil into the mixing bowl.
|
945
|
+
Put green beans into the mixing bowl.
|
946
|
+
Liquefy contents of the mixing bowl.
|
947
|
+
Pour contents of the mixing bowl into the baking dish.
|
948
|
+
|
949
|
+
Serves 1.</syntaxhighlight>
|
950
|
+
|
951
|
+
=={{header|ChucK}}==
|
952
|
+
<syntaxhighlight lang="text"><<< "Hello world!">>>;</syntaxhighlight>
|
953
|
+
|
954
|
+
=={{header|Cind}}==
|
955
|
+
|
956
|
+
<syntaxhighlight lang="cind">
|
957
|
+
execute() {
|
958
|
+
host.println("Hello world!");
|
959
|
+
}
|
960
|
+
</syntaxhighlight>
|
961
|
+
|
962
|
+
=={{header|Clay}}==
|
963
|
+
<syntaxhighlight lang="clay">main() {
|
964
|
+
println("Hello world!");
|
965
|
+
}</syntaxhighlight>
|
966
|
+
|
967
|
+
=={{header|Clean}}==
|
968
|
+
<syntaxhighlight lang="clean">Start = "Hello world!"</syntaxhighlight>
|
969
|
+
|
970
|
+
=={{header|Clio}}==
|
971
|
+
<syntaxhighlight lang="clio">'hello world!' -> print</syntaxhighlight>
|
972
|
+
|
973
|
+
=={{header|Clipper}}==
|
974
|
+
<syntaxhighlight lang="clipper">? "Hello world!"</syntaxhighlight>
|
975
|
+
|
976
|
+
=={{header|CLIPS}}==
|
977
|
+
<syntaxhighlight lang="clips">(printout t "Hello world!" crlf)</syntaxhighlight>
|
978
|
+
|
979
|
+
=={{header|CLU}}==
|
980
|
+
<syntaxhighlight lang="clu">start_up = proc ()
|
981
|
+
po: stream := stream$primary_output()
|
982
|
+
stream$putl(po, "Hello world!")
|
983
|
+
end start_up</syntaxhighlight>
|
984
|
+
|
985
|
+
=={{header|Clojure}}==
|
986
|
+
<syntaxhighlight lang="lisp">(println "Hello world!")</syntaxhighlight>
|
987
|
+
|
988
|
+
=={{header|CMake}}==
|
989
|
+
<syntaxhighlight lang="cmake">message(STATUS "Hello world!")</syntaxhighlight>
|
990
|
+
|
991
|
+
This outputs
|
992
|
+
|
993
|
+
<pre>-- Hello world!</pre>
|
994
|
+
|
995
|
+
=={{header|COBOL}}==
|
996
|
+
Using fixed format.
|
997
|
+
{{works with|OpenCOBOL}}
|
998
|
+
{{works with|Dell Enterprise COBOL}}
|
999
|
+
|
1000
|
+
<syntaxhighlight lang="cobol"> program-id. hello.
|
1001
|
+
procedure division.
|
1002
|
+
display "Hello world!".
|
1003
|
+
stop run.</syntaxhighlight>
|
1004
|
+
|
1005
|
+
Using relaxed compilation rules, the hello program can become a single DISPLAY statement.
|
1006
|
+
{{works with|GnuCOBOL}}
|
1007
|
+
|
1008
|
+
<syntaxhighlight lang="cobol">display"Hello, world".</syntaxhighlight>
|
1009
|
+
|
1010
|
+
<pre>prompt$ cobc -x -frelax-syntax -free hello.cob
|
1011
|
+
hello.cob: 1: Warning: PROGRAM-ID header missing - assumed
|
1012
|
+
hello.cob: 1: Warning: PROCEDURE DIVISION header missing - assumed
|
1013
|
+
|
1014
|
+
prompt$ ./hello
|
1015
|
+
Hello, world</pre>
|
1016
|
+
|
1017
|
+
''Note how COBOL can handle the DISPLAY reserved word without a space before the quoted string, the quote being a compile time scan delimiter. The full stop period after the single statement is still mandatory, at least for GnuCOBOL and a clean compile to executable.''
|
1018
|
+
|
1019
|
+
=={{header|Cobra}}==
|
1020
|
+
<syntaxhighlight lang="cobra">class Hello
|
1021
|
+
def main
|
1022
|
+
print 'Hello world!'</syntaxhighlight>
|
1023
|
+
|
1024
|
+
=={{header|CoffeeScript}}==
|
1025
|
+
{{works with|Node.js}}
|
1026
|
+
<syntaxhighlight lang="coffeescript">console.log "Hello world!"</syntaxhighlight>
|
1027
|
+
{{works with|Rhino engine}}
|
1028
|
+
<syntaxhighlight lang="coffeescript">print "Hello world!"</syntaxhighlight>
|
1029
|
+
|
1030
|
+
=={{header|ColdFusion}}==
|
1031
|
+
<syntaxhighlight lang="coldfusion"><cfoutput>Hello world!</cfoutput></syntaxhighlight>
|
1032
|
+
|
1033
|
+
=={{header|Comal}}==
|
1034
|
+
<syntaxhighlight lang="comal">PRINT "Hello world!"</syntaxhighlight>
|
1035
|
+
|
1036
|
+
=={{header|Comefrom0x10}}==
|
1037
|
+
<syntaxhighlight lang="cf0x10">'Hello world!'</syntaxhighlight>
|
1038
|
+
|
1039
|
+
<syntaxhighlight lang="cf0x10">"Hello world!"</syntaxhighlight>
|
1040
|
+
|
1041
|
+
=={{header|Commodore BASIC}}==
|
1042
|
+
By default some Commodore computers boot into uppercase/graphics mode (C64, C128, VIC-20, Plus 4, etc.) while others (PET, CBM etc.) boot into lowercase/uppercase mode. Therefore, depending on machine used, the CHR$(14) may or may not be required to switch into mixed-case mode.
|
1043
|
+
<syntaxhighlight lang="gwbasic">10 print chr$(147);chr$(14);:REM 147=clear screen, 14=switch to lowercase mode
|
1044
|
+
20 print "Hello world!"
|
1045
|
+
30 end
|
1046
|
+
</syntaxhighlight>
|
1047
|
+
|
1048
|
+
{{Out}}<pre>Hello world!</pre>
|
1049
|
+
|
1050
|
+
=={{header|Common Lisp}}==
|
1051
|
+
<syntaxhighlight lang="lisp">(format t "Hello world!~%")</syntaxhighlight>
|
1052
|
+
|
1053
|
+
Or
|
1054
|
+
|
1055
|
+
<syntaxhighlight lang="lisp">(print "Hello world!")</syntaxhighlight>
|
1056
|
+
|
1057
|
+
===Alternate solution===
|
1058
|
+
I use [https://franz.com/downloads/clp/survey Allegro CL 10.1]
|
1059
|
+
|
1060
|
+
<syntaxhighlight lang="lisp">
|
1061
|
+
;; Project : Hello world/Text
|
1062
|
+
|
1063
|
+
(format t "~a" "Hello world!")
|
1064
|
+
</syntaxhighlight>
|
1065
|
+
Output:
|
1066
|
+
<pre>
|
1067
|
+
Hello world!
|
1068
|
+
</pre>
|
1069
|
+
|
1070
|
+
=={{header|Component Pascal}}==
|
1071
|
+
<syntaxhighlight lang="oberon2">
|
1072
|
+
MODULE Hello;
|
1073
|
+
IMPORT Out;
|
1074
|
+
|
1075
|
+
PROCEDURE Do*;
|
1076
|
+
BEGIN
|
1077
|
+
Out.String("Hello world!"); Out.Ln
|
1078
|
+
END Do;
|
1079
|
+
END Hello.</syntaxhighlight>
|
1080
|
+
Run command ''Hello.Do'' by commander.
|
1081
|
+
|
1082
|
+
=={{header|Coq}}==
|
1083
|
+
<syntaxhighlight lang="coq">
|
1084
|
+
Require Import Coq.Strings.String.
|
1085
|
+
|
1086
|
+
Eval compute in ("Hello world!"%string).
|
1087
|
+
</syntaxhighlight>
|
1088
|
+
|
1089
|
+
=={{header|Corescript}}==
|
1090
|
+
<syntaxhighlight lang="corescript">print Hello world!</syntaxhighlight>
|
1091
|
+
|
1092
|
+
=={{header|Cowgol}}==
|
1093
|
+
<syntaxhighlight lang="cowgol">include "cowgol.coh";
|
1094
|
+
print("Hello world!");
|
1095
|
+
print_nl();</syntaxhighlight>
|
1096
|
+
|
1097
|
+
|
1098
|
+
=={{header|Crack}}==
|
1099
|
+
<syntaxhighlight lang="crack">
|
1100
|
+
import crack.io cout;
|
1101
|
+
cout `Hello world!\n`;
|
1102
|
+
</syntaxhighlight>
|
1103
|
+
|
1104
|
+
=={{header|Creative Basic}}==
|
1105
|
+
<syntaxhighlight lang="creative basic">
|
1106
|
+
OPENCONSOLE
|
1107
|
+
|
1108
|
+
PRINT"Hello world!"
|
1109
|
+
|
1110
|
+
'This line could be left out.
|
1111
|
+
PRINT:PRINT:PRINT"Press any key to end."
|
1112
|
+
|
1113
|
+
'Keep the console from closing right away so the text can be read.
|
1114
|
+
DO:UNTIL INKEY$<>""
|
1115
|
+
|
1116
|
+
CLOSECONSOLE
|
1117
|
+
|
1118
|
+
END
|
1119
|
+
</syntaxhighlight>
|
1120
|
+
|
1121
|
+
=={{header|Crystal}}==
|
1122
|
+
<syntaxhighlight lang="ruby">puts "Hello world!"</syntaxhighlight>
|
1123
|
+
|
1124
|
+
=={{header|D}}==
|
1125
|
+
{{works with|D|2.0}}
|
1126
|
+
<syntaxhighlight lang="d">import std.stdio;
|
1127
|
+
|
1128
|
+
void main() {
|
1129
|
+
writeln("Hello world!");
|
1130
|
+
}</syntaxhighlight>
|
1131
|
+
|
1132
|
+
=={{header|Dafny}}==
|
1133
|
+
<syntaxhighlight lang="dafny">
|
1134
|
+
method Main() {
|
1135
|
+
print "hello, world!\n";
|
1136
|
+
assert 10 < 2;
|
1137
|
+
}
|
1138
|
+
</syntaxhighlight>
|
1139
|
+
|
1140
|
+
=={{header|Dao}}==
|
1141
|
+
<syntaxhighlight lang="dao">io.writeln( 'Hello world!' )</syntaxhighlight>
|
1142
|
+
|
1143
|
+
=={{header|Dart}}==
|
1144
|
+
<syntaxhighlight lang="dart">main() {
|
1145
|
+
var bye = 'Hello world!';
|
1146
|
+
print("$bye");
|
1147
|
+
}</syntaxhighlight>
|
1148
|
+
|
1149
|
+
=={{header|DataWeave}}==
|
1150
|
+
<syntaxhighlight lang="dataweave">"Hello world!"</syntaxhighlight>
|
1151
|
+
|
1152
|
+
=={{header|DBL}}==
|
1153
|
+
<syntaxhighlight lang="dbl">;
|
1154
|
+
; Hello world for DBL version 4 by Dario B.
|
1155
|
+
;
|
1156
|
+
PROC
|
1157
|
+
;------------------------------------------------------------------
|
1158
|
+
XCALL FLAGS (0007000000,1) ;Suppress STOP message
|
1159
|
+
|
1160
|
+
OPEN (1,O,'TT:')
|
1161
|
+
WRITES (1,"Hello world")
|
1162
|
+
|
1163
|
+
DISPLAY (1,"Hello world",10)
|
1164
|
+
DISPLAY (1,$SCR_MOV(-1,12),"again",10) ;move up, right and print
|
1165
|
+
|
1166
|
+
CLOSE 1
|
1167
|
+
END</syntaxhighlight>
|
1168
|
+
|
1169
|
+
=={{header|Dc}}==
|
1170
|
+
<syntaxhighlight lang="dc">[Hello world!]p</syntaxhighlight>
|
1171
|
+
...or print a numerically represented string.
|
1172
|
+
<syntaxhighlight lang="dc">5735816763073014741799356604682 P</syntaxhighlight>
|
1173
|
+
|
1174
|
+
=={{header|DCL}}==
|
1175
|
+
<syntaxhighlight lang="dcl">$ write sys$output "Hello world!"</syntaxhighlight>
|
1176
|
+
|
1177
|
+
=={{header|DDNC}}==
|
1178
|
+
|
1179
|
+
DDNC can only output to a single 7-segment LED display digit, so first we must convert each character into its 7-segment equivalent numerical value.
|
1180
|
+
|
1181
|
+
The three horizontal bars are assigned bits 6, 3, and 0 from top to bottom. The top two vertical bars are assigned bits 5 and 4 while the bottom two vertical bars are assigned bits 2 and 1 from left to right.
|
1182
|
+
|
1183
|
+
Because DDNC can only interpret literals in decimal, each binary number was converted and stored in consecutive memory cells starting at cell 10.
|
1184
|
+
|
1185
|
+
The code can be divided into three sections. The first stores the character numbers in order in an array. The second sets up the loop by loading a delay of 500 milliseconds to slot 3, the start address of the character array in memory to slot 2, and the number of times to loop (14) plus one to slot 5. The third section starts the loop of displaying the characters, waiting for the delay time, incrementing the pointer, decrementing the counter, and checking if the counter is negative to know whether to continue the loop.
|
1186
|
+
|
1187
|
+
<syntaxhighlight lang="ddnc">
|
1188
|
+
0 111 10
|
1189
|
+
0 15 11
|
1190
|
+
0 15 12
|
1191
|
+
0 31 13
|
1192
|
+
0 47 14
|
1193
|
+
0 59 15
|
1194
|
+
0 125 16
|
1195
|
+
0 3 17
|
1196
|
+
0 0 18
|
1197
|
+
0 63 19
|
1198
|
+
0 15 20
|
1199
|
+
0 12 21
|
1200
|
+
0 36 22
|
1201
|
+
0 31 23
|
1202
|
+
0 17 24
|
1203
|
+
|
1204
|
+
0 500 3
|
1205
|
+
0 10 2
|
1206
|
+
0 15 5
|
1207
|
+
|
1208
|
+
60 4
|
1209
|
+
2 2 1
|
1210
|
+
80 1
|
1211
|
+
72 3
|
1212
|
+
30 2
|
1213
|
+
31 5
|
1214
|
+
62 5
|
1215
|
+
61 4
|
1216
|
+
64
|
1217
|
+
</syntaxhighlight>
|
1218
|
+
|
1219
|
+
=={{header|Delphi}}==
|
1220
|
+
<syntaxhighlight lang="delphi">
|
1221
|
+
program ProjectGoodbye;
|
1222
|
+
{$APPTYPE CONSOLE}
|
1223
|
+
begin
|
1224
|
+
WriteLn('Hello world!');
|
1225
|
+
end.
|
1226
|
+
</syntaxhighlight>
|
1227
|
+
|
1228
|
+
=={{header|DeviousYarn}}==
|
1229
|
+
<syntaxhighlight lang="deviousyarn">o:"Hello world!</syntaxhighlight>
|
1230
|
+
|
1231
|
+
=={{header|DIBOL-11}}==
|
1232
|
+
<syntaxhighlight lang="dibol-11">
|
1233
|
+
START ;Hello World
|
1234
|
+
|
1235
|
+
RECORD HELLO
|
1236
|
+
, A11, 'Hello World'
|
1237
|
+
|
1238
|
+
PROC
|
1239
|
+
XCALL FLAGS (0007000000,1) ;Suppress STOP message
|
1240
|
+
|
1241
|
+
OPEN(8,O,'TT:')
|
1242
|
+
WRITES(8,HELLO)
|
1243
|
+
END
|
1244
|
+
|
1245
|
+
</syntaxhighlight>
|
1246
|
+
|
1247
|
+
=={{header|Diego}}==
|
1248
|
+
Once the caller has met the computer and its printer...
|
1249
|
+
<syntaxhighlight lang="diego">with_computer(comp1)_printer(lp1)_text(Hello World!);</syntaxhighlight>
|
1250
|
+
If the caller is the computer...
|
1251
|
+
<syntaxhighlight lang="diego">with_me()_printer(lp1)_text(Hello World!);</syntaxhighlight>
|
1252
|
+
...or can be shortened as...
|
1253
|
+
<syntaxhighlight lang="diego">me()_ptr(lp1)_txt(Hello World!);</syntaxhighlight>
|
1254
|
+
If the computer has more than one printer...
|
1255
|
+
<syntaxhighlight lang="diego">me()_printer()_text(Hello World!);</syntaxhighlight>
|
1256
|
+
If there are more than one computer which have zero or more printers...
|
1257
|
+
<syntaxhighlight lang="diego">with_computer()_printer()_text(Hello World!);</syntaxhighlight>
|
1258
|
+
If there are zero or more printers connected to any thing (device)...
|
1259
|
+
<syntaxhighlight lang="diego">with_printer()_text(Hello World!);</syntaxhighlight>
|
1260
|
+
|
1261
|
+
=={{header|DIV Games Studio}}==
|
1262
|
+
<syntaxhighlight lang="div">
|
1263
|
+
PROGRAM HELLOWORLD;
|
1264
|
+
|
1265
|
+
BEGIN
|
1266
|
+
|
1267
|
+
WRITE_TEXT(0,160,100,4,"HELLO WORLD!");
|
1268
|
+
LOOP
|
1269
|
+
FRAME;
|
1270
|
+
END
|
1271
|
+
END
|
1272
|
+
|
1273
|
+
</syntaxhighlight>
|
1274
|
+
|
1275
|
+
=={{header|DM}}==
|
1276
|
+
<syntaxhighlight lang="dm">
|
1277
|
+
/client/New()
|
1278
|
+
..()
|
1279
|
+
src << "Hello world!"
|
1280
|
+
</syntaxhighlight>
|
1281
|
+
|
1282
|
+
=={{header|Draco}}==
|
1283
|
+
<syntaxhighlight lang="draco">proc nonrec main() void:
|
1284
|
+
writeln("Hello world!")
|
1285
|
+
corp</syntaxhighlight>
|
1286
|
+
|
1287
|
+
=={{header|Dragon}}==
|
1288
|
+
<syntaxhighlight lang="dragon">
|
1289
|
+
showln "Hello world!"
|
1290
|
+
</syntaxhighlight>
|
1291
|
+
|
1292
|
+
=={{header|DWScript}}==
|
1293
|
+
<syntaxhighlight lang="delphi">
|
1294
|
+
PrintLn('Hello world!');
|
1295
|
+
</syntaxhighlight>
|
1296
|
+
|
1297
|
+
=={{header|Dyalect}}==
|
1298
|
+
<syntaxhighlight lang="dyalect">print("Hello world!")</syntaxhighlight>
|
1299
|
+
|
1300
|
+
=={{header|Dylan}}==
|
1301
|
+
<syntaxhighlight lang="dylan">
|
1302
|
+
module: hello-world
|
1303
|
+
|
1304
|
+
format-out("%s\n", "Hello world!");
|
1305
|
+
</syntaxhighlight>
|
1306
|
+
|
1307
|
+
=={{header|Dylan.NET}}==
|
1308
|
+
{{works with|Mono|2.6.7}}
|
1309
|
+
{{works with|Mono|2.10.x}}
|
1310
|
+
{{works with|Mono|3.x.y}}
|
1311
|
+
{{works with|.NET|3.5}}
|
1312
|
+
{{works with|.NET|4.0}}
|
1313
|
+
{{works with|.NET|4.5}}
|
1314
|
+
One Line version:
|
1315
|
+
<syntaxhighlight lang="dylan.net">Console::WriteLine("Hello world!")</syntaxhighlight>
|
1316
|
+
|
1317
|
+
Hello World Program:
|
1318
|
+
<syntaxhighlight lang="dylan.net">
|
1319
|
+
//compile using the new dylan.NET v, 11.5.1.2 or later
|
1320
|
+
//use mono to run the compiler
|
1321
|
+
#refstdasm mscorlib.dll
|
1322
|
+
|
1323
|
+
import System
|
1324
|
+
|
1325
|
+
assembly helloworld exe
|
1326
|
+
ver 1.2.0.0
|
1327
|
+
|
1328
|
+
class public Program
|
1329
|
+
|
1330
|
+
method public static void main()
|
1331
|
+
Console::WriteLine("Hello world!")
|
1332
|
+
end method
|
1333
|
+
|
1334
|
+
end class
|
1335
|
+
</syntaxhighlight>
|
1336
|
+
|
1337
|
+
=={{header|Déjà Vu}}==
|
1338
|
+
<syntaxhighlight lang="dejavu">!print "Hello world!"</syntaxhighlight>
|
1339
|
+
|
1340
|
+
=={{header|E}}==
|
1341
|
+
<syntaxhighlight lang="e">println("Hello world!")
|
1342
|
+
|
1343
|
+
stdout.println("Hello world!")</syntaxhighlight>
|
1344
|
+
|
1345
|
+
=={{header|EasyLang}}==
|
1346
|
+
|
1347
|
+
<syntaxhighlight lang="text">print "Hello world!"</syntaxhighlight>
|
1348
|
+
|
1349
|
+
=={{header|eC}}==
|
1350
|
+
<syntaxhighlight lang="ec">class GoodByeApp : Application
|
1351
|
+
{
|
1352
|
+
void Main()
|
1353
|
+
{
|
1354
|
+
PrintLn("Hello world!");
|
1355
|
+
}
|
1356
|
+
}</syntaxhighlight>
|
1357
|
+
|
1358
|
+
=={{header|EchoLisp}}==
|
1359
|
+
<syntaxhighlight lang="lisp">
|
1360
|
+
(display "Hello world!" "color:blue")
|
1361
|
+
</syntaxhighlight>
|
1362
|
+
|
1363
|
+
=={{header|ECL}}==
|
1364
|
+
<syntaxhighlight lang="ecl">
|
1365
|
+
OUTPUT('Hello world!');
|
1366
|
+
</syntaxhighlight>
|
1367
|
+
|
1368
|
+
=={{header|Ecstasy}}==
|
1369
|
+
<syntaxhighlight lang="java">module HelloWorld
|
1370
|
+
{
|
1371
|
+
void run()
|
1372
|
+
{
|
1373
|
+
@Inject Console console;
|
1374
|
+
console.println("Hello World!");
|
1375
|
+
}
|
1376
|
+
}</syntaxhighlight>
|
1377
|
+
|
1378
|
+
=={{header|EDSAC order code}}==
|
1379
|
+
The EDSAC did not support lower-case letters. The method used here is to include a separate <code>O</code> order to print each character: for short messages and labels this is quite adequate. A more general (though slightly more involved) solution for printing strings is given at [[Hello world/Line printer#EDSAC order code]].
|
1380
|
+
<syntaxhighlight lang="edsac">[ Print HELLO WORLD ]
|
1381
|
+
[ A program for the EDSAC ]
|
1382
|
+
[ Works with Initial Orders 2 ]
|
1383
|
+
|
1384
|
+
T64K [ Set load point: address 64 ]
|
1385
|
+
GK [ Set base address ]
|
1386
|
+
O13@ [ Each O order outputs one ]
|
1387
|
+
O14@ [ character. The numerical ]
|
1388
|
+
O15@ [ parameter gives the offset ]
|
1389
|
+
O16@ [ (from the base address) where ]
|
1390
|
+
O17@ [ the character to print is ]
|
1391
|
+
O18@ [ stored ]
|
1392
|
+
O19@
|
1393
|
+
O20@
|
1394
|
+
O21@
|
1395
|
+
O22@
|
1396
|
+
O23@
|
1397
|
+
O24@
|
1398
|
+
ZF [ Stop ]
|
1399
|
+
*F [ Shift to print letters ]
|
1400
|
+
HF [ Character literals ]
|
1401
|
+
EF
|
1402
|
+
LF
|
1403
|
+
LF
|
1404
|
+
OF
|
1405
|
+
!F [ Space character ]
|
1406
|
+
WF
|
1407
|
+
OF
|
1408
|
+
RF
|
1409
|
+
LF
|
1410
|
+
DF
|
1411
|
+
EZPF [ Start program beginning at
|
1412
|
+
the load point ]</syntaxhighlight>
|
1413
|
+
{{out}}
|
1414
|
+
<pre>HELLO WORLD</pre>
|
1415
|
+
|
1416
|
+
=={{header|Efene}}==
|
1417
|
+
short version (without a function)
|
1418
|
+
|
1419
|
+
<syntaxhighlight lang="efene">io.format("Hello world!~n")</syntaxhighlight>
|
1420
|
+
|
1421
|
+
complete version (put this in a file and compile it)
|
1422
|
+
|
1423
|
+
<syntaxhighlight lang="efene">@public
|
1424
|
+
run = fn () {
|
1425
|
+
io.format("Hello world!~n")
|
1426
|
+
}</syntaxhighlight>
|
1427
|
+
|
1428
|
+
=={{header|Egel}}==
|
1429
|
+
<syntaxhighlight lang="egel">
|
1430
|
+
def main = "Hello World!"
|
1431
|
+
</syntaxhighlight>
|
1432
|
+
|
1433
|
+
=={{header|Egison}}==
|
1434
|
+
|
1435
|
+
<syntaxhighlight lang="egison">
|
1436
|
+
(define $main
|
1437
|
+
(lambda [$argv]
|
1438
|
+
(write-string "Hello world!\n")))
|
1439
|
+
</syntaxhighlight>
|
1440
|
+
|
1441
|
+
=={{header|EGL}}==
|
1442
|
+
{{works with|EDT}}
|
1443
|
+
{{works with|RBD}}
|
1444
|
+
<syntaxhighlight lang="egl">
|
1445
|
+
program HelloWorld
|
1446
|
+
function main()
|
1447
|
+
SysLib.writeStdout("Hello world!");
|
1448
|
+
end
|
1449
|
+
end
|
1450
|
+
</syntaxhighlight>
|
1451
|
+
|
1452
|
+
=={{header|Eiffel}}==
|
1453
|
+
{{wikipedia|Eiffel (programming language)}}
|
1454
|
+
<syntaxhighlight lang="eiffel">class
|
1455
|
+
HELLO_WORLD
|
1456
|
+
create
|
1457
|
+
make
|
1458
|
+
feature
|
1459
|
+
make
|
1460
|
+
do
|
1461
|
+
print ("Hello world!%N")
|
1462
|
+
end
|
1463
|
+
end</syntaxhighlight>
|
1464
|
+
|
1465
|
+
=={{header|Ela}}==
|
1466
|
+
<syntaxhighlight lang="ela">open monad io
|
1467
|
+
do putStrLn "Hello world!" ::: IO</syntaxhighlight>
|
1468
|
+
|
1469
|
+
=={{header|Elan}}==
|
1470
|
+
<syntaxhighlight lang="elan">putline ("Hello, world!");</syntaxhighlight>
|
1471
|
+
|
1472
|
+
=={{header|elastiC}}==
|
1473
|
+
From the [http://www.elasticworld.org/man/elastic.html elastiC Manual].
|
1474
|
+
|
1475
|
+
<syntaxhighlight lang="elastic">package hello;
|
1476
|
+
|
1477
|
+
// Import the `basic' package
|
1478
|
+
import basic;
|
1479
|
+
|
1480
|
+
// Define a simple function
|
1481
|
+
function hello()
|
1482
|
+
{
|
1483
|
+
// Print hello world
|
1484
|
+
basic.print( "Hello world!\n" );
|
1485
|
+
}
|
1486
|
+
|
1487
|
+
/*
|
1488
|
+
* Here we start to execute package code
|
1489
|
+
*/
|
1490
|
+
|
1491
|
+
// Invoke the `hello' function
|
1492
|
+
hello();</syntaxhighlight>
|
1493
|
+
|
1494
|
+
=={{header|Elena}}==
|
1495
|
+
ELENA 4.x:
|
1496
|
+
<syntaxhighlight lang="elena">public program()
|
1497
|
+
{
|
1498
|
+
console.writeLine:"Hello world!"
|
1499
|
+
}</syntaxhighlight>
|
1500
|
+
|
1501
|
+
=={{header|Elisa}}==
|
1502
|
+
<syntaxhighlight lang="elisa"> "Hello world!"? </syntaxhighlight>
|
1503
|
+
|
1504
|
+
=={{header|Elixir}}==
|
1505
|
+
<syntaxhighlight lang="elixir">
|
1506
|
+
IO.puts "Hello world!"
|
1507
|
+
</syntaxhighlight>
|
1508
|
+
|
1509
|
+
=={{header|Elm}}==
|
1510
|
+
<syntaxhighlight lang="haskell">main = text "Goodbye World!"</syntaxhighlight>
|
1511
|
+
|
1512
|
+
=={{header|Emacs Lisp}}==
|
1513
|
+
|
1514
|
+
<syntaxhighlight lang="lisp">(message "Hello world!")</syntaxhighlight>
|
1515
|
+
|
1516
|
+
Alternatively, <code>princ</code> can be used:
|
1517
|
+
|
1518
|
+
<syntaxhighlight lang="lisp">(princ "Hello world!\n")</syntaxhighlight>
|
1519
|
+
|
1520
|
+
=={{header|Emojicode}}==
|
1521
|
+
<syntaxhighlight lang="emojicode">🏁 🍇
|
1522
|
+
😀 🔤Hello world!🔤
|
1523
|
+
🍉</syntaxhighlight>
|
1524
|
+
|
1525
|
+
=={{header|Erlang}}==
|
1526
|
+
<syntaxhighlight lang="erlang">io:format("Hello world!~n").</syntaxhighlight>
|
1527
|
+
|
1528
|
+
=={{header|ERRE}}==
|
1529
|
+
<syntaxhighlight lang="erre">
|
1530
|
+
! Hello World in ERRE language
|
1531
|
+
PROGRAM HELLO
|
1532
|
+
BEGIN
|
1533
|
+
PRINT("Hello world!")
|
1534
|
+
END PROGRAM
|
1535
|
+
</syntaxhighlight>
|
1536
|
+
|
1537
|
+
=={{header|Euler Math Toolbox}}==
|
1538
|
+
|
1539
|
+
<pre>
|
1540
|
+
"Hello world!"
|
1541
|
+
</pre>
|
1542
|
+
|
1543
|
+
=={{header|Extended BrainF***}}==
|
1544
|
+
|
1545
|
+
<syntaxhighlight lang="bf">[.>]@Hello world!</syntaxhighlight>
|
1546
|
+
|
1547
|
+
=={{header|Ezhil}}==
|
1548
|
+
|
1549
|
+
<span style="color:#FF0000">பதிப்பி</span><span style="color:#CD5C5C">"வணக்கம் உலகம்!"</span><br />
|
1550
|
+
<span style="color:#FF0000">பதிப்பி</span><span style="color:#CD5C5C"> "Hello world!" </span><br />
|
1551
|
+
<span style="color:#FF0000">பதிப்பி</span><span style="color:#CD5C5C">"******* வணக்கம்! மீண்டும் சந்திப்போம் *******"</span><br />
|
1552
|
+
<span style="color:#8B0000">exit()</span>
|
1553
|
+
|
1554
|
+
=={{header|F_Sharp|F#}}==
|
1555
|
+
<syntaxhighlight lang="fsharp">printfn "%s" "Hello world!"</syntaxhighlight>
|
1556
|
+
or using .Net classes directly
|
1557
|
+
<syntaxhighlight lang="fsharp">System.Console.WriteLine("Hello world!")</syntaxhighlight>
|
1558
|
+
|
1559
|
+
=={{header|Factor}}==
|
1560
|
+
<syntaxhighlight lang="factor">"Hello world!" print</syntaxhighlight>
|
1561
|
+
|
1562
|
+
=={{header|Falcon}}==
|
1563
|
+
With the printl() function:
|
1564
|
+
<syntaxhighlight lang="falcon">printl("Hello world!")</syntaxhighlight>
|
1565
|
+
Or via "fast print":
|
1566
|
+
<syntaxhighlight lang="falcon">> "Hello world!"</syntaxhighlight>
|
1567
|
+
|
1568
|
+
=={{header|FALSE}}==
|
1569
|
+
<syntaxhighlight lang="false">"Hello world!
|
1570
|
+
"</syntaxhighlight>
|
1571
|
+
|
1572
|
+
=={{header|Fantom}}==
|
1573
|
+
|
1574
|
+
<syntaxhighlight lang="fantom">
|
1575
|
+
class HelloText
|
1576
|
+
{
|
1577
|
+
public static Void main ()
|
1578
|
+
{
|
1579
|
+
echo ("Hello world!")
|
1580
|
+
}
|
1581
|
+
}
|
1582
|
+
</syntaxhighlight>
|
1583
|
+
|
1584
|
+
=={{header|Fennel}}==
|
1585
|
+
<syntaxhighlight lang="fennel">(print "Hello World")</syntaxhighlight>
|
1586
|
+
|
1587
|
+
=={{header|ferite}}==
|
1588
|
+
word.}}
|
1589
|
+
<syntaxhighlight lang="ferite">uses "console";
|
1590
|
+
Console.println( "Goodby, World!" );</syntaxhighlight>
|
1591
|
+
|
1592
|
+
=={{header|Fermat}}==
|
1593
|
+
<syntaxhighlight lang="fermat">!!'Hello, World!';</syntaxhighlight>
|
1594
|
+
|
1595
|
+
=={{header|Fexl}}==
|
1596
|
+
<syntaxhighlight lang="fexl">say "Hello world!"</syntaxhighlight>
|
1597
|
+
|
1598
|
+
=={{header|Fhidwfe}}==
|
1599
|
+
<syntaxhighlight lang="fhidwfe">puts$ "Hello, world!\n"</syntaxhighlight>
|
1600
|
+
|
1601
|
+
=={{header|Fish}}==
|
1602
|
+
Standard Hello, world example, modified for this task:
|
1603
|
+
<syntaxhighlight lang="fish">!v"Hello world!"r!
|
1604
|
+
>l?!;o</syntaxhighlight>
|
1605
|
+
Explanation of the code:<br/>
|
1606
|
+
<tt>!v"</tt> jumps over the <tt>v</tt> character with the <tt>!</tt> sign, then starts the string mode with <tt>"</tt> .<br/>
|
1607
|
+
Then the characters <tt>Hello world!</tt> are added, and string mode is closed with <tt>"</tt>.<br/>
|
1608
|
+
The stack is reversed for printing (<tt>r</tt>), and a jump (<tt>!</tt>) is executed to jump over the <tt>!</tt> at the beginning of the line and execute the <tt>v</tt>. ([[Fish]] is torical)<br/>
|
1609
|
+
After going down by <tt>v</tt>, it goes rightwards again by <tt>></tt> and this line is being executed.<br/>
|
1610
|
+
This line pushes the stack size (<tt>l</tt>), and stops (<tt>;</tt>) if the top item on the stack is equal to 0 (<tt>?</tt>). Else it executes the <tt>!</tt> directly after it and jumps to the <tt>o</tt>, which outputs the top item in [http://en.wikipedia.org/wiki/Ascii ASCII]. Then the line is executed again. It effectively prints the stack until it's empty, then it terminates.
|
1611
|
+
|
1612
|
+
=={{header|FOCAL}}==
|
1613
|
+
<syntaxhighlight lang="focal">TYPE "Hello, world" !</syntaxhighlight>
|
1614
|
+
|
1615
|
+
=={{header|Forth}}==
|
1616
|
+
<syntaxhighlight lang="forth">." Hello world!"</syntaxhighlight>
|
1617
|
+
|
1618
|
+
Or as a whole program:
|
1619
|
+
|
1620
|
+
<syntaxhighlight lang="forth">: goodbye ( -- ) ." Hello world!" CR ;</syntaxhighlight>
|
1621
|
+
|
1622
|
+
=={{header|Fortran}}==
|
1623
|
+
{{works with|F77}}
|
1624
|
+
Simplest case - display using default formatting:
|
1625
|
+
|
1626
|
+
<syntaxhighlight lang="fortran">print *,"Hello world!"</syntaxhighlight>
|
1627
|
+
|
1628
|
+
Use explicit output format:
|
1629
|
+
|
1630
|
+
<syntaxhighlight lang="fortran">100 format (5X,A,"!")
|
1631
|
+
print 100,"Hello world!"</syntaxhighlight>
|
1632
|
+
|
1633
|
+
Output to channels other than stdout goes like this:
|
1634
|
+
|
1635
|
+
<syntaxhighlight lang="fortran">write (89,100) "Hello world!"</syntaxhighlight>
|
1636
|
+
|
1637
|
+
uses the format given at label 100 to output to unit 89. If output unit with this number exists yet (no "<tt>OPEN</tt>" statement or processor-specific external unit setting), a new file will be created and the output sent there. On most UNIX/Linux systems that file will be named "<tt>fort.89</tt>".
|
1638
|
+
{{7*7}}
|
1639
|
+
|
1640
|
+
=={{header|Fortress}}==
|
1641
|
+
<syntaxhighlight lang="fortress">export Executable
|
1642
|
+
|
1643
|
+
run() = println("Hello world!")</syntaxhighlight>
|
1644
|
+
|
1645
|
+
=={{header|FreeBASIC}}==
|
1646
|
+
<syntaxhighlight lang="freebasic">? "Hello world!"
|
1647
|
+
sleep</syntaxhighlight>
|
1648
|
+
|
1649
|
+
|
1650
|
+
=={{header|Free Pascal}}==
|
1651
|
+
<syntaxhighlight lang="pascal">
|
1652
|
+
PROGRAM HelloWorld ;
|
1653
|
+
|
1654
|
+
{$APPTYPE CONSOLE}
|
1655
|
+
|
1656
|
+
(*)
|
1657
|
+
|
1658
|
+
https://www.freepascal.org/advantage.var
|
1659
|
+
|
1660
|
+
(*)
|
1661
|
+
|
1662
|
+
USES
|
1663
|
+
|
1664
|
+
crt;
|
1665
|
+
|
1666
|
+
BEGIN
|
1667
|
+
|
1668
|
+
WriteLn ( 'Hello world!' ) ;
|
1669
|
+
|
1670
|
+
END.
|
1671
|
+
</syntaxhighlight>
|
1672
|
+
|
1673
|
+
=={{header|Frege}}==
|
1674
|
+
|
1675
|
+
{{Works with|Frege|3.20.113}}
|
1676
|
+
|
1677
|
+
<syntaxhighlight lang="frege">module HelloWorld where
|
1678
|
+
main _ = println "Hello world!"</syntaxhighlight>
|
1679
|
+
|
1680
|
+
=={{header|friendly interactive shell}}==
|
1681
|
+
Unlike other [[UNIX shell]] languages, fish doesn't support history substitution, so <code>!</code> is safe to use without quoting.
|
1682
|
+
<syntaxhighlight lang="fishshell">echo Hello world!</syntaxhighlight>
|
1683
|
+
|
1684
|
+
=={{header|Frink}}==
|
1685
|
+
<syntaxhighlight lang="frink">
|
1686
|
+
println["Hello world!"]
|
1687
|
+
</syntaxhighlight>
|
1688
|
+
|
1689
|
+
=={{header|FunL}}==
|
1690
|
+
<syntaxhighlight lang="funl">println( 'Hello world!' )</syntaxhighlight>
|
1691
|
+
|
1692
|
+
|
1693
|
+
=={{header|Furor}}==
|
1694
|
+
<syntaxhighlight lang="furor">."Hello, World!\n"</syntaxhighlight>
|
1695
|
+
|
1696
|
+
=={{header|FutureBasic}}==
|
1697
|
+
<syntaxhighlight lang="futurebasic">window 1
|
1698
|
+
print @"Hello world!"
|
1699
|
+
|
1700
|
+
HandleEvents</syntaxhighlight>
|
1701
|
+
|
1702
|
+
=={{header|FUZE BASIC}}==
|
1703
|
+
<syntaxhighlight lang="qbasic">PRINT "Hello world!"</syntaxhighlight>
|
1704
|
+
|
1705
|
+
=={{header|Gambas}}==
|
1706
|
+
'''[https://gambas-playground.proko.eu/?gist=d3a51f670e4eb0f793b513b14329be51 Click this link to run this code]'''
|
1707
|
+
<syntaxhighlight lang="gambas">Public Sub Main()
|
1708
|
+
|
1709
|
+
PRINT "Hello world!"
|
1710
|
+
|
1711
|
+
End</syntaxhighlight>
|
1712
|
+
|
1713
|
+
=={{header|GAP}}==
|
1714
|
+
<syntaxhighlight lang="gap"># Several ways to do it
|
1715
|
+
"Hello world!";
|
1716
|
+
|
1717
|
+
Print("Hello world!\n"); # No EOL appended
|
1718
|
+
|
1719
|
+
Display("Hello world!");
|
1720
|
+
|
1721
|
+
f := OutputTextUser();
|
1722
|
+
WriteLine(f, "Hello world!\n");
|
1723
|
+
CloseStream(f);</syntaxhighlight>
|
1724
|
+
|
1725
|
+
=={{header|GB BASIC}}==
|
1726
|
+
<syntaxhighlight lang="gb basic">10 print "Hello world!"</syntaxhighlight>
|
1727
|
+
|
1728
|
+
=={{header|gecho}}==
|
1729
|
+
<syntaxhighlight lang="gecho">'Hello, <> 'World! print</syntaxhighlight>
|
1730
|
+
|
1731
|
+
=={{header|Gema}}==
|
1732
|
+
Gema ia a preprocessor that reads an input file and writes an output file.
|
1733
|
+
This code will write "Hello world!' no matter what input is given.
|
1734
|
+
|
1735
|
+
<syntaxhighlight lang="gema">*= ! ignore off content of input
|
1736
|
+
\B=Hello world!\! ! Start output with this text.</syntaxhighlight>
|
1737
|
+
|
1738
|
+
=={{header|Genie}}==
|
1739
|
+
<syntaxhighlight lang="genie">
|
1740
|
+
init
|
1741
|
+
print "Hello world!"
|
1742
|
+
</syntaxhighlight>
|
1743
|
+
|
1744
|
+
=={{header|Gentee}}==
|
1745
|
+
<syntaxhighlight lang="gentee">func hello <main>
|
1746
|
+
{
|
1747
|
+
print("Hello world!")
|
1748
|
+
}</syntaxhighlight>
|
1749
|
+
|
1750
|
+
=={{header|GFA Basic}}==
|
1751
|
+
<syntaxhighlight lang="gfabasic">PRINT "Hello World"</syntaxhighlight>
|
1752
|
+
|
1753
|
+
=={{header|GLBasic}}==
|
1754
|
+
<syntaxhighlight lang="glbasic">STDOUT "Hello world!"</syntaxhighlight>
|
1755
|
+
|
1756
|
+
=={{header|Glee}}==
|
1757
|
+
<syntaxhighlight lang="glee">"Hello world!"</syntaxhighlight>
|
1758
|
+
|
1759
|
+
or
|
1760
|
+
|
1761
|
+
<syntaxhighlight lang="glee">'Hello world!'</syntaxhighlight>
|
1762
|
+
|
1763
|
+
or to display with double quotes
|
1764
|
+
|
1765
|
+
<syntaxhighlight lang="glee"> '"Goodbye,World!"'</syntaxhighlight>
|
1766
|
+
|
1767
|
+
or to display with single quotes
|
1768
|
+
|
1769
|
+
<syntaxhighlight lang="glee"> "'Goodbye,World!'"</syntaxhighlight>
|
1770
|
+
|
1771
|
+
=={{header|Global Script}}==
|
1772
|
+
|
1773
|
+
This uses the <code>gsio</code> I/O operations, which are designed to be simple to implement on top of Haskell and simple to use.
|
1774
|
+
<syntaxhighlight lang="global script">λ _. print qq{Hello world!\n}</syntaxhighlight>
|
1775
|
+
|
1776
|
+
=={{header|GlovePIE}}==
|
1777
|
+
<syntaxhighlight lang="glovepie">debug="Hello world!"</syntaxhighlight>
|
1778
|
+
|
1779
|
+
=={{header|GML}}==
|
1780
|
+
<syntaxhighlight lang="c">show_message("Hello world!"); // displays a pop-up message
|
1781
|
+
show_debug_message("Hello world!"); // sends text to the debug log or IDE</syntaxhighlight>
|
1782
|
+
|
1783
|
+
=={{header|Go}}==
|
1784
|
+
|
1785
|
+
<syntaxhighlight lang="go">package main
|
1786
|
+
|
1787
|
+
import "fmt"
|
1788
|
+
|
1789
|
+
func main() { fmt.Println("Hello world!") }</syntaxhighlight>
|
1790
|
+
|
1791
|
+
=={{header|Golfscript}}==
|
1792
|
+
<syntaxhighlight lang="golfscript">"Hello world!"</syntaxhighlight>
|
1793
|
+
|
1794
|
+
=={{header|Gosu}}==
|
1795
|
+
<syntaxhighlight lang="gosu">print("Hello world!")</syntaxhighlight>
|
1796
|
+
|
1797
|
+
=={{header|Grain}}==
|
1798
|
+
<syntaxhighlight lang="grain">print("Hello world!")</syntaxhighlight>
|
1799
|
+
|
1800
|
+
=={{header|Groovy}}==
|
1801
|
+
<syntaxhighlight lang="groovy">println "Hello world!"</syntaxhighlight>
|
1802
|
+
|
1803
|
+
=={{header|GW-BASIC}}==
|
1804
|
+
<syntaxhighlight lang="qbasic">10 PRINT "Hello world!"</syntaxhighlight>
|
1805
|
+
|
1806
|
+
=={{header|Hack}}==
|
1807
|
+
<syntaxhighlight lang="hack"><?hh echo 'Hello world!'; ?></syntaxhighlight>
|
1808
|
+
|
1809
|
+
=={{header|Halon}}==
|
1810
|
+
If the code in run in the REPL the output will be to stdout otherwise syslog LOG_DEBUG will be used.
|
1811
|
+
|
1812
|
+
<syntaxhighlight lang="halon">echo "Hello world!";</syntaxhighlight>
|
1813
|
+
|
1814
|
+
=={{header|Harbour}}==
|
1815
|
+
<syntaxhighlight lang="visualfoxpro">? "Hello world!"</syntaxhighlight>
|
1816
|
+
|
1817
|
+
=={{header|Hare}}==
|
1818
|
+
<syntaxhighlight lang="hare">use fmt;
|
1819
|
+
|
1820
|
+
export fn main() void = {
|
1821
|
+
fmt::println("Hello, world!")!;
|
1822
|
+
};</syntaxhighlight>
|
1823
|
+
|
1824
|
+
=={{header|Haskell}}==
|
1825
|
+
<syntaxhighlight lang="haskell">
|
1826
|
+
main = putStrLn "Hello world!"
|
1827
|
+
</syntaxhighlight>
|
1828
|
+
|
1829
|
+
=={{header|Haxe}}==
|
1830
|
+
<syntaxhighlight lang="actionscript">trace("Hello world!");</syntaxhighlight>
|
1831
|
+
|
1832
|
+
=={{header|hexiscript}}==
|
1833
|
+
<syntaxhighlight lang="hexiscript">println "Hello world!"</syntaxhighlight>
|
1834
|
+
|
1835
|
+
=={{header|HicEst}}==
|
1836
|
+
<syntaxhighlight lang="hicest">WRITE() 'Hello world!'</syntaxhighlight>
|
1837
|
+
|
1838
|
+
=={{header|HLA}}==
|
1839
|
+
<syntaxhighlight lang="hla">program goodbyeWorld;
|
1840
|
+
#include("stdlib.hhf")
|
1841
|
+
begin goodbyeWorld;
|
1842
|
+
|
1843
|
+
stdout.put( "Hello world!" nl );
|
1844
|
+
|
1845
|
+
end goodbyeWorld;</syntaxhighlight>
|
1846
|
+
|
1847
|
+
=={{header|HolyC}}==
|
1848
|
+
<syntaxhighlight lang="holyc">"Hello world!\n";</syntaxhighlight>
|
1849
|
+
|
1850
|
+
=={{header|Hoon}}==
|
1851
|
+
<syntaxhighlight lang="hoon">~& "Hello world!" ~</syntaxhighlight>
|
1852
|
+
|
1853
|
+
=={{header|HPPPL}}==
|
1854
|
+
<syntaxhighlight lang="hpppl">PRINT("Hello world!");</syntaxhighlight>
|
1855
|
+
|
1856
|
+
=={{header|HQ9+}}==
|
1857
|
+
{{incorrect|HQ9+|output isn't consistent with the task's requirements (and is probably incapable of solving the task).}}
|
1858
|
+
<syntaxhighlight lang="hq9plus">H</syntaxhighlight>
|
1859
|
+
*Technically, HQ9+ can't print "Hello world!" text because of its specification.
|
1860
|
+
- H : Print 'Hello World!'<br>
|
1861
|
+
- Q : Quine<br>
|
1862
|
+
- 9 : Print '99 Bottles of Beer'<br>
|
1863
|
+
- + : Increase Pointer (useless!)
|
1864
|
+
|
1865
|
+
=={{header|Huginn}}==
|
1866
|
+
<syntaxhighlight lang="huginn">#! /bin/sh
|
1867
|
+
exec huginn --no-argv -E "${0}" "${@}"
|
1868
|
+
#! huginn
|
1869
|
+
|
1870
|
+
main() {
|
1871
|
+
print( "Hello World!\n" );
|
1872
|
+
return ( 0 );
|
1873
|
+
}</syntaxhighlight>
|
1874
|
+
=={{header|HTML5}}==
|
1875
|
+
<syntaxhighlight lang="html5">
|
1876
|
+
<!DOCTYPE html>
|
1877
|
+
<html>
|
1878
|
+
<body>
|
1879
|
+
<h1>Hello world!</h1>
|
1880
|
+
</body>
|
1881
|
+
</html>
|
1882
|
+
</syntaxhighlight>
|
1883
|
+
|
1884
|
+
=={{header|Hy}}==
|
1885
|
+
<syntaxhighlight lang="clojure">(print "Hello world!")</syntaxhighlight>
|
1886
|
+
|
1887
|
+
=={{header|i}}==
|
1888
|
+
<syntaxhighlight lang="i">software {
|
1889
|
+
print("Hello world!")
|
1890
|
+
}</syntaxhighlight>
|
1891
|
+
|
1892
|
+
=={{header|Icon}} and {{header|Unicon}}==
|
1893
|
+
<syntaxhighlight lang="icon">procedure main()
|
1894
|
+
write( "Hello world!" )
|
1895
|
+
end</syntaxhighlight>
|
1896
|
+
|
1897
|
+
=={{header|IDL}}==
|
1898
|
+
<syntaxhighlight lang="idl">print,'Hello world!'</syntaxhighlight>
|
1899
|
+
|
1900
|
+
=={{header|Idris}}==
|
1901
|
+
<syntaxhighlight lang="idris">module Main
|
1902
|
+
|
1903
|
+
main : IO ()
|
1904
|
+
main = putStrLn "Hello world!"</syntaxhighlight>
|
1905
|
+
|
1906
|
+
=={{header|Inform 6}}==
|
1907
|
+
<syntaxhighlight lang="inform 6">[Main;
|
1908
|
+
print "Hello world!^";
|
1909
|
+
];</syntaxhighlight>
|
1910
|
+
|
1911
|
+
=={{header|Inko}}==
|
1912
|
+
<syntaxhighlight lang="inko">import std::stdio::stdout
|
1913
|
+
|
1914
|
+
stdout.print('Hello, world!')</syntaxhighlight>
|
1915
|
+
|
1916
|
+
|
1917
|
+
=={{header|Intercal}}==
|
1918
|
+
<syntaxhighlight lang="intercal">DO ,1 <- #13
|
1919
|
+
PLEASE DO ,1 SUB #1 <- #238
|
1920
|
+
DO ,1 SUB #2 <- #108
|
1921
|
+
DO ,1 SUB #3 <- #112
|
1922
|
+
DO ,1 SUB #4 <- #0
|
1923
|
+
DO ,1 SUB #5 <- #64
|
1924
|
+
DO ,1 SUB #6 <- #194
|
1925
|
+
PLEASE DO ,1 SUB #7 <- #48
|
1926
|
+
DO ,1 SUB #8 <- #26
|
1927
|
+
DO ,1 SUB #9 <- #244
|
1928
|
+
PLEASE DO ,1 SUB #10 <- #168
|
1929
|
+
DO ,1 SUB #11 <- #24
|
1930
|
+
DO ,1 SUB #12 <- #16
|
1931
|
+
DO ,1 SUB #13 <- #162
|
1932
|
+
PLEASE READ OUT ,1
|
1933
|
+
PLEASE GIVE UP</syntaxhighlight>
|
1934
|
+
|
1935
|
+
|
1936
|
+
=={{header|Integer BASIC}}==
|
1937
|
+
NOTE: Integer BASIC was written (and hand-assembled by Woz himself) for the Apple 1 and original Apple 2. The Apple 1 has NO support for lower-case letters, and it was an expensive (and later) option on the Apple 2. This example accurately represents the only reasonable solution for those target devices, and therefore cannot be "fixed", only deleted.
|
1938
|
+
|
1939
|
+
<syntaxhighlight lang="integer basic"> 10 PRINT "Hello world!"
|
1940
|
+
20 END</syntaxhighlight>
|
1941
|
+
|
1942
|
+
=={{header|Io}}==
|
1943
|
+
<syntaxhighlight lang="io">"Hello world!" println</syntaxhighlight>
|
1944
|
+
|
1945
|
+
=={{header|Ioke}}==
|
1946
|
+
<syntaxhighlight lang="ioke">"Hello world!" println</syntaxhighlight>
|
1947
|
+
|
1948
|
+
=={{header|IS-BASIC}}==
|
1949
|
+
<syntaxhighlight lang="is-basic">PRINT "Hello world!"</syntaxhighlight>
|
1950
|
+
|
1951
|
+
=={{header|Isabelle}}==
|
1952
|
+
<syntaxhighlight lang="isabelle">theory Scratch
|
1953
|
+
imports Main
|
1954
|
+
begin
|
1955
|
+
value ‹''Hello world!''›
|
1956
|
+
end</syntaxhighlight>
|
1957
|
+
|
1958
|
+
=={{header|IWBASIC}}==
|
1959
|
+
<syntaxhighlight lang="iwbasic">
|
1960
|
+
OPENCONSOLE
|
1961
|
+
|
1962
|
+
PRINT"Hello world!"
|
1963
|
+
|
1964
|
+
'This line could be left out.
|
1965
|
+
PRINT:PRINT:PRINT"Press any key to end."
|
1966
|
+
|
1967
|
+
'Keep the console from closing right away so the text can be read.
|
1968
|
+
DO:UNTIL INKEY$<>""
|
1969
|
+
|
1970
|
+
CLOSECONSOLE
|
1971
|
+
|
1972
|
+
END
|
1973
|
+
</syntaxhighlight>
|
1974
|
+
|
1975
|
+
=={{header|J}}==
|
1976
|
+
<syntaxhighlight lang="j"> 'Hello world!'
|
1977
|
+
Hello world!</syntaxhighlight>
|
1978
|
+
|
1979
|
+
Here are some redundant alternatives:
|
1980
|
+
<syntaxhighlight lang="j"> [data=. 'Hello world!'
|
1981
|
+
Hello world!
|
1982
|
+
data
|
1983
|
+
Hello world!
|
1984
|
+
smoutput data
|
1985
|
+
Hello world!
|
1986
|
+
|
1987
|
+
NB. unassigned names are verbs of infinite rank awaiting definition.
|
1988
|
+
NB. j pretty prints the train.
|
1989
|
+
Hello World!
|
1990
|
+
Hello World !
|
1991
|
+
|
1992
|
+
|
1993
|
+
NB. j is glorious, and you should know this!
|
1994
|
+
|
1995
|
+
i. 2 3 NB. an array of integers
|
1996
|
+
0 1 2
|
1997
|
+
3 4 5
|
1998
|
+
|
1999
|
+
verb_with_infinite_rank =: 'Hello world!'"_
|
2000
|
+
|
2001
|
+
verb_with_infinite_rank i. 2 3
|
2002
|
+
Hello world!
|
2003
|
+
|
2004
|
+
|
2005
|
+
verb_with_atomic_rank =: 'Hello world!'"0
|
2006
|
+
|
2007
|
+
verb_with_atomic_rank i. 2 3
|
2008
|
+
Hello world!
|
2009
|
+
Hello world!
|
2010
|
+
Hello world!
|
2011
|
+
|
2012
|
+
Hello world!
|
2013
|
+
Hello world!
|
2014
|
+
Hello world!
|
2015
|
+
</syntaxhighlight>
|
2016
|
+
|
2017
|
+
=={{header|Jack}}==
|
2018
|
+
<syntaxhighlight lang="jack">class Main {
|
2019
|
+
function void main () {
|
2020
|
+
do Output.printString("Hello world!");
|
2021
|
+
do Output.println();
|
2022
|
+
return;
|
2023
|
+
}
|
2024
|
+
}</syntaxhighlight>
|
2025
|
+
|
2026
|
+
=={{header|Jacquard Loom}}==
|
2027
|
+
This weaves the string "Hello world!"
|
2028
|
+
<syntaxhighlight lang="jacquard">+---------------+
|
2029
|
+
| |
|
2030
|
+
| * * |
|
2031
|
+
|* * * * |
|
2032
|
+
|* * *|
|
2033
|
+
|* * *|
|
2034
|
+
|* * * |
|
2035
|
+
| * * * |
|
2036
|
+
| * |
|
2037
|
+
+---------------+
|
2038
|
+
|
2039
|
+
+---------------+
|
2040
|
+
| |
|
2041
|
+
|* * * |
|
2042
|
+
|* * * |
|
2043
|
+
| * *|
|
2044
|
+
| * *|
|
2045
|
+
|* * * |
|
2046
|
+
|* * * * |
|
2047
|
+
| * |
|
2048
|
+
+---------------+
|
2049
|
+
|
2050
|
+
+---------------+
|
2051
|
+
| |
|
2052
|
+
|* ** * * |
|
2053
|
+
|******* *** * |
|
2054
|
+
| **** * * ***|
|
2055
|
+
| **** * ******|
|
2056
|
+
| ****** ** * |
|
2057
|
+
| * * * * |
|
2058
|
+
| * |
|
2059
|
+
+---------------+
|
2060
|
+
|
2061
|
+
+---------------+
|
2062
|
+
| |
|
2063
|
+
|******* *** * |
|
2064
|
+
|******* *** * |
|
2065
|
+
| ** *|
|
2066
|
+
|* * * *|
|
2067
|
+
|******* ** * |
|
2068
|
+
|******* *** * |
|
2069
|
+
| * |
|
2070
|
+
+---------------+
|
2071
|
+
|
2072
|
+
+---------------+
|
2073
|
+
| |
|
2074
|
+
|******* *** * |
|
2075
|
+
|******* *** * |
|
2076
|
+
| * * * *|
|
2077
|
+
| * * * *|
|
2078
|
+
|******* ** * |
|
2079
|
+
|******* ** * |
|
2080
|
+
| * |
|
2081
|
+
+---------------+
|
2082
|
+
|
2083
|
+
+---------------+
|
2084
|
+
| |
|
2085
|
+
|***** * *** * |
|
2086
|
+
|******* *** * |
|
2087
|
+
| * * * * |
|
2088
|
+
| * * * |
|
2089
|
+
|****** ** * |
|
2090
|
+
|****** ** * |
|
2091
|
+
| * |
|
2092
|
+
+---------------+
|
2093
|
+
|
2094
|
+
+---------------+
|
2095
|
+
| |
|
2096
|
+
| * * * |
|
2097
|
+
|***** * ***** |
|
2098
|
+
|***** ** * ***|
|
2099
|
+
|***** ** * ***|
|
2100
|
+
|******* * ** |
|
2101
|
+
| * * * * |
|
2102
|
+
| * |
|
2103
|
+
+---------------+
|
2104
|
+
|
2105
|
+
+---------------+
|
2106
|
+
| |
|
2107
|
+
| |
|
2108
|
+
| * * |
|
2109
|
+
| * * |
|
2110
|
+
| * |
|
2111
|
+
| * |
|
2112
|
+
| |
|
2113
|
+
| |
|
2114
|
+
+---------------+</syntaxhighlight>
|
2115
|
+
|
2116
|
+
=={{header|Java}}==
|
2117
|
+
<syntaxhighlight lang="java">public class HelloWorld
|
2118
|
+
{
|
2119
|
+
public static void main(String[] args)
|
2120
|
+
{
|
2121
|
+
System.out.println("Hello world!");
|
2122
|
+
}
|
2123
|
+
}</syntaxhighlight>
|
2124
|
+
|
2125
|
+
=={{header|JavaScript}}==
|
2126
|
+
<syntaxhighlight lang="javascript">document.write("Hello world!");</syntaxhighlight>
|
2127
|
+
|
2128
|
+
{{works with|NJS|0.2.5}}
|
2129
|
+
{{works with|Rhino}}
|
2130
|
+
{{works with|SpiderMonkey}}
|
2131
|
+
<syntaxhighlight lang="javascript">print('Hello world!');</syntaxhighlight>
|
2132
|
+
|
2133
|
+
{{works with|JScript}}
|
2134
|
+
<syntaxhighlight lang="javascript">WScript.Echo("Hello world!");</syntaxhighlight>
|
2135
|
+
|
2136
|
+
{{works with|Node.js}}
|
2137
|
+
<syntaxhighlight lang="javascript">console.log("Hello world!")</syntaxhighlight>
|
2138
|
+
|
2139
|
+
=={{header|JCL}}==
|
2140
|
+
<syntaxhighlight lang="jcl">/*MESSAGE Hello world!</syntaxhighlight>
|
2141
|
+
|
2142
|
+
=={{header|Jinja}}==
|
2143
|
+
<syntaxhighlight lang="jinja">
|
2144
|
+
from jinja2 import Template
|
2145
|
+
print(Template("Hello World!").render())
|
2146
|
+
</syntaxhighlight>
|
2147
|
+
A bit more convoluted, really using a template:
|
2148
|
+
<syntaxhighlight lang="jinja">
|
2149
|
+
from jinja2 import Template
|
2150
|
+
print(Template("Hello {{ something }}!").render(something="World"))
|
2151
|
+
</syntaxhighlight>
|
2152
|
+
|
2153
|
+
=={{header|Joy}}==
|
2154
|
+
<syntaxhighlight lang="joy">"Hello world!" putchars.</syntaxhighlight>
|
2155
|
+
|
2156
|
+
=={{header|jq}}==
|
2157
|
+
<syntaxhighlight lang="jq">"Hello world!"</syntaxhighlight>
|
2158
|
+
|
2159
|
+
=={{header|JSE}}==
|
2160
|
+
<syntaxhighlight lang="jse">Print "Hello world!"</syntaxhighlight>
|
2161
|
+
|
2162
|
+
=={{header|Jsish}}==
|
2163
|
+
<syntaxhighlight lang="javascript">puts("Hello world!")</syntaxhighlight>
|
2164
|
+
|
2165
|
+
=={{header|Julia}}==
|
2166
|
+
<syntaxhighlight lang="julia">println("Hello world!")</syntaxhighlight>
|
2167
|
+
|
2168
|
+
=={{header|K}}==
|
2169
|
+
<syntaxhighlight lang="k">
|
2170
|
+
"Hello world!"
|
2171
|
+
</syntaxhighlight>
|
2172
|
+
Some of the other ways this task can be attached are:
|
2173
|
+
<syntaxhighlight lang="k">
|
2174
|
+
`0: "Hello world!\n"
|
2175
|
+
</syntaxhighlight>
|
2176
|
+
<syntaxhighlight lang="k">
|
2177
|
+
s: "Hello world!"
|
2178
|
+
s
|
2179
|
+
</syntaxhighlight>
|
2180
|
+
<syntaxhighlight lang="k">
|
2181
|
+
\echo "Hello world!"
|
2182
|
+
</syntaxhighlight>
|
2183
|
+
|
2184
|
+
=={{header|Kabap}}==
|
2185
|
+
<syntaxhighlight lang="kabap">return = "Hello world!";</syntaxhighlight>
|
2186
|
+
|
2187
|
+
=={{header|Kaya}}==
|
2188
|
+
<syntaxhighlight lang="kaya">program hello;
|
2189
|
+
|
2190
|
+
Void main() {
|
2191
|
+
// My first program!
|
2192
|
+
putStrLn("Hello world!");
|
2193
|
+
}</syntaxhighlight>
|
2194
|
+
|
2195
|
+
=={{header|Kdf9 Usercode}}==
|
2196
|
+
{{incorrect|Kdf9|output isn't consistent with the task's requirements: wording, punctuation.}}
|
2197
|
+
<syntaxhighlight lang="joy">
|
2198
|
+
|
2199
|
+
V2; W0;
|
2200
|
+
RESTART; J999; J999;
|
2201
|
+
PROGRAM; (main program);
|
2202
|
+
V0 = Q0/AV1/AV2;
|
2203
|
+
V1 = B0750064554545700; ("Hello" in Flexowriter code);
|
2204
|
+
V2 = B0767065762544477; ("World" in Flexowriter code);
|
2205
|
+
V0; =Q9; POAQ9; (write "Hello World" to Flexowriter);
|
2206
|
+
999; OUT;
|
2207
|
+
FINISH;
|
2208
|
+
</syntaxhighlight>
|
2209
|
+
|
2210
|
+
=={{header|Keg}}==
|
2211
|
+
<syntaxhighlight lang="keg">Hello world\!</syntaxhighlight>
|
2212
|
+
|
2213
|
+
=={{header|Kite}}==
|
2214
|
+
simply a single line
|
2215
|
+
<syntaxhighlight lang="kite">"#!/usr/local/bin/kite
|
2216
|
+
|
2217
|
+
"Hello world!"|print;</syntaxhighlight>
|
2218
|
+
|
2219
|
+
=={{header|Kitten}}==
|
2220
|
+
|
2221
|
+
<syntaxhighlight lang="kitten">"Hello world!" say</syntaxhighlight>
|
2222
|
+
|
2223
|
+
=={{header|Koka}}==
|
2224
|
+
<syntaxhighlight lang="koka">fun main() {
|
2225
|
+
println("Hello world!")
|
2226
|
+
}</syntaxhighlight>
|
2227
|
+
|
2228
|
+
=={{header|KonsolScript}}==
|
2229
|
+
Displays it in a text file or console/terminal.
|
2230
|
+
<syntaxhighlight lang="konsolscript">function main() {
|
2231
|
+
Konsol:Log("Hello world!")
|
2232
|
+
}</syntaxhighlight>
|
2233
|
+
|
2234
|
+
=={{header|Kotlin}}==
|
2235
|
+
<syntaxhighlight lang="kotlin">fun main() {
|
2236
|
+
println("Hello world!")
|
2237
|
+
}</syntaxhighlight>
|
2238
|
+
|
2239
|
+
=={{header|KQL}}==
|
2240
|
+
|
2241
|
+
<syntaxhighlight lang="kql">print 'Hello world!'</syntaxhighlight>
|
2242
|
+
|
2243
|
+
=={{header|KSI}}==
|
2244
|
+
|
2245
|
+
<syntaxhighlight lang="ksi">
|
2246
|
+
`plain
|
2247
|
+
'Hello world!' #echo #
|
2248
|
+
</syntaxhighlight>
|
2249
|
+
|
2250
|
+
=={{header|Lambdatalk}}==
|
2251
|
+
<syntaxhighlight lang="scheme">
|
2252
|
+
Hello world!
|
2253
|
+
{h1 Hello world!}
|
2254
|
+
_h1 Hello world!\n
|
2255
|
+
</syntaxhighlight>
|
2256
|
+
|
2257
|
+
=={{header|Lang5}}==
|
2258
|
+
<syntaxhighlight lang="lang5">"Hello world!\n" .</syntaxhighlight>
|
2259
|
+
|
2260
|
+
=={{header|langur}}==
|
2261
|
+
<syntaxhighlight lang="langur">writeln "yo, peeps"</syntaxhighlight>
|
2262
|
+
|
2263
|
+
=={{header|Lasso}}==
|
2264
|
+
A plain string is output automatically.
|
2265
|
+
<syntaxhighlight lang="lasso">'Hello world!'</syntaxhighlight>
|
2266
|
+
|
2267
|
+
=={{header|LaTeX}}==
|
2268
|
+
<syntaxhighlight lang="latex">\documentclass{minimal}
|
2269
|
+
\begin{document}
|
2270
|
+
Hello World!
|
2271
|
+
\end{document}</syntaxhighlight>
|
2272
|
+
|
2273
|
+
=={{header|Latitude}}==
|
2274
|
+
<syntaxhighlight lang="latitude">putln "Hello world!".</syntaxhighlight>
|
2275
|
+
|
2276
|
+
=={{header|LC3 Assembly}}==
|
2277
|
+
|
2278
|
+
<syntaxhighlight lang="lc3asm">.orig x3000
|
2279
|
+
LEA R0, hello ; R0 = &hello
|
2280
|
+
TRAP x22 ; PUTS (print char array at addr in R0)
|
2281
|
+
HALT
|
2282
|
+
hello .stringz "Hello World!"
|
2283
|
+
.end</syntaxhighlight>
|
2284
|
+
Or (without PUTS)
|
2285
|
+
<syntaxhighlight lang="lc3asm">.orig x3000
|
2286
|
+
LEA R1, hello ; R1 = &hello
|
2287
|
+
TOP LDR R0, R1, #0 ; R0 = R1[0]
|
2288
|
+
BRz END ; if R0 is string terminator (x0000) go to END
|
2289
|
+
TRAP x21 ; else OUT (write char in R0)
|
2290
|
+
ADD R1, R1, #1 ; increment R1
|
2291
|
+
BR TOP ; go to TOP
|
2292
|
+
END HALT
|
2293
|
+
hello .stringz "Hello World!"
|
2294
|
+
.end</syntaxhighlight>
|
2295
|
+
|
2296
|
+
=={{header|LDPL}}==
|
2297
|
+
<syntaxhighlight lang="ldpl">
|
2298
|
+
procedure:
|
2299
|
+
display "Hello World!" crlf
|
2300
|
+
</syntaxhighlight>
|
2301
|
+
|
2302
|
+
=={{header|Lean}}==
|
2303
|
+
<syntaxhighlight lang="lean">
|
2304
|
+
#eval "Hello world!"
|
2305
|
+
</syntaxhighlight>
|
2306
|
+
|
2307
|
+
=={{header|LFE}}==
|
2308
|
+
<syntaxhighlight lang="lisp">
|
2309
|
+
(: io format '"Hello world!~n")
|
2310
|
+
</syntaxhighlight>
|
2311
|
+
|
2312
|
+
=={{header|Liberty BASIC}}==
|
2313
|
+
<syntaxhighlight lang="lb">print "Hello world!"</syntaxhighlight>
|
2314
|
+
|
2315
|
+
=={{header|LIL}}==
|
2316
|
+
<syntaxhighlight lang="tcl">#
|
2317
|
+
# Hello world in lil
|
2318
|
+
#
|
2319
|
+
|
2320
|
+
print "Hello, world!"</syntaxhighlight>
|
2321
|
+
|
2322
|
+
=={{header|Lily}}==
|
2323
|
+
There are two ways to do this. First, with the builtin print:
|
2324
|
+
|
2325
|
+
<syntaxhighlight lang="lily">print("Hello world!")</syntaxhighlight>
|
2326
|
+
|
2327
|
+
Second, by using stdout directly:
|
2328
|
+
|
2329
|
+
<syntaxhighlight lang="lily">stdout.print("Hello world!\n")</syntaxhighlight>
|
2330
|
+
|
2331
|
+
=={{header|Lilypond}}==
|
2332
|
+
<syntaxhighlight lang="lilypond">\version "2.18.2"
|
2333
|
+
global = {
|
2334
|
+
\time 4/4
|
2335
|
+
\key c \major
|
2336
|
+
\tempo 4=100
|
2337
|
+
}
|
2338
|
+
\relative c''{ g e e( g2)
|
2339
|
+
}
|
2340
|
+
\addlyrics {
|
2341
|
+
Hel -- lo, World!
|
2342
|
+
}</syntaxhighlight>
|
2343
|
+
|
2344
|
+
=={{header|Limbo}}==
|
2345
|
+
<syntaxhighlight lang="limbo">implement Command;
|
2346
|
+
|
2347
|
+
include "sys.m";
|
2348
|
+
sys: Sys;
|
2349
|
+
|
2350
|
+
include "draw.m";
|
2351
|
+
|
2352
|
+
include "sh.m";
|
2353
|
+
|
2354
|
+
init(nil: ref Draw->Context, nil: list of string)
|
2355
|
+
{
|
2356
|
+
sys = load Sys Sys->PATH;
|
2357
|
+
sys->print("Hello world!\n");
|
2358
|
+
}</syntaxhighlight>
|
2359
|
+
|
2360
|
+
=={{header|Lingo}}==
|
2361
|
+
<syntaxhighlight lang="lingo">put "Hello world!"</syntaxhighlight>
|
2362
|
+
|
2363
|
+
or:
|
2364
|
+
|
2365
|
+
<syntaxhighlight lang="lingo">trace("Hello world!")</syntaxhighlight>
|
2366
|
+
|
2367
|
+
=={{header|Lisaac}}==
|
2368
|
+
{{works with|Lisaac|0.13.1}}
|
2369
|
+
You can print to standard output in Lisaac by calling STRING.print or INTEGER.print:
|
2370
|
+
|
2371
|
+
<syntaxhighlight lang="lisaac">Section Header // The Header section is required.
|
2372
|
+
+ name := GOODBYE; // Define the name of this object.
|
2373
|
+
|
2374
|
+
Section Public
|
2375
|
+
- main <- ("Hello world!\n".print;);</syntaxhighlight>
|
2376
|
+
|
2377
|
+
However, it may be more straightforward to use IO.print_string instead:
|
2378
|
+
|
2379
|
+
<syntaxhighlight lang="lisaac">Section Header // The Header section is required.
|
2380
|
+
+ name := GOODBYE2; // Define the name of this object.
|
2381
|
+
|
2382
|
+
Section Public
|
2383
|
+
- main <- (IO.put_string "Hello world!\n";);</syntaxhighlight>
|
2384
|
+
|
2385
|
+
=={{header|Little}}==
|
2386
|
+
Output to terminal:
|
2387
|
+
<syntaxhighlight lang="c">puts("Hello world!");</syntaxhighlight>
|
2388
|
+
|
2389
|
+
Without the newline terminator:
|
2390
|
+
|
2391
|
+
<syntaxhighlight lang="c">puts(nonewline: "Hello world!");</syntaxhighlight>
|
2392
|
+
|
2393
|
+
Output to arbitrary open, writable file, for example the standard error channel:
|
2394
|
+
<syntaxhighlight lang="c">puts(stderr, "Hello world!");</syntaxhighlight>
|
2395
|
+
|
2396
|
+
=={{header|LiveCode}}==
|
2397
|
+
Examples using the full LiveCode IDE.
|
2398
|
+
|
2399
|
+
Text input and output done in the Message palette/window:
|
2400
|
+
<syntaxhighlight lang="livecode">put "Hello World!"</syntaxhighlight>
|
2401
|
+
|
2402
|
+
Present a dialog box to the user
|
2403
|
+
<syntaxhighlight lang="livecode">Answer "Hello World!"</syntaxhighlight>
|
2404
|
+
|
2405
|
+
Example using command-line livecode-server in shell script
|
2406
|
+
<syntaxhighlight lang="livecode">#! /usr/local/bin/livecode-server
|
2407
|
+
set the outputLineEndings to "lf"
|
2408
|
+
put "Hello world!" & return</syntaxhighlight>
|
2409
|
+
|
2410
|
+
Livecode also supports stdout as a device to write to
|
2411
|
+
<syntaxhighlight lang="livecode">write "Hello world!" & return to stdout</syntaxhighlight>
|
2412
|
+
|
2413
|
+
=={{header|LLVM}}==
|
2414
|
+
|
2415
|
+
<syntaxhighlight lang="llvm">
|
2416
|
+
; const char str[14] = "Hello World!\00"
|
2417
|
+
@.str = private unnamed_addr constant [14 x i8] c"Hello, world!\00"
|
2418
|
+
|
2419
|
+
; declare extern `puts` method
|
2420
|
+
declare i32 @puts(i8*) nounwind
|
2421
|
+
|
2422
|
+
define i32 @main()
|
2423
|
+
{
|
2424
|
+
call i32 @puts( i8* getelementptr ([14 x i8]* @str, i32 0,i32 0))
|
2425
|
+
ret i32 0
|
2426
|
+
}</syntaxhighlight>
|
2427
|
+
|
2428
|
+
=={{header|Lobster}}==
|
2429
|
+
<syntaxhighlight lang="lobster">print "Hello world!"</syntaxhighlight>
|
2430
|
+
|
2431
|
+
=={{header|Logo}}==
|
2432
|
+
Print includes a line feed:
|
2433
|
+
<syntaxhighlight lang="logo">print [Hello world!]</syntaxhighlight>
|
2434
|
+
Type does not:
|
2435
|
+
<syntaxhighlight lang="logo">type [Hello world!]</syntaxhighlight>
|
2436
|
+
|
2437
|
+
=={{header|Logtalk}}==
|
2438
|
+
<syntaxhighlight lang="logtalk">:- object(hello_world).
|
2439
|
+
|
2440
|
+
% the initialization/1 directive argument is automatically executed
|
2441
|
+
% when the object is loaded into memory:
|
2442
|
+
:- initialization(write('Hello world!\n')).
|
2443
|
+
|
2444
|
+
:- end_object.</syntaxhighlight>
|
2445
|
+
|
2446
|
+
=={{header|LOLCODE}}==
|
2447
|
+
<syntaxhighlight lang="lolcode">
|
2448
|
+
HAI
|
2449
|
+
CAN HAS STDIO?
|
2450
|
+
VISIBLE "Hello world!"
|
2451
|
+
KTHXBYE
|
2452
|
+
</syntaxhighlight>
|
2453
|
+
|
2454
|
+
=={{header|LotusScript}}==
|
2455
|
+
<syntaxhighlight lang="lotusscript">:- object(hello_world).
|
2456
|
+
'This will send the output to the status bar at the bottom of the Notes client screen
|
2457
|
+
print "Hello world!"
|
2458
|
+
|
2459
|
+
:- end_object.</syntaxhighlight>
|
2460
|
+
|
2461
|
+
=={{header|LSE}}==
|
2462
|
+
<syntaxhighlight lang="lse">AFFICHER [U, /] 'Hello world!'</syntaxhighlight>
|
2463
|
+
|
2464
|
+
=={{header|LSE64}}==
|
2465
|
+
<syntaxhighlight lang="lse64">"Hello world!" ,t nl</syntaxhighlight>
|
2466
|
+
|
2467
|
+
=={{header|Lua}}==
|
2468
|
+
Function calls with either a string literal or a table constructor passed as their only argument do not require parentheses.
|
2469
|
+
<syntaxhighlight lang="lua">print "Hello world!"</syntaxhighlight>
|
2470
|
+
|
2471
|
+
Harder way with a table:
|
2472
|
+
<syntaxhighlight lang="lua">
|
2473
|
+
local chars = {"G","o","o","d","b","y","e",","," ","W","o","r","l","d","!"}
|
2474
|
+
for i = 1, #chars do
|
2475
|
+
io.write(chars[i])
|
2476
|
+
end
|
2477
|
+
-- or:
|
2478
|
+
print(table.concat(chars))
|
2479
|
+
</syntaxhighlight>
|
2480
|
+
|
2481
|
+
=={{header|Luna}}==
|
2482
|
+
<syntaxhighlight lang="luna">def main:
|
2483
|
+
hello = "Hello, World!"
|
2484
|
+
print hello</syntaxhighlight>
|
2485
|
+
|
2486
|
+
=={{header|M2000 Interpreter}}==
|
2487
|
+
<syntaxhighlight lang="m2000 interpreter">
|
2488
|
+
Print "Hello World!" \\ printing on columns, in various ways defined by last $() for specific layer
|
2489
|
+
Print $(4),"Hello World!" \\ proportional printing using columns, expanded to a number of columns as the length of string indicates.
|
2490
|
+
Report "Hello World!" \\ proportional printing with word wrap, for text, can apply justification and rendering a range of text lines
|
2491
|
+
</syntaxhighlight>
|
2492
|
+
|
2493
|
+
=={{header|M4}}==
|
2494
|
+
For the particular nature of m4, this is simply:
|
2495
|
+
<syntaxhighlight lang="m4">`Hello world!'</syntaxhighlight>
|
2496
|
+
|
2497
|
+
=={{header|MACRO-10}}==
|
2498
|
+
<syntaxhighlight lang="macro-10">
|
2499
|
+
|
2500
|
+
TITLE HELLO
|
2501
|
+
|
2502
|
+
COMMENT !
|
2503
|
+
Hello-World program, PDP-10 assembly language, written by kjx, 2022.
|
2504
|
+
Assembler: MACRO-10 Operating system: TOPS-20
|
2505
|
+
!
|
2506
|
+
|
2507
|
+
SEARCH MONSYM ;Get symbolic names for system-calls.
|
2508
|
+
|
2509
|
+
GO:: RESET% ;System call: Initialize process.
|
2510
|
+
|
2511
|
+
HRROI 1,[ASCIZ /Hello World!/] ;Put pointer to string into register 1.
|
2512
|
+
PSOUT% ;System call: Print string.
|
2513
|
+
HALTF% ;System call: Halt program.
|
2514
|
+
|
2515
|
+
JRST GO ;Unconditional jump to GO (in case the
|
2516
|
+
;user uses the CONTINUE-command while this
|
2517
|
+
;program is still loaded).
|
2518
|
+
|
2519
|
+
END GO
|
2520
|
+
|
2521
|
+
</syntaxhighlight>
|
2522
|
+
|
2523
|
+
=={{header|MACRO-11}}==
|
2524
|
+
<syntaxhighlight lang="macro-11">
|
2525
|
+
;
|
2526
|
+
; TEXT BASED HELLO WORLD
|
2527
|
+
; WRITTEN BY: BILL GUNSHANNON
|
2528
|
+
;
|
2529
|
+
|
2530
|
+
.MCALL .PRINT .EXIT
|
2531
|
+
.RADIX 10
|
2532
|
+
|
2533
|
+
|
2534
|
+
|
2535
|
+
MESG1: .ASCII " "
|
2536
|
+
.ASCII " HELLO WORLD "
|
2537
|
+
.EVEN
|
2538
|
+
|
2539
|
+
START:
|
2540
|
+
.PRINT #MESG1
|
2541
|
+
|
2542
|
+
DONE:
|
2543
|
+
|
2544
|
+
; CLEAN UP AND GO BACK TO KMON
|
2545
|
+
|
2546
|
+
.EXIT
|
2547
|
+
|
2548
|
+
|
2549
|
+
.END START
|
2550
|
+
</syntaxhighlight>
|
2551
|
+
|
2552
|
+
|
2553
|
+
=={{header|Maclisp}}==
|
2554
|
+
<syntaxhighlight lang="lisp">(format t "Hello world!~%")</syntaxhighlight>
|
2555
|
+
Or
|
2556
|
+
<syntaxhighlight lang="lisp">(print "Hello world!")</syntaxhighlight>
|
2557
|
+
|
2558
|
+
=={{header|MAD}}==
|
2559
|
+
|
2560
|
+
<syntaxhighlight lang="mad"> VECTOR VALUES HELLO = $11HHELLO WORLD*$
|
2561
|
+
PRINT FORMAT HELLO
|
2562
|
+
END OF PROGRAM</syntaxhighlight>
|
2563
|
+
|
2564
|
+
=={{header|make}}==
|
2565
|
+
Makefile contents:
|
2566
|
+
<syntaxhighlight lang="make">
|
2567
|
+
all:
|
2568
|
+
$(info Hello world!)
|
2569
|
+
</syntaxhighlight>
|
2570
|
+
Running make produces:
|
2571
|
+
|
2572
|
+
Hello world!<br>
|
2573
|
+
make: Nothing to be done for `all'.
|
2574
|
+
|
2575
|
+
=={{header|Malbolge}}==
|
2576
|
+
|
2577
|
+
'''Long version:'''
|
2578
|
+
<syntaxhighlight lang="malbolge">('&%:9]!~}|z2Vxwv-,POqponl$Hjig%eB@@>}=<M:9wv6WsU2T|nm-,jcL(I&%$#"
|
2579
|
+
`CB]V?Tx<uVtT`Rpo3NlF.Jh++FdbCBA@?]!~|4XzyTT43Qsqq(Lnmkj"Fhg${z@></syntaxhighlight>
|
2580
|
+
|
2581
|
+
'''Short version:'''
|
2582
|
+
<syntaxhighlight lang="malbolge">(=<`#9]~6ZY32Vx/4Rs+0No-&Jk)"Fh}|Bcy?`=*z]Kw%oG4UUS0/@-ejc(:'8dc</syntaxhighlight>
|
2583
|
+
|
2584
|
+
{{Out}}
|
2585
|
+
<pre>HELLO WORLD!
|
2586
|
+
</pre>
|
2587
|
+
|
2588
|
+
=={{header|MANOOL}}==
|
2589
|
+
In &ldquo;applicative&rdquo; notation:
|
2590
|
+
<syntaxhighlight lang="manool">{{extern "manool.org.18/std/0.3/all"} in WriteLine[Out; "Hello world!"]}</syntaxhighlight>
|
2591
|
+
OOPish notation (equivalent to the above, up to Abstract Syntax Tree):
|
2592
|
+
<syntaxhighlight lang="manool">{{extern "manool.org.18/std/0.3/all"} in Out.WriteLine["Hello world!"]}</syntaxhighlight>
|
2593
|
+
LISPish notation (ditto):
|
2594
|
+
<syntaxhighlight lang="manool">{{extern "manool.org.18/std/0.3/all"} in {WriteLine Out "Hello world!"}}</syntaxhighlight>
|
2595
|
+
Using a colon punctuator (ditto):
|
2596
|
+
<syntaxhighlight lang="manool">{{extern "manool.org.18/std/0.3/all"} in: WriteLine Out "Hello world!"}</syntaxhighlight>
|
2597
|
+
Note that all semicolons, wherever allowed, are optional. The above example with all possible semicolons:
|
2598
|
+
<syntaxhighlight lang="manool">{{extern; "manool.org.18/std/0.3/all"} in: WriteLine; Out; "Hello world!"}</syntaxhighlight>
|
2599
|
+
|
2600
|
+
=={{header|Maple}}==
|
2601
|
+
<syntaxhighlight lang="maple">
|
2602
|
+
> printf( "Hello world!\n" ): # print without quotes
|
2603
|
+
Hello world!
|
2604
|
+
</syntaxhighlight>
|
2605
|
+
|
2606
|
+
=={{header|Mathcad}}==
|
2607
|
+
Simply type the following directly onto a Mathcad worksheet (''A worksheet is Mathcad's combined source code file & console'').
|
2608
|
+
<syntaxhighlight lang="ayrch">"Hello, World!"</syntaxhighlight>
|
2609
|
+
Applies to Mathcad Prime, Mathcad Prime Express and Mathcad 15 (''and earlier'')
|
2610
|
+
|
2611
|
+
=={{header|Mathematica}} / {{header|Wolfram Language}}==
|
2612
|
+
<syntaxhighlight lang="mathematica">Print["Hello world!"]</syntaxhighlight>
|
2613
|
+
|
2614
|
+
=={{header|MATLAB}}==
|
2615
|
+
<syntaxhighlight lang="matlab">>> disp('Hello world!')</syntaxhighlight>
|
2616
|
+
|
2617
|
+
|
2618
|
+
=={{header|Maude}}==
|
2619
|
+
<syntaxhighlight lang="maude">
|
2620
|
+
fmod BYE-WORLD is
|
2621
|
+
|
2622
|
+
protecting STRING .
|
2623
|
+
|
2624
|
+
op sayBye : -> String .
|
2625
|
+
|
2626
|
+
eq sayBye = "Hello world!" .
|
2627
|
+
|
2628
|
+
endfm
|
2629
|
+
|
2630
|
+
red sayBye .
|
2631
|
+
</syntaxhighlight>
|
2632
|
+
|
2633
|
+
=={{header|Maxima}}==
|
2634
|
+
<syntaxhighlight lang="maxima">print("Hello world!");</syntaxhighlight>
|
2635
|
+
|
2636
|
+
=={{header|MAXScript}}==
|
2637
|
+
<syntaxhighlight lang="maxscript">print "Hello world!"</syntaxhighlight>
|
2638
|
+
or:
|
2639
|
+
<syntaxhighlight lang="maxscript">format "%" "Hello world!"</syntaxhighlight>
|
2640
|
+
|
2641
|
+
=={{header|MDL}}==
|
2642
|
+
<syntaxhighlight lang="mdl"><PRINC "Hello world!">
|
2643
|
+
<CRLF></syntaxhighlight>
|
2644
|
+
|
2645
|
+
=={{header|MEL}}==
|
2646
|
+
<syntaxhighlight lang="mel">proc helloWorld () {
|
2647
|
+
print "Hello, world!\n";
|
2648
|
+
} </syntaxhighlight>
|
2649
|
+
|
2650
|
+
=={{header|MelonBasic}}==
|
2651
|
+
<syntaxhighlight lang="melonbasic">Say:Hello world!
|
2652
|
+
|
2653
|
+
helloWorld; </syntaxhighlight>
|
2654
|
+
|
2655
|
+
=={{header|Mercury}}==
|
2656
|
+
<syntaxhighlight lang="mecury">:- module hello.
|
2657
|
+
:- interface.
|
2658
|
+
:- import_module io.
|
2659
|
+
:- pred main(io::di, io::uo) is det.
|
2660
|
+
|
2661
|
+
:- implementation.
|
2662
|
+
main(!IO) :-
|
2663
|
+
io.write_string("Hello world!\n", !IO).</syntaxhighlight>
|
2664
|
+
|
2665
|
+
=={{header|Metafont}}==
|
2666
|
+
<syntaxhighlight lang="metafont">message "Hello world!"; end</syntaxhighlight>
|
2667
|
+
|
2668
|
+
=={{header|min}}==
|
2669
|
+
<syntaxhighlight lang="min">"Hello world!" puts</syntaxhighlight>
|
2670
|
+
|
2671
|
+
=={{header|MiniScript}}==
|
2672
|
+
<syntaxhighlight lang="miniscript">print "Hello world!"</syntaxhighlight>
|
2673
|
+
|
2674
|
+
=={{header|MiniZinc}}==
|
2675
|
+
<syntaxhighlight lang="minizinc">
|
2676
|
+
output ["Hello World"];
|
2677
|
+
</syntaxhighlight>
|
2678
|
+
{{out}}
|
2679
|
+
<pre>
|
2680
|
+
Hello World
|
2681
|
+
----------
|
2682
|
+
</pre>
|
2683
|
+
|
2684
|
+
=={{header|MIPS Assembly}}==
|
2685
|
+
{{works with|MARS}} and {{works with|SPIM}}
|
2686
|
+
<syntaxhighlight lang="mips"> .data #section for declaring variables
|
2687
|
+
hello: .asciiz "Hello world!" #asciiz automatically adds the null terminator. If it's .ascii it doesn't have it.
|
2688
|
+
|
2689
|
+
.text # beginning of code
|
2690
|
+
main: # a label, which can be used with jump and branching instructions.
|
2691
|
+
la $a0, hello # load the address of hello into $a0
|
2692
|
+
li $v0, 4 # set the syscall to print the string at the address $a0
|
2693
|
+
syscall # make the system call
|
2694
|
+
|
2695
|
+
li $v0, 10 # set the syscall to exit
|
2696
|
+
syscall # make the system call</syntaxhighlight>
|
2697
|
+
|
2698
|
+
=={{header|mIRC Scripting Language}}==
|
2699
|
+
<syntaxhighlight lang="mirc">echo -ag Hello world!</syntaxhighlight>
|
2700
|
+
|
2701
|
+
=={{header|ML/I}}==
|
2702
|
+
<syntaxhighlight lang="ml/i">Hello world!</syntaxhighlight>
|
2703
|
+
|
2704
|
+
=={{header|Modula-2}}==
|
2705
|
+
<syntaxhighlight lang="modula2">MODULE Hello;
|
2706
|
+
IMPORT InOut;
|
2707
|
+
|
2708
|
+
BEGIN
|
2709
|
+
InOut.WriteString('Hello world!');
|
2710
|
+
InOut.WriteLn
|
2711
|
+
END Hello.</syntaxhighlight>
|
2712
|
+
==={{header|TopSpeed Modula-2}}===
|
2713
|
+
{{works with|TopSpeed (JPI) Modula-2 under DOSBox-X}}
|
2714
|
+
Modula-2 does not have built-in procedures for I/O. Instead, I/O is done via library modules. The names and contents of these modules vary between implementations of Modula-2. The solution below shows that the console I/O module supplied with TopSpeed Modula-2 has a different name and different procedures from the implementation in the previous solution.
|
2715
|
+
<syntaxhighlight lang="modula2">
|
2716
|
+
MODULE Hello;
|
2717
|
+
IMPORT IO;
|
2718
|
+
|
2719
|
+
BEGIN
|
2720
|
+
IO.WrStr('Hello world!'); IO.WrLn;
|
2721
|
+
|
2722
|
+
(* Another way, showing some features of Modula-2 *)
|
2723
|
+
IO.WrStr("Hello"); (* either single or double quotes can be used *)
|
2724
|
+
IO.WrChar(40C); (* character whose ASCII code is 40 octal *)
|
2725
|
+
IO.WrStr('world!');
|
2726
|
+
IO.WrLn(); (* procedure with no arguments: () is optional *)
|
2727
|
+
END Hello.
|
2728
|
+
</syntaxhighlight>
|
2729
|
+
|
2730
|
+
=={{header|Modula-3}}==
|
2731
|
+
<syntaxhighlight lang="modula3">MODULE Goodbye EXPORTS Main;
|
2732
|
+
|
2733
|
+
IMPORT IO;
|
2734
|
+
|
2735
|
+
BEGIN
|
2736
|
+
IO.Put("Hello world!\n");
|
2737
|
+
END Goodbye.</syntaxhighlight>
|
2738
|
+
|
2739
|
+
=={{header|MontiLang}}==
|
2740
|
+
<syntaxhighlight lang="montilang">|Hello, World!| PRINT .</syntaxhighlight>
|
2741
|
+
|
2742
|
+
=={{header|Morfa}}==
|
2743
|
+
<syntaxhighlight lang="morfa">
|
2744
|
+
import morfa.io.print;
|
2745
|
+
func main(): void
|
2746
|
+
{
|
2747
|
+
println("Hello world!");
|
2748
|
+
}
|
2749
|
+
</syntaxhighlight>
|
2750
|
+
|
2751
|
+
=={{header|Mosaic}}==
|
2752
|
+
<syntaxhighlight lang="mosaic">proc start =
|
2753
|
+
println "Hello, world"
|
2754
|
+
end</syntaxhighlight>
|
2755
|
+
|
2756
|
+
=={{header|MUF}}==
|
2757
|
+
<syntaxhighlight lang="muf">: main[ -- ]
|
2758
|
+
me @ "Hello world!" notify
|
2759
|
+
exit
|
2760
|
+
;</syntaxhighlight>
|
2761
|
+
|
2762
|
+
=={{header|MUMPS}}==
|
2763
|
+
<syntaxhighlight lang="mumps">Write "Hello world!",!</syntaxhighlight>
|
2764
|
+
|
2765
|
+
=={{header|MyDef}}==
|
2766
|
+
Run with: <pre>mydef_run hello.def</pre>
|
2767
|
+
Perl:
|
2768
|
+
<syntaxhighlight lang="mydef">$print Hello world</syntaxhighlight>
|
2769
|
+
|
2770
|
+
C:
|
2771
|
+
<syntaxhighlight lang="mydef">
|
2772
|
+
module: c
|
2773
|
+
$print Hello world
|
2774
|
+
</syntaxhighlight>
|
2775
|
+
|
2776
|
+
python:
|
2777
|
+
<syntaxhighlight lang="mydef">
|
2778
|
+
module: python
|
2779
|
+
$print Hello world
|
2780
|
+
</syntaxhighlight>
|
2781
|
+
|
2782
|
+
JavaScript
|
2783
|
+
<syntaxhighlight lang="mydef">
|
2784
|
+
module: js
|
2785
|
+
$print "Hello world"
|
2786
|
+
</syntaxhighlight>
|
2787
|
+
|
2788
|
+
go:
|
2789
|
+
<syntaxhighlight lang="mydef">
|
2790
|
+
module: go
|
2791
|
+
$print Hello world
|
2792
|
+
</syntaxhighlight>
|
2793
|
+
|
2794
|
+
=={{header|MyrtleScript}}==
|
2795
|
+
<syntaxhighlight lang="myrtlescript">script HelloWorld {
|
2796
|
+
func main returns: int {
|
2797
|
+
print("Hello World!")
|
2798
|
+
}
|
2799
|
+
}
|
2800
|
+
</syntaxhighlight>
|
2801
|
+
|
2802
|
+
=={{header|MySQL}}==
|
2803
|
+
|
2804
|
+
<syntaxhighlight lang="mysql">SELECT 'Hello world!';</syntaxhighlight>
|
2805
|
+
|
2806
|
+
=={{header|Mythryl}}==
|
2807
|
+
|
2808
|
+
<syntaxhighlight lang="mythryl">print "Hello world!";</syntaxhighlight>
|
2809
|
+
|
2810
|
+
=={{header|N/t/roff}}==
|
2811
|
+
|
2812
|
+
To get text output, compile the source file using NROFF and set output to the text terminal. If you compile using TROFF, you will get graphical output suitable for typesetting on a graphical typesetter/printer instead.
|
2813
|
+
|
2814
|
+
Because /.ROFF/ is a document formatting language, the majority of input is expected to be text to output onto a medium. Therefore, there are no routines to explicitly call to print text.
|
2815
|
+
|
2816
|
+
<syntaxhighlight lang="n/t/roff">Hello world!</syntaxhighlight>
|
2817
|
+
|
2818
|
+
=={{header|Nanoquery}}==
|
2819
|
+
<syntaxhighlight lang="nanoquery">println "Hello world!"</syntaxhighlight>
|
2820
|
+
|
2821
|
+
=={{header|Neat}}==
|
2822
|
+
|
2823
|
+
<syntaxhighlight lang="neat">void main() writeln "Hello world!";</syntaxhighlight>
|
2824
|
+
|
2825
|
+
=={{header|Neko}}==
|
2826
|
+
<syntaxhighlight lang="neko">$print("Hello world!");</syntaxhighlight>
|
2827
|
+
|
2828
|
+
=={{header|Nemerle}}==
|
2829
|
+
<syntaxhighlight lang="nemerle">
|
2830
|
+
class Hello
|
2831
|
+
{
|
2832
|
+
static Main () : void
|
2833
|
+
{
|
2834
|
+
System.Console.WriteLine ("Hello world!");
|
2835
|
+
}
|
2836
|
+
}
|
2837
|
+
</syntaxhighlight>
|
2838
|
+
Easier method:
|
2839
|
+
<syntaxhighlight lang="nemerle">
|
2840
|
+
System.Console.WriteLine("Hello world!");
|
2841
|
+
</syntaxhighlight>
|
2842
|
+
|
2843
|
+
=={{header|NetRexx}}==
|
2844
|
+
<syntaxhighlight lang="netrexx">say 'Hello world!'</syntaxhighlight>
|
2845
|
+
|
2846
|
+
=={{header|Never}}==
|
2847
|
+
<syntaxhighlight lang="fsharp">func main() -> int {
|
2848
|
+
prints("Hello world!\n");
|
2849
|
+
0
|
2850
|
+
}</syntaxhighlight>
|
2851
|
+
|
2852
|
+
{{out}}
|
2853
|
+
<pre>prompt$ never -f hello.nev
|
2854
|
+
Hello world!</pre>
|
2855
|
+
|
2856
|
+
=={{header|newLISP}}==
|
2857
|
+
{{works with|newLisp|6.1 and after}}
|
2858
|
+
<syntaxhighlight lang="lisp">(println "Hello world!")</syntaxhighlight>
|
2859
|
+
|
2860
|
+
=={{header|Nickle}}==
|
2861
|
+
<syntaxhighlight lang="c">printf("Hello world!\n")</syntaxhighlight>
|
2862
|
+
|
2863
|
+
=={{header|Nim}}==
|
2864
|
+
<syntaxhighlight lang="nim">echo("Hello world!")</syntaxhighlight>
|
2865
|
+
using <code>stdout</code>
|
2866
|
+
<syntaxhighlight lang="nim">stdout.writeLine("Hello World!")</syntaxhighlight>
|
2867
|
+
|
2868
|
+
=={{header|Nit}}==
|
2869
|
+
<syntaxhighlight lang="nit">print "Hello world!"</syntaxhighlight>
|
2870
|
+
=={{header|Nix}}==
|
2871
|
+
<syntaxhighlight lang="nix">"Hello world!"</syntaxhighlight>
|
2872
|
+
|
2873
|
+
=={{header|NLP++}}==
|
2874
|
+
<syntaxhighlight lang="nlp++">
|
2875
|
+
@CODE
|
2876
|
+
"output.txt" << "Hello world!";
|
2877
|
+
@@CODE
|
2878
|
+
</syntaxhighlight>
|
2879
|
+
|
2880
|
+
=={{header|NS-HUBASIC}}==
|
2881
|
+
<p>As lowercase characters are not offered in NS-HUBASIC, perhaps some flexibility in the task specification could be offered.</p>
|
2882
|
+
Using <code>?</code>:
|
2883
|
+
<syntaxhighlight lang="ns-hubasic">10 ? "HELLO WORLD!"</syntaxhighlight>
|
2884
|
+
|
2885
|
+
Using <code>PRINT</code>:
|
2886
|
+
<syntaxhighlight lang="ns-hubasic">10 PRINT "HELLO WORLD!"</syntaxhighlight>
|
2887
|
+
|
2888
|
+
=={{header|Nyquist}}==
|
2889
|
+
'''Interpreter:''' [[Nyquist]] (3.15)
|
2890
|
+
[[Category:Nyquist Version 3.15]]
|
2891
|
+
===LISP syntax===
|
2892
|
+
<syntaxhighlight lang="lisp">(format t "Hello world!")</syntaxhighlight>
|
2893
|
+
|
2894
|
+
Or
|
2895
|
+
|
2896
|
+
<syntaxhighlight lang="lisp">(print "Hello world!")</syntaxhighlight>
|
2897
|
+
|
2898
|
+
===SAL syntax===
|
2899
|
+
<syntaxhighlight lang="sal">print "Hello World!"</syntaxhighlight>
|
2900
|
+
|
2901
|
+
Or
|
2902
|
+
|
2903
|
+
<syntaxhighlight lang="sal">exec format(t, "Hello World!")</syntaxhighlight>
|
2904
|
+
|
2905
|
+
=={{header|Oberon-2}}==
|
2906
|
+
<syntaxhighlight lang="oberon2">
|
2907
|
+
MODULE Goodbye;
|
2908
|
+
IMPORT Out;
|
2909
|
+
PROCEDURE World*;
|
2910
|
+
BEGIN
|
2911
|
+
Out.String("Hello world!");Out.Ln
|
2912
|
+
END World;
|
2913
|
+
BEGIN
|
2914
|
+
World;
|
2915
|
+
END Goodbye.
|
2916
|
+
</syntaxhighlight>
|
2917
|
+
|
2918
|
+
=={{header|Objeck}}==
|
2919
|
+
<syntaxhighlight lang="objeck">
|
2920
|
+
class Hello {
|
2921
|
+
function : Main(args : String[]) ~ Nil {
|
2922
|
+
"Hello world!"->PrintLine();
|
2923
|
+
}
|
2924
|
+
}</syntaxhighlight>
|
2925
|
+
|
2926
|
+
=={{header|Objective-C}}==
|
2927
|
+
{{works with|clang-602.0.53}}
|
2928
|
+
|
2929
|
+
The de facto Objective-C "Hello, World!" program is most commonly illustrated as the following, using the NSLog() function:
|
2930
|
+
|
2931
|
+
<syntaxhighlight lang="objc">
|
2932
|
+
#import <Foundation/Foundation.h>
|
2933
|
+
|
2934
|
+
int main() {
|
2935
|
+
@autoreleasepool {
|
2936
|
+
NSLog(@"Hello, World!");
|
2937
|
+
}
|
2938
|
+
}
|
2939
|
+
</syntaxhighlight>
|
2940
|
+
|
2941
|
+
However the purpose of the NSLog() function is to print a message to standard error prefixed with a timestamp, which does not meet the most common criteria of a "Hello, World!" program of displaying only the requested message to standard output.
|
2942
|
+
|
2943
|
+
The following code prints the message to standard output without a timestamp using exclusively Objective-C messages:
|
2944
|
+
|
2945
|
+
<syntaxhighlight lang="objc">
|
2946
|
+
#import <Foundation/Foundation.h>
|
2947
|
+
|
2948
|
+
int main() {
|
2949
|
+
@autoreleasepool {
|
2950
|
+
NSFileHandle *standardOutput = [NSFileHandle fileHandleWithStandardOutput];
|
2951
|
+
NSString *message = @"Hello, World!\n";
|
2952
|
+
[standardOutput writeData:[message dataUsingEncoding:NSUTF8StringEncoding]];
|
2953
|
+
}
|
2954
|
+
}
|
2955
|
+
</syntaxhighlight>
|
2956
|
+
|
2957
|
+
Objective-C also supports functions contained within the C standard library. However, Objective-C's NSString objects must be converted into a UTF-8 string in order to be supported by the C language's I/O functions.
|
2958
|
+
|
2959
|
+
<syntaxhighlight lang="objc">
|
2960
|
+
#import <Foundation/Foundation.h>
|
2961
|
+
|
2962
|
+
int main() {
|
2963
|
+
@autoreleasepool {
|
2964
|
+
NSString *message = @"Hello, World!\n";
|
2965
|
+
printf("%s", message.UTF8String);
|
2966
|
+
}
|
2967
|
+
}
|
2968
|
+
</syntaxhighlight>
|
2969
|
+
|
2970
|
+
=={{header|OCaml}}==
|
2971
|
+
<syntaxhighlight lang="ocaml">print_endline "Hello world!"</syntaxhighlight>
|
2972
|
+
|
2973
|
+
=={{header|Occam}}==
|
2974
|
+
{{works with|kroc}}
|
2975
|
+
<syntaxhighlight lang="occam">#USE "course.lib"
|
2976
|
+
PROC main (CHAN BYTE screen!)
|
2977
|
+
out.string("Hello world!*c*n", 0, screen)
|
2978
|
+
:</syntaxhighlight>
|
2979
|
+
|
2980
|
+
=={{header|Octave}}==
|
2981
|
+
<syntaxhighlight lang="octave">disp("Hello world!");</syntaxhighlight>
|
2982
|
+
|
2983
|
+
Or, using C-style function printf:
|
2984
|
+
|
2985
|
+
<syntaxhighlight lang="octave">printf("Hello world!");</syntaxhighlight>
|
2986
|
+
|
2987
|
+
=={{header|Odin}}==
|
2988
|
+
<syntaxhighlight lang="odin">package main
|
2989
|
+
import "core:fmt"
|
2990
|
+
|
2991
|
+
main :: proc() {
|
2992
|
+
fmt.println("Hellope!");
|
2993
|
+
}</syntaxhighlight>
|
2994
|
+
|
2995
|
+
=={{header|Oforth}}==
|
2996
|
+
<syntaxhighlight lang="oforth">"Hello world!" .</syntaxhighlight>
|
2997
|
+
|
2998
|
+
=={{header|Ol}}==
|
2999
|
+
<syntaxhighlight lang="scheme">(print "Hello world!")</syntaxhighlight>
|
3000
|
+
|
3001
|
+
=={{header|Onyx}}==
|
3002
|
+
<syntaxhighlight lang="onyx">`Hello world!\n' print flush</syntaxhighlight>
|
3003
|
+
|
3004
|
+
=={{header|OOC}}==
|
3005
|
+
To print a String, either call its println() method:
|
3006
|
+
<syntaxhighlight lang="ooc">main: func {
|
3007
|
+
"Hello world!" println()
|
3008
|
+
}</syntaxhighlight>
|
3009
|
+
Or call the free println() function with the String as the argument.
|
3010
|
+
<syntaxhighlight lang="ooc">main: func {
|
3011
|
+
println("Hello world!")
|
3012
|
+
}</syntaxhighlight>
|
3013
|
+
|
3014
|
+
=={{header|ooRexx}}==
|
3015
|
+
Refer also to the [[#REXX|Rexx]] and [[#NetRexx|NetRexx]] solutions. Simple output is common to most Rexx dialects.
|
3016
|
+
<syntaxhighlight lang="oorexx">/* Rexx */
|
3017
|
+
say 'Hello world!'
|
3018
|
+
</syntaxhighlight>
|
3019
|
+
|
3020
|
+
=={{header|OpenLisp}}==
|
3021
|
+
We can use the same code as the Common Lisp example, but as a shell script.
|
3022
|
+
<syntaxhighlight lang="openlisp">
|
3023
|
+
#!/openlisp/uxlisp -shell
|
3024
|
+
(format t "Hello world!~%")
|
3025
|
+
(print "Hello world!")
|
3026
|
+
</syntaxhighlight>
|
3027
|
+
|
3028
|
+
Output:
|
3029
|
+
Hello world!
|
3030
|
+
"Hello world!"
|
3031
|
+
|
3032
|
+
=={{header|Openscad}}==
|
3033
|
+
<syntaxhighlight lang="openscad">
|
3034
|
+
echo("Hello world!"); // writes to the console
|
3035
|
+
text("Hello world!"); // creates 2D text in the object space
|
3036
|
+
linear_extrude(height=10) text("Hello world!"); // creates 3D text in the object space
|
3037
|
+
</syntaxhighlight>
|
3038
|
+
|
3039
|
+
=={{header|Oxygene}}==
|
3040
|
+
From [[wp:Oxygene (programming language)]]
|
3041
|
+
<syntaxhighlight lang="oxygene">
|
3042
|
+
namespace HelloWorld;
|
3043
|
+
|
3044
|
+
interface
|
3045
|
+
|
3046
|
+
type
|
3047
|
+
HelloClass = class
|
3048
|
+
public
|
3049
|
+
class method Main;
|
3050
|
+
end;
|
3051
|
+
|
3052
|
+
implementation
|
3053
|
+
|
3054
|
+
class method HelloClass.Main;
|
3055
|
+
begin
|
3056
|
+
writeLn('Hello world!');
|
3057
|
+
end;
|
3058
|
+
|
3059
|
+
end.
|
3060
|
+
</syntaxhighlight>
|
3061
|
+
<pre>
|
3062
|
+
>HelloWorld.exe
|
3063
|
+
Hello world!
|
3064
|
+
</pre>
|
3065
|
+
|
3066
|
+
=={{header|Oz}}==
|
3067
|
+
<syntaxhighlight lang="oz">{Show "Hello world!"}</syntaxhighlight>
|
3068
|
+
|
3069
|
+
=={{header|PARI/GP}}==
|
3070
|
+
|
3071
|
+
<syntaxhighlight lang="parigp">print("Hello world!")</syntaxhighlight>
|
3072
|
+
|
3073
|
+
=={{header|Pascal}}==
|
3074
|
+
{{works with|Free Pascal}}
|
3075
|
+
<syntaxhighlight lang="pascal">program byeworld;
|
3076
|
+
begin
|
3077
|
+
writeln('Hello world!');
|
3078
|
+
end.</syntaxhighlight>
|
3079
|
+
|
3080
|
+
=={{header|PASM}}==
|
3081
|
+
<syntaxhighlight lang="pasm">print "Hello world!\n"
|
3082
|
+
end</syntaxhighlight>
|
3083
|
+
|
3084
|
+
=={{header|PDP-1 Assembly}}==
|
3085
|
+
This can be assembled with macro1.c distributed with SIMH and then run on the SIMH PDP-1 simulator.
|
3086
|
+
<syntaxhighlight lang="assembly">
|
3087
|
+
hello
|
3088
|
+
/ above: title line - was punched in human readable letters on paper tape
|
3089
|
+
/ below: location specifier - told assembler what address to assemble to
|
3090
|
+
100/
|
3091
|
+
lup, lac i ptr / load ac from address stored in pointer
|
3092
|
+
cli / clear io register
|
3093
|
+
lu2, rcl 6s / rotate combined ac + io reg 6 bits to the left
|
3094
|
+
/ left 6 bits in ac move into right 6 bits of io reg
|
3095
|
+
tyo / type out character in 6 right-most bits of io reg
|
3096
|
+
sza / skip next instr if accumulator is zero
|
3097
|
+
jmp lu2 / otherwise do next character in current word
|
3098
|
+
idx ptr / increment pointer to next word in message
|
3099
|
+
sas end / skip next instr if pointer passes the end of message
|
3100
|
+
jmp lup / otherwise do next word in message
|
3101
|
+
hlt / halt machine
|
3102
|
+
ptr, msg / pointer to current word in message
|
3103
|
+
msg, text "hello, world" / 3 6-bit fiodec chars packed into each 18-bit word
|
3104
|
+
end, . / sentinel for end of message
|
3105
|
+
start 100 / tells assembler where program starts
|
3106
|
+
</syntaxhighlight>
|
3107
|
+
|
3108
|
+
=={{header|PDP-11 Assembly}}==
|
3109
|
+
This is Dennis Ritchie's Unix Assembler ("as"). Other PDP-11 assemblers include PAL-11R, PAL-11S and MACRO-11.
|
3110
|
+
|
3111
|
+
{{works with|UNIX|1}} to {{works with|UNIX|7}}
|
3112
|
+
|
3113
|
+
<syntaxhighlight lang="assembly">.globl start
|
3114
|
+
.text
|
3115
|
+
start:
|
3116
|
+
mov $1,r0 / r0=stream, STDOUT=$1
|
3117
|
+
sys 4; outtext; outlen / sys 4 is write
|
3118
|
+
sys 1 / sys 1 is exit
|
3119
|
+
rts pc / in case exit returns
|
3120
|
+
|
3121
|
+
.data
|
3122
|
+
outtext: <Hello world!\n>
|
3123
|
+
outlen = . - outtext</syntaxhighlight>
|
3124
|
+
|
3125
|
+
=={{header|PepsiScript}}==
|
3126
|
+
The letters are only outputted in uppercase in the running program. However, lowercase characters can be used in the code instead.
|
3127
|
+
|
3128
|
+
For typing:
|
3129
|
+
<syntaxhighlight lang="pepsiscript">#include default-libraries
|
3130
|
+
|
3131
|
+
#author Childishbeat
|
3132
|
+
|
3133
|
+
class Hello world/Text:
|
3134
|
+
function Hello world/Text:
|
3135
|
+
|
3136
|
+
print "Hello world!"
|
3137
|
+
|
3138
|
+
end</syntaxhighlight>
|
3139
|
+
For importing:
|
3140
|
+
|
3141
|
+
•dl◘Childishbeat◙♦Hello world/Text♪♣Hello_world!♠
|
3142
|
+
|
3143
|
+
=={{header|Perl}}==
|
3144
|
+
{{works with|Perl|5.8.8}}
|
3145
|
+
<syntaxhighlight lang="perl">print "Hello world!\n";</syntaxhighlight>
|
3146
|
+
|
3147
|
+
{{works with|Perl|5.10.x}}
|
3148
|
+
Backported from Raku:
|
3149
|
+
<syntaxhighlight lang="perl">use feature 'say';
|
3150
|
+
say 'Hello world!';</syntaxhighlight>
|
3151
|
+
|
3152
|
+
or:
|
3153
|
+
<syntaxhighlight lang="perl">use 5.010;
|
3154
|
+
say 'Hello world!';</syntaxhighlight>
|
3155
|
+
|
3156
|
+
=={{header|Peylang}}==
|
3157
|
+
<syntaxhighlight lang="peylang">chaap 'Hello world!';</syntaxhighlight>
|
3158
|
+
{{out}}
|
3159
|
+
<pre>
|
3160
|
+
$ peyman hello.pey
|
3161
|
+
Hello world!
|
3162
|
+
</pre>
|
3163
|
+
|
3164
|
+
=={{header|Pharo}}==
|
3165
|
+
<syntaxhighlight lang="pharo">"Comments are in double quotes"
|
3166
|
+
"Sending message printString to 'Hello World' string"
|
3167
|
+
|
3168
|
+
'Hello World' printString</syntaxhighlight>
|
3169
|
+
|
3170
|
+
=={{header|Phix}}==
|
3171
|
+
{{libheader|Phix/basics}}
|
3172
|
+
<!--<syntaxhighlight lang="phix">-->
|
3173
|
+
<span style="color: #7060A8;">puts</span><span style="color: #0000FF;">(</span><span style="color: #000000;">1</span><span style="color: #0000FF;">,</span><span style="color: #008000;">"Hello world!"</span><span style="color: #0000FF;">)</span>
|
3174
|
+
<!--</syntaxhighlight>-->
|
3175
|
+
|
3176
|
+
=={{header|PHL}}==
|
3177
|
+
<syntaxhighlight lang="phl">module helloworld;
|
3178
|
+
extern printf;
|
3179
|
+
|
3180
|
+
@Integer main [
|
3181
|
+
printf("Hello world!");
|
3182
|
+
return 0;
|
3183
|
+
]</syntaxhighlight>
|
3184
|
+
|
3185
|
+
=={{header|PHP}}==
|
3186
|
+
<syntaxhighlight lang="php"><?php
|
3187
|
+
echo "Hello world!\n";
|
3188
|
+
?></syntaxhighlight>
|
3189
|
+
Alternatively, any text outside of the <code><?php ?></code> tags will be automatically echoed:
|
3190
|
+
<syntaxhighlight lang="php">Hello world!</syntaxhighlight>
|
3191
|
+
|
3192
|
+
=={{header|Picat}}==
|
3193
|
+
<syntaxhighlight lang="picat">println("Hello, world!")</syntaxhighlight>
|
3194
|
+
|
3195
|
+
=={{header|PicoLisp}}==
|
3196
|
+
<syntaxhighlight lang="picolisp">(prinl "Hello world!")</syntaxhighlight>
|
3197
|
+
|
3198
|
+
=={{header|Pict}}==
|
3199
|
+
Using the syntax sugared version:
|
3200
|
+
<syntaxhighlight lang="pict">(prNL "Hello World!");</syntaxhighlight>
|
3201
|
+
Using the channel syntax:
|
3202
|
+
<syntaxhighlight lang="pict">new done: ^[]
|
3203
|
+
run ( prNL!["Hello World!" (rchan done)]
|
3204
|
+
| done?_ = () )</syntaxhighlight>
|
3205
|
+
|
3206
|
+
=={{header|Pikachu}}==
|
3207
|
+
<syntaxhighlight lang="pict">pikachu pika pikachu pika pika pi pi pika pikachu pika pikachu pi pikachu pi pikachu pi pika pi pikachu pikachu pi pi pika pika pikachu pika pikachu pikachu pi pika pi pika pika pi pikachu pikachu pi pikachu pi pika pikachu pi pikachu pika pikachu pi pikachu pikachu pi pikachu pika pika pikachu pi pikachu pi pi pikachu pikachu pika pikachu pi pika pi pi pika pika pikachu pikachu pi pi pikachu pi pikachu
|
3208
|
+
pikachu pikachu pi pikachu
|
3209
|
+
pikachu pika pika pikachu pika pikachu pikachu pika pika pikachu pikachu pi pi pikachu pika pikachu pika pika pi pika pikachu pikachu pi pika pika pikachu pi pika pi pika pi pikachu pi pikachu pika pika pi pi pika pi pika pika pikachu pikachu pika pikachu pikachu pika pi pikachu pika pi pikachu pi pika pika pi pikachu pika pi pika pikachu pi pi pikachu pika pika pi pika pi pikachu
|
3210
|
+
pikachu pikachu pi pikachu
|
3211
|
+
pikachu pika pi pika pika pikachu pika pikachu pi pikachu pi pi pika pi pikachu pika pi pi pika pikachu pi pikachu pi pi pikachu pikachu pika pikachu pikachu pika pi pikachu pi pika pikachu pi pikachu pika pika pikachu pika pi pi pikachu pikachu pika pika pikachu pi pika pikachu pikachu pi pika pikachu pikachu pika pi pi pikachu pikachu pi pikachu pi pikachu pi pikachu pi pika pikachu pi pikachu pika pikachu pi pika pi pikachu
|
3212
|
+
pi pika
|
3213
|
+
pikachu pikachu pi pikachu
|
3214
|
+
pika pi
|
3215
|
+
pikachu pikachu pi pikachu
|
3216
|
+
pikachu pi pikachu pi pi pikachu pi pikachu pika pikachu pikachu pi pikachu pikachu pika pi pi pika pikachu pika pikachu pi pi pikachu pika pi pi pikachu pika pika pi pika pika pikachu pika pikachu pi pi pika pikachu pika pi pikachu pikachu pi pikachu pika pikachu pikachu pika pi pi pikachu pikachu pi pika pikachu pi pikachu pika pikachu pikachu pika pi pikachu pikachu pika pikachu pi pikachu pika pika pi pikachu pi pika pi pikachu pikachu pi pikachu
|
3217
|
+
pi pika
|
3218
|
+
pikachu pikachu pi pikachu
|
3219
|
+
pikachu pikachu pi pika pikachu pi pika pika pi pi pika pi pikachu pi pika pi pika pi pika pikachu pika pi pi pikachu pi pikachu pi pika pi pika pika pikachu pi pikachu
|
3220
|
+
pikachu pikachu pi pikachu
|
3221
|
+
pikachu pi pikachu pika pikachu pi pika pi pikachu pikachu pika pika pi pi pikachu pi pika pi pikachu pi pika pikachu pi pika pi pi pikachu pikachu pika pika pikachu pikachu pi pi pikachu pi pikachu pi pikachu pi pi pikachu pikachu pi pikachu pi pikachu pi pika pika pikachu pikachu pika pi pika pikachu pi pikachu pi pi pika pikachu pika pi pikachu pi pika pi pi pikachu pikachu pika pika pikachu pika pika pikachu pi pika pi pika pikachu pi pika pikachu pika pi pika pikachu
|
3222
|
+
pikachu pikachu pika pikachu
|
3223
|
+
pikachu pikachu pika pikachu
|
3224
|
+
pi pi pikachu pi pikachu pika pika pi pikachu pika pika pi pi pika pika pikachu pi pi pikachu pi pika pi pika pikachu pi pikachu pi pikachu pikachu pi pi pika pika pi pika pika pi pika pikachu pikachu pi pikachu pika pi pi pika pi pi pikachu pikachu pika pi pi pika pika pi pika pikachu pi pikachu pi pi pika pi pika pika pikachu pika pi pika pikachu pi pikachu pikachu pi pi pika pi pika pika pikachu pikachu pi pikachu
|
3225
|
+
pikachu pikachu pi pikachu
|
3226
|
+
pikachu pi pikachu pikachu pika pikachu pikachu pika pika pikachu pikachu pika pikachu pi pika pikachu pika pika pi pikachu pi pi pika pi pi pikachu pika pika pikachu pikachu pika pikachu pikachu pi pika pi pi pikachu pikachu pika pi pi pikachu pikachu pika pikachu pika pi pikachu pi pika pi pika pikachu pika pi pikachu pi pikachu pikachu pi pika pikachu pi pikachu pikachu pi pika pi pikachu pikachu pi pikachu pika pika pi pi pikachu
|
3227
|
+
pikachu pi pi pika pi pi pikachu pika pikachu pikachu pika pika pi pi pika pikachu pi pikachu pi pi pika pi pika pi pi pika pikachu pi pika pi pikachu pika pikachu pika pi pi pika pi pi pikachu pi pikachu pikachu pika pi pikachu pi pi pika pi pikachu pi pi pika pi pi pikachu pika pikachu pika pikachu pika pi pikachu pikachu pi pi pika pika pikachu
|
3228
|
+
pikachu pikachu pi pikachu
|
3229
|
+
pikachu pikachu pika pikachu</syntaxhighlight>
|
3230
|
+
|
3231
|
+
=={{header|Pike}}==
|
3232
|
+
<syntaxhighlight lang="pike">int main(){
|
3233
|
+
write("Hello world!\n");
|
3234
|
+
}</syntaxhighlight>
|
3235
|
+
|
3236
|
+
=={{header|PILOT}}==
|
3237
|
+
<syntaxhighlight lang="pilot">T:Hello world!</syntaxhighlight>
|
3238
|
+
|
3239
|
+
=={{header|PIR}}==
|
3240
|
+
<syntaxhighlight lang="pir">.sub hello_world_text :main
|
3241
|
+
print "Hello world!\n"
|
3242
|
+
.end</syntaxhighlight>
|
3243
|
+
|
3244
|
+
=={{header|Pixilang}}==
|
3245
|
+
<syntaxhighlight lang="pixilang">fputs("Hello world!\n")</syntaxhighlight>
|
3246
|
+
|
3247
|
+
=={{header|PL/I}}==
|
3248
|
+
<syntaxhighlight lang="pli">goodbye:proc options(main);
|
3249
|
+
put list('Hello world!');
|
3250
|
+
end goodbye;</syntaxhighlight>
|
3251
|
+
|
3252
|
+
=={{header|PL/M}}==
|
3253
|
+
The original PL/M compiler does not recognise lower-case letters, hence the Hello, World! string must specify the ASCII codes for the lower-case letters.
|
3254
|
+
<syntaxhighlight lang="pli">100H:
|
3255
|
+
/* CP/M BDOS SYSTEM CALL */
|
3256
|
+
BDOS: PROCEDURE( FN, ARG ); DECLARE FN BYTE, ARG ADDRESS; GOTO 5; END;
|
3257
|
+
/* PRINT A $ TERMINATED STRING */
|
3258
|
+
PRINT$STRING: PROCEDURE( S ); DECLARE S ADDRESS; CALL BDOS( 9, S ); END;
|
3259
|
+
/* HELLO, WORLD! IN MIXED CASE */
|
3260
|
+
DECLARE HELLO$WORLD ( 14 ) BYTE
|
3261
|
+
INITIAL( 'H', 65H, 6CH, 6CH, 6FH, ',', ' '
|
3262
|
+
, 'W', 6FH, 72H, 6CH, 64H, 21H, '$'
|
3263
|
+
);
|
3264
|
+
CALL PRINT$STRING( .HELLO$WORLD );
|
3265
|
+
EOF</syntaxhighlight>
|
3266
|
+
|
3267
|
+
=={{header|PL/SQL}}==
|
3268
|
+
{{works with|Oracle}}
|
3269
|
+
<syntaxhighlight lang="plsql">
|
3270
|
+
set serveroutput on
|
3271
|
+
|
3272
|
+
BEGIN
|
3273
|
+
DBMS_OUTPUT.PUT_LINE('Hello world!');
|
3274
|
+
END;
|
3275
|
+
/
|
3276
|
+
</syntaxhighlight>
|
3277
|
+
|
3278
|
+
<pre>
|
3279
|
+
SQL> set serveroutput on
|
3280
|
+
SQL>
|
3281
|
+
SQL> BEGIN
|
3282
|
+
2 DBMS_OUTPUT.PUT_LINE('Hello world!');
|
3283
|
+
3 END;
|
3284
|
+
4 /
|
3285
|
+
Hello world!
|
3286
|
+
|
3287
|
+
PL/SQL procedure successfully completed.
|
3288
|
+
</pre>
|
3289
|
+
|
3290
|
+
=={{header|Plain English}}==
|
3291
|
+
<syntaxhighlight lang="plainenglish">\This prints Hello World within the CAL-4700 IDE.
|
3292
|
+
\...and backslashes are comments!
|
3293
|
+
To run:
|
3294
|
+
Start up.
|
3295
|
+
Write "Hello World!" to the console.
|
3296
|
+
Wait for the escape key.
|
3297
|
+
Shut down.</syntaxhighlight>
|
3298
|
+
|
3299
|
+
=={{header|Plan}}==
|
3300
|
+
This prints HELLO WORLD on operator's console.
|
3301
|
+
|
3302
|
+
<syntaxhighlight lang="plan">#STEER LIST,BINARY
|
3303
|
+
#PROGRAM HLWD
|
3304
|
+
#LOWER
|
3305
|
+
MSG1A 11HHELLO WORLD
|
3306
|
+
MSG1B 11/MSG1A
|
3307
|
+
#PROGRAM
|
3308
|
+
#ENTRY 0
|
3309
|
+
DISTY MSG1B
|
3310
|
+
SUSWT 2HHH
|
3311
|
+
#END
|
3312
|
+
#FINISH
|
3313
|
+
#STOP</syntaxhighlight>
|
3314
|
+
|
3315
|
+
=={{header|Pony}}==
|
3316
|
+
<syntaxhighlight lang="pony">actor Main
|
3317
|
+
new create(env: Env) =>
|
3318
|
+
env.out.print("Hello world!")</syntaxhighlight>
|
3319
|
+
|
3320
|
+
=={{header|Pop11}}==
|
3321
|
+
<syntaxhighlight lang="pop11">printf('Hello world!\n');</syntaxhighlight>
|
3322
|
+
|
3323
|
+
=={{header|Portugol}}==
|
3324
|
+
Portugol keywords are Portuguese words.
|
3325
|
+
<syntaxhighlight lang="portugol">
|
3326
|
+
programa {
|
3327
|
+
// funcao defines a new function
|
3328
|
+
// inicio is the entry point of the program, like main in C
|
3329
|
+
funcao inicio() {
|
3330
|
+
// escreva is used to print stuff to the screen
|
3331
|
+
escreva("Hello, world!\n") // no ';' needed
|
3332
|
+
}
|
3333
|
+
}
|
3334
|
+
</syntaxhighlight>
|
3335
|
+
|
3336
|
+
=={{header|PostScript}}==
|
3337
|
+
|
3338
|
+
To generate a document that shows the text "Hello world!":
|
3339
|
+
|
3340
|
+
<syntaxhighlight lang="postscript">%!PS
|
3341
|
+
/Helvetica 20 selectfont
|
3342
|
+
70 700 moveto
|
3343
|
+
(Hello world!) show
|
3344
|
+
showpage</syntaxhighlight>
|
3345
|
+
|
3346
|
+
If the viewer has a console, then there are the following ways to display the topmost element of the stack:
|
3347
|
+
|
3348
|
+
<syntaxhighlight lang="postscript">(Hello world!) ==</syntaxhighlight>
|
3349
|
+
|
3350
|
+
will display the <i>string</i> "(Hello world!)";
|
3351
|
+
|
3352
|
+
<syntaxhighlight lang="postscript">(Hello world!) =</syntaxhighlight>
|
3353
|
+
|
3354
|
+
will display the <i>content</i> of the string "(Hello world!)"; that is, "Hello world!";
|
3355
|
+
|
3356
|
+
<syntaxhighlight lang="postscript">(Hello world!) print</syntaxhighlight>
|
3357
|
+
|
3358
|
+
will do the same, without printing a newline. It may be necessary to provoke an error message to make the console pop up. The following program combines all four above variants:
|
3359
|
+
|
3360
|
+
<syntaxhighlight lang="postscript">%!PS
|
3361
|
+
/Helvetica 20 selectfont
|
3362
|
+
70 700 moveto
|
3363
|
+
(Hello world!) dup dup dup
|
3364
|
+
= print == % prints three times to the console
|
3365
|
+
show % prints to document
|
3366
|
+
1 0 div % provokes error message
|
3367
|
+
showpage</syntaxhighlight>
|
3368
|
+
|
3369
|
+
=={{header|Potion}}==
|
3370
|
+
<syntaxhighlight lang="potion">"Hello world!\n" print</syntaxhighlight>
|
3371
|
+
|
3372
|
+
=={{header|PowerBASIC}}==
|
3373
|
+
<syntaxhighlight lang="powerbasic">#COMPILE EXE
|
3374
|
+
#COMPILER PBCC 6
|
3375
|
+
|
3376
|
+
FUNCTION PBMAIN () AS LONG
|
3377
|
+
CON.PRINT "Hello world!"
|
3378
|
+
CON.WAITKEY$
|
3379
|
+
END FUNCTION</syntaxhighlight>
|
3380
|
+
|
3381
|
+
=={{header|PowerShell}}==
|
3382
|
+
This example used to say that using ''Write-Host'' was good practice. This is not true - it should in fact be avoided in most cases.
|
3383
|
+
|
3384
|
+
See http://www.jsnover.com/blog/2013/12/07/write-host-considered-harmful/ (Jeffrey Snover is one of the creators of PowerShell).
|
3385
|
+
<syntaxhighlight lang="powershell">'Hello world!'</syntaxhighlight>
|
3386
|
+
|
3387
|
+
=={{header|Processing}}==
|
3388
|
+
<syntaxhighlight lang="processing">println("Hello world!");</syntaxhighlight>
|
3389
|
+
|
3390
|
+
=={{header|ProDOS}}==
|
3391
|
+
<syntaxhighlight lang="prodos">printline Hello world!</syntaxhighlight>
|
3392
|
+
|
3393
|
+
=={{header|Programming Language}}==
|
3394
|
+
For typing:
|
3395
|
+
<syntaxhighlight lang="programming language">print(Hello world!)</syntaxhighlight>
|
3396
|
+
For importing:
|
3397
|
+
|
3398
|
+
[print(Hello world!)]
|
3399
|
+
|
3400
|
+
=={{header|Prolog}}==
|
3401
|
+
<syntaxhighlight lang="prolog">:- write('Hello world!'), nl.</syntaxhighlight>
|
3402
|
+
|
3403
|
+
=={{header|PROMAL}}==
|
3404
|
+
<syntaxhighlight lang="promal">
|
3405
|
+
program hello
|
3406
|
+
include library
|
3407
|
+
begin
|
3408
|
+
output "Hello world!"
|
3409
|
+
end
|
3410
|
+
</syntaxhighlight>
|
3411
|
+
|
3412
|
+
=={{header|PSQL}}==
|
3413
|
+
EXECUTE BLOCK
|
3414
|
+
RETURNS(S VARCHAR(40))
|
3415
|
+
AS
|
3416
|
+
BEGIN
|
3417
|
+
S = 'Hello world!';
|
3418
|
+
SUSPEND;
|
3419
|
+
END
|
3420
|
+
|
3421
|
+
=={{header|Pure}}==
|
3422
|
+
<syntaxhighlight lang="pure">
|
3423
|
+
using system;
|
3424
|
+
|
3425
|
+
puts "Hello world!\n" ;
|
3426
|
+
</syntaxhighlight>
|
3427
|
+
|
3428
|
+
=={{header|PureBasic}}==
|
3429
|
+
<syntaxhighlight lang="purebasic">OpenConsole()
|
3430
|
+
PrintN("Hello world!")
|
3431
|
+
Input() ; Wait for enter</syntaxhighlight>
|
3432
|
+
using <code>Debug</code>
|
3433
|
+
<syntaxhighlight lang="purebasic">Debug("Hello world!")</syntaxhighlight>
|
3434
|
+
|
3435
|
+
=={{header|Python}}==
|
3436
|
+
{{works with|Python|2.4}}
|
3437
|
+
<syntaxhighlight lang="python">print "Hello world!"</syntaxhighlight>
|
3438
|
+
|
3439
|
+
The same using sys.stdout
|
3440
|
+
<syntaxhighlight lang="python">import sys
|
3441
|
+
sys.stdout.write("Hello world!\n")</syntaxhighlight>
|
3442
|
+
|
3443
|
+
In Python 3.0, print is changed from a statement to a function.
|
3444
|
+
|
3445
|
+
{{works with|Python|3.0}} (And version 2.X too).
|
3446
|
+
<syntaxhighlight lang="python">print("Hello world!")</syntaxhighlight>
|
3447
|
+
|
3448
|
+
'''An easter egg'''
|
3449
|
+
The first two examples print <code>Hello, world!</code> once, and the last one prints it twice.
|
3450
|
+
<syntaxhighlight lang="python">import __hello__</syntaxhighlight>
|
3451
|
+
|
3452
|
+
<syntaxhighlight lang="python">import __phello__</syntaxhighlight>
|
3453
|
+
|
3454
|
+
<syntaxhighlight lang="python">import __phello__.spam</syntaxhighlight>
|
3455
|
+
|
3456
|
+
=={{header|QB64}}==
|
3457
|
+
<syntaxhighlight lang="qbasic">PRINT "Hello world!"</syntaxhighlight>
|
3458
|
+
|
3459
|
+
=={{header|Quackery}}==
|
3460
|
+
<syntaxhighlight lang="quackery">say "Hello world!"</syntaxhighlight>
|
3461
|
+
|
3462
|
+
=={{header|Quill}}==
|
3463
|
+
<syntaxhighlight lang="quill">"Hello world!" print</syntaxhighlight>
|
3464
|
+
|
3465
|
+
=={{header|Quite BASIC}}==
|
3466
|
+
<syntaxhighlight lang="quite basic">10 print "Hello world!"</syntaxhighlight>
|
3467
|
+
|
3468
|
+
=={{header|R}}==
|
3469
|
+
<syntaxhighlight lang="r"> cat("Hello world!\n")</syntaxhighlight>
|
3470
|
+
or
|
3471
|
+
<syntaxhighlight lang="r"> message("Hello world!")</syntaxhighlight>
|
3472
|
+
or
|
3473
|
+
<syntaxhighlight lang="r"> print("Hello world!")</syntaxhighlight>
|
3474
|
+
|
3475
|
+
=={{header|Ra}}==
|
3476
|
+
<syntaxhighlight lang="ra">
|
3477
|
+
class HelloWorld
|
3478
|
+
**Prints "Hello world!"**
|
3479
|
+
|
3480
|
+
on start
|
3481
|
+
|
3482
|
+
print "Hello world!"
|
3483
|
+
</syntaxhighlight>
|
3484
|
+
|
3485
|
+
=={{header|Racket}}==
|
3486
|
+
<syntaxhighlight lang="racket">
|
3487
|
+
(printf "Hello world!\n")
|
3488
|
+
</syntaxhighlight>
|
3489
|
+
|
3490
|
+
=={{header|Raku}}==
|
3491
|
+
(formerly Perl 6)
|
3492
|
+
<syntaxhighlight lang="raku" line>say 'Hello world!';</syntaxhighlight>
|
3493
|
+
In an object-oriented approach, the string is treated as an object calling its '''say()''' method:
|
3494
|
+
<syntaxhighlight lang="raku" line>"Hello, World!".say();</syntaxhighlight>
|
3495
|
+
|
3496
|
+
=={{header|Raven}}==
|
3497
|
+
<syntaxhighlight lang="raven">'Hello world!' print</syntaxhighlight>
|
3498
|
+
|
3499
|
+
=={{header|RATFOR}}==
|
3500
|
+
<syntaxhighlight lang="ratfor">
|
3501
|
+
|
3502
|
+
program hello
|
3503
|
+
|
3504
|
+
write(*,101)"Hello World"
|
3505
|
+
101 format(A)
|
3506
|
+
|
3507
|
+
end
|
3508
|
+
|
3509
|
+
</syntaxhighlight>
|
3510
|
+
|
3511
|
+
|
3512
|
+
=={{header|RASEL}}==
|
3513
|
+
<syntaxhighlight lang="text">A"!dlroW ,olleH">:?@,Hj</syntaxhighlight>
|
3514
|
+
|
3515
|
+
=={{header|REALbasic}}==
|
3516
|
+
{{works with|REALbasic|5.5}}
|
3517
|
+
This requires a console application.
|
3518
|
+
|
3519
|
+
<syntaxhighlight lang="realbasic">Function Run(args() as String) As Integer
|
3520
|
+
Print "Hello world!"
|
3521
|
+
Quit
|
3522
|
+
End Function</syntaxhighlight>
|
3523
|
+
|
3524
|
+
=={{header|REBOL}}==
|
3525
|
+
<syntaxhighlight lang="rebol">print "Hello world!"</syntaxhighlight>
|
3526
|
+
|
3527
|
+
=={{header|RED}}==
|
3528
|
+
<syntaxhighlight lang="red">print "Hello world!"</syntaxhighlight>
|
3529
|
+
|
3530
|
+
=={{header|Relation}}==
|
3531
|
+
|
3532
|
+
<syntaxhighlight lang="relation">
|
3533
|
+
' Hello world!
|
3534
|
+
</syntaxhighlight>
|
3535
|
+
|
3536
|
+
=={{header|ReScript}}==
|
3537
|
+
|
3538
|
+
<syntaxhighlight lang="rescript">Js.log("Hello world!")</syntaxhighlight>
|
3539
|
+
{{out}}
|
3540
|
+
<pre>
|
3541
|
+
$ bsc hello.res > hello.bs.js
|
3542
|
+
$ node hello.bs.js
|
3543
|
+
Hello world!
|
3544
|
+
</pre>
|
3545
|
+
|
3546
|
+
=={{header|Retro}}==
|
3547
|
+
|
3548
|
+
<syntaxhighlight lang="retro">
|
3549
|
+
'Hello_world! s:put
|
3550
|
+
</syntaxhighlight>
|
3551
|
+
|
3552
|
+
=={{header|REXX}}==
|
3553
|
+
===using SAY===
|
3554
|
+
<syntaxhighlight lang="rexx">/*REXX program to show a line of text. */
|
3555
|
+
say 'Hello world!'</syntaxhighlight>
|
3556
|
+
|
3557
|
+
===using SAY variable===
|
3558
|
+
<syntaxhighlight lang="rexx">/*REXX program to show a line of text. */
|
3559
|
+
yyy = 'Hello world!'
|
3560
|
+
say yyy</syntaxhighlight>
|
3561
|
+
|
3562
|
+
===using LINEOUT===
|
3563
|
+
<syntaxhighlight lang="rexx">/*REXX program to show a line of text. */
|
3564
|
+
|
3565
|
+
call lineout ,"Hello world!"</syntaxhighlight>
|
3566
|
+
|
3567
|
+
=={{header|Ring}}==
|
3568
|
+
<syntaxhighlight lang="ring">See "Hello world!"</syntaxhighlight>
|
3569
|
+
|
3570
|
+
=={{header|Risc-V}}==
|
3571
|
+
<syntaxhighlight lang="risc-v">.data
|
3572
|
+
hello:
|
3573
|
+
.string "Hello World!\n\0"
|
3574
|
+
.text
|
3575
|
+
main:
|
3576
|
+
la a0, hello
|
3577
|
+
li a7, 4
|
3578
|
+
ecall
|
3579
|
+
li a7, 10
|
3580
|
+
ecall
|
3581
|
+
</syntaxhighlight>
|
3582
|
+
|
3583
|
+
=={{header|Rockstar}}==
|
3584
|
+
<syntaxhighlight lang="rockstar">Shout "Hello world!"</syntaxhighlight>
|
3585
|
+
|
3586
|
+
=={{header|RTL/2}}==
|
3587
|
+
<syntaxhighlight lang="rtl/2">TITLE Goodbye World;
|
3588
|
+
|
3589
|
+
LET NL=10;
|
3590
|
+
|
3591
|
+
EXT PROC(REF ARRAY BYTE) TWRT;
|
3592
|
+
|
3593
|
+
ENT PROC INT RRJOB();
|
3594
|
+
|
3595
|
+
TWRT("Hello world!#NL#");
|
3596
|
+
RETURN(1);
|
3597
|
+
|
3598
|
+
ENDPROC;</syntaxhighlight>
|
3599
|
+
|
3600
|
+
=={{header|Ruby}}==
|
3601
|
+
{{works with|Ruby|1.8.4}}
|
3602
|
+
<syntaxhighlight lang="ruby">puts "Hello world!"</syntaxhighlight>
|
3603
|
+
or
|
3604
|
+
<syntaxhighlight lang="ruby">$stdout.puts "Hello world!"</syntaxhighlight>
|
3605
|
+
or even
|
3606
|
+
<syntaxhighlight lang="ruby"> STDOUT.write "Hello world!\n"</syntaxhighlight>
|
3607
|
+
|
3608
|
+
|
3609
|
+
'''Using the > global'''
|
3610
|
+
<syntaxhighlight lang="ruby">$>.puts "Hello world!"</syntaxhighlight>
|
3611
|
+
<syntaxhighlight lang="ruby">$>.write "Hello world!\n"</syntaxhighlight>
|
3612
|
+
|
3613
|
+
=={{header|Run BASIC}}==
|
3614
|
+
<syntaxhighlight lang="runbasic">print "Hello world!"</syntaxhighlight>
|
3615
|
+
|
3616
|
+
=={{header|Rust}}==
|
3617
|
+
<syntaxhighlight lang="rust">
|
3618
|
+
fn main() {
|
3619
|
+
print!("Hello world!");
|
3620
|
+
}
|
3621
|
+
</syntaxhighlight>
|
3622
|
+
|
3623
|
+
or
|
3624
|
+
|
3625
|
+
<syntaxhighlight lang="rust">
|
3626
|
+
fn main() {
|
3627
|
+
println!("Hello world!");
|
3628
|
+
}
|
3629
|
+
</syntaxhighlight>
|
3630
|
+
|
3631
|
+
=={{header|Salmon}}==
|
3632
|
+
<syntaxhighlight lang="salmon">"Hello world!"!</syntaxhighlight>
|
3633
|
+
|
3634
|
+
or
|
3635
|
+
|
3636
|
+
<syntaxhighlight lang="salmon">print("Hello world!\n");</syntaxhighlight>
|
3637
|
+
|
3638
|
+
or
|
3639
|
+
|
3640
|
+
<syntaxhighlight lang="salmon">standard_output.print("Hello world!\n");</syntaxhighlight>
|
3641
|
+
|
3642
|
+
=={{header|SAS}}==
|
3643
|
+
<syntaxhighlight lang="sas">/* Using a data step. Will print the string in the log window */
|
3644
|
+
data _null_;
|
3645
|
+
put "Hello world!";
|
3646
|
+
run;</syntaxhighlight>
|
3647
|
+
|
3648
|
+
=={{header|SASL}}==
|
3649
|
+
Note that a string starts with a single and ends with a double quote
|
3650
|
+
<syntaxhighlight lang="sasl">
|
3651
|
+
'Hello World!",nl
|
3652
|
+
</syntaxhighlight>
|
3653
|
+
|
3654
|
+
=={{header|Sather}}==
|
3655
|
+
<syntaxhighlight lang="sather">class GOODBYE_WORLD is
|
3656
|
+
main is
|
3657
|
+
#OUT+"Hello world!\n";
|
3658
|
+
end;
|
3659
|
+
end;</syntaxhighlight>
|
3660
|
+
|
3661
|
+
=={{header|Scala}}==
|
3662
|
+
{{libheader|Console}}
|
3663
|
+
===Ad hoc REPL solution===
|
3664
|
+
Ad hoc solution as [http://en.wikipedia.org/wiki/Read%E2%80%93eval%E2%80%93print_loop REPL] script. Type this in a REPL session:
|
3665
|
+
<syntaxhighlight lang="scala">println("Hello world!")</syntaxhighlight>
|
3666
|
+
===Via Java runtime===
|
3667
|
+
This is a call to the Java run-time library. '''Not recommended'''.
|
3668
|
+
<syntaxhighlight lang="scala">System.out.println("Hello world!")</syntaxhighlight>
|
3669
|
+
|
3670
|
+
===Via Scala Console API===
|
3671
|
+
This is a call to the Scala run-time library. '''Recommended'''.
|
3672
|
+
<syntaxhighlight lang="scala">println("Hello world!")</syntaxhighlight>
|
3673
|
+
|
3674
|
+
===Short term deviation to out===
|
3675
|
+
<syntaxhighlight lang="scala">Console.withErr(Console.out) { Console.err.println("This goes to default _out_") }</syntaxhighlight>
|
3676
|
+
===Long term deviation to out===
|
3677
|
+
<syntaxhighlight lang="scala"> Console.err.println ("Err not deviated")
|
3678
|
+
Console.setErr(Console.out)
|
3679
|
+
Console.err.println ("Err deviated")
|
3680
|
+
Console.setErr(Console.err) // Reset to normal</syntaxhighlight>
|
3681
|
+
|
3682
|
+
=={{header|Scheme}}==
|
3683
|
+
All Scheme implementations display the value of the last evaluated expression before the program terminates.
|
3684
|
+
<syntaxhighlight lang="scheme">"Hello world!"</syntaxhighlight>
|
3685
|
+
|
3686
|
+
The <tt>display</tt> and <tt>newline</tt> procedures are found in specific modules of the standard library in R6RS and R7RS.
|
3687
|
+
The previous standards have no concept of modules and the entirety of the standard library is loaded by default.
|
3688
|
+
|
3689
|
+
===R5RS===
|
3690
|
+
<syntaxhighlight lang="scheme">(display "Hello world!")
|
3691
|
+
(newline)</syntaxhighlight>
|
3692
|
+
|
3693
|
+
===R6RS===
|
3694
|
+
<syntaxhighlight lang="scheme">(import (rnrs base (6))
|
3695
|
+
(rnrs io simple (6)))
|
3696
|
+
(display "Hello world!")
|
3697
|
+
(newline)</syntaxhighlight>
|
3698
|
+
|
3699
|
+
===R7RS===
|
3700
|
+
<syntaxhighlight lang="scheme">(import (scheme base)
|
3701
|
+
(scheme write))
|
3702
|
+
(display "Hello world!")
|
3703
|
+
(newline)</syntaxhighlight>
|
3704
|
+
|
3705
|
+
=={{header|Scilab}}==
|
3706
|
+
<syntaxhighlight lang="scilab">disp("Hello world!");</syntaxhighlight>
|
3707
|
+
|
3708
|
+
=={{header|ScratchScript}}==
|
3709
|
+
<syntaxhighlight lang="scratchscript">print "Hello world!"</syntaxhighlight>
|
3710
|
+
This example waits until the mouse is clicked for the program to end. This can be useful if the program executes too fast for "Hello world!" to be visible on the screen long enough for it to be comfortable.
|
3711
|
+
<syntaxhighlight lang="scratchscript">print "Hello world!"
|
3712
|
+
delayOnClick</syntaxhighlight>
|
3713
|
+
|
3714
|
+
=={{header|sed}}==
|
3715
|
+
<syntaxhighlight lang="sed">i\
|
3716
|
+
Hello world!
|
3717
|
+
q</syntaxhighlight>
|
3718
|
+
|
3719
|
+
=={{header|Seed7}}==
|
3720
|
+
<syntaxhighlight lang="seed7">$ include "seed7_05.s7i";
|
3721
|
+
|
3722
|
+
const proc: main is func
|
3723
|
+
begin
|
3724
|
+
writeln("Hello world!");
|
3725
|
+
end func;</syntaxhighlight>
|
3726
|
+
|
3727
|
+
=={{header|Self}}==
|
3728
|
+
<syntaxhighlight lang="self">'Hello world!' printLine.</syntaxhighlight>
|
3729
|
+
|
3730
|
+
=={{header|SenseTalk}}==
|
3731
|
+
<syntaxhighlight lang="sensetalk">put "Hello world!"</syntaxhighlight>
|
3732
|
+
|
3733
|
+
=={{header|Set lang}}==
|
3734
|
+
<syntaxhighlight lang="set_lang">set ! H
|
3735
|
+
set ! E
|
3736
|
+
set ! L
|
3737
|
+
set ! L
|
3738
|
+
set ! O
|
3739
|
+
set ! 32
|
3740
|
+
set ! W
|
3741
|
+
set ! O
|
3742
|
+
set ! R
|
3743
|
+
set ! L
|
3744
|
+
set ! D
|
3745
|
+
set ! 33</syntaxhighlight>
|
3746
|
+
|
3747
|
+
=={{header|SETL}}==
|
3748
|
+
<syntaxhighlight lang="setl">print("Hello world!");</syntaxhighlight>
|
3749
|
+
|
3750
|
+
=={{header|SETL4}}==
|
3751
|
+
<syntaxhighlight lang="setl4">out("Hello world!");end</syntaxhighlight>
|
3752
|
+
|
3753
|
+
=={{header|Shen}}==
|
3754
|
+
<syntaxhighlight lang="shen">(output "Hello world!~%")</syntaxhighlight>
|
3755
|
+
|
3756
|
+
=={{header|Shiny}}==
|
3757
|
+
<syntaxhighlight lang="shiny">say 'Hello world!'</syntaxhighlight>
|
3758
|
+
|
3759
|
+
=={{header|Sidef}}==
|
3760
|
+
<syntaxhighlight lang="sidef">„Hello world!”.say;</syntaxhighlight>
|
3761
|
+
|
3762
|
+
=={{header|SimpleCode}}==
|
3763
|
+
The letters are only outputted in uppercase in the running program. However, lowercase characters can be used in the code instead.
|
3764
|
+
<syntaxhighlight lang="simplecode">dtxt
|
3765
|
+
Hello world!</syntaxhighlight>
|
3766
|
+
|
3767
|
+
=={{header|SIMPOL}}==
|
3768
|
+
<syntaxhighlight lang="simpol">function main()
|
3769
|
+
end function "Hello world!{d}{a}"</syntaxhighlight>
|
3770
|
+
|
3771
|
+
=={{header|Simula}}==
|
3772
|
+
{{works with|SIMULA-67}}
|
3773
|
+
<syntaxhighlight lang="simula">BEGIN
|
3774
|
+
OUTTEXT("Hello world!");
|
3775
|
+
OUTIMAGE
|
3776
|
+
END</syntaxhighlight>
|
3777
|
+
|
3778
|
+
=={{header|Sing}}==
|
3779
|
+
<syntaxhighlight lang="sing">requires "sio";
|
3780
|
+
|
3781
|
+
public fn singmain(argv [*]string) i32
|
3782
|
+
{
|
3783
|
+
sio.print("hello world !\r\n");
|
3784
|
+
return(0);
|
3785
|
+
}</syntaxhighlight>
|
3786
|
+
|
3787
|
+
=={{header|Sisal}}==
|
3788
|
+
<syntaxhighlight lang="sisal">define main
|
3789
|
+
|
3790
|
+
% Sisal doesn't yet have a string built-in.
|
3791
|
+
% Let's define one as an array of characters.
|
3792
|
+
|
3793
|
+
type string = array[character];
|
3794
|
+
|
3795
|
+
function main(returns string)
|
3796
|
+
"Hello world!"
|
3797
|
+
end function</syntaxhighlight>
|
3798
|
+
|
3799
|
+
=={{header|SkookumScript}}==
|
3800
|
+
<syntaxhighlight lang="javascript">print("Hello world!")</syntaxhighlight>
|
3801
|
+
Alternatively if just typing in the SkookumIDE [http://skookumscript.com/docs/v3.0/ide/console/workspace/ REPL]:
|
3802
|
+
<syntaxhighlight lang="javascript">"Hello world!"</syntaxhighlight>
|
3803
|
+
|
3804
|
+
=={{header|Slate}}==
|
3805
|
+
<syntaxhighlight lang="slate">inform: 'Hello world!'.</syntaxhighlight>
|
3806
|
+
|
3807
|
+
=={{header|Slope}}==
|
3808
|
+
<syntaxhighlight lang="slope">(write "Hello, world!")</syntaxhighlight>
|
3809
|
+
|
3810
|
+
=={{header|Smalltalk}}==
|
3811
|
+
<syntaxhighlight lang="smalltalk">Transcript show: 'Hello world!'; cr.</syntaxhighlight>
|
3812
|
+
|
3813
|
+
{{works with|GNU Smalltalk}} (as does the above code)
|
3814
|
+
<syntaxhighlight lang="smalltalk">'Hello world!' printNl.</syntaxhighlight>
|
3815
|
+
|
3816
|
+
=={{header|smart BASIC}}==
|
3817
|
+
<syntaxhighlight lang="qbasic">PRINT "Hello world!"</syntaxhighlight>
|
3818
|
+
|
3819
|
+
=={{header|SmileBASIC}}==
|
3820
|
+
<syntaxhighlight lang="smilebasic">PRINT "Hello world!"</syntaxhighlight>
|
3821
|
+
|
3822
|
+
=={{header|SNOBOL4}}==
|
3823
|
+
Using CSnobol4 dialect
|
3824
|
+
<syntaxhighlight lang="snobol4"> OUTPUT = "Hello world!"
|
3825
|
+
END</syntaxhighlight>
|
3826
|
+
|
3827
|
+
=={{header|SNUSP}}==
|
3828
|
+
===Core SNUSP===
|
3829
|
+
<syntaxhighlight lang="snusp">/++++!/===========?\>++.>+.+++++++..+++\
|
3830
|
+
\+++\ | /+>+++++++>/ /++++++++++<<.++>./
|
3831
|
+
$+++/ | \+++++++++>\ \+++++.>.+++.-----\
|
3832
|
+
\==-<<<<+>+++/ /=.>.+>.--------.-/</syntaxhighlight>
|
3833
|
+
|
3834
|
+
===Modular SNUSP===
|
3835
|
+
<syntaxhighlight lang="snusp">@\G.@\o.o.@\d.--b.@\y.@\e.>@\comma.@\.<-@\W.+@\o.+++r.------l.@\d.>+.! #
|
3836
|
+
| | \@------|# | \@@+@@++|+++#- \\ -
|
3837
|
+
| \@@@@=+++++# | \===--------!\===!\-----|-------#-------/
|
3838
|
+
\@@+@@@+++++# \!#+++++++++++++++++++++++#!/</syntaxhighlight>
|
3839
|
+
|
3840
|
+
=={{header|SoneKing Assembly}}==
|
3841
|
+
<syntaxhighlight lang="soneking assembly">
|
3842
|
+
extern print
|
3843
|
+
|
3844
|
+
dv Msg Goodbye,World!
|
3845
|
+
|
3846
|
+
mov eax Msg
|
3847
|
+
push
|
3848
|
+
call print
|
3849
|
+
pop
|
3850
|
+
</syntaxhighlight>
|
3851
|
+
|
3852
|
+
=={{header|SPARC Assembly}}==
|
3853
|
+
<syntaxhighlight lang="sparc">
|
3854
|
+
.section ".text"
|
3855
|
+
.global _start
|
3856
|
+
_start:
|
3857
|
+
mov 4,%g1 ! 4 is SYS_write
|
3858
|
+
mov 1,%o0 ! 1 is stdout
|
3859
|
+
set .msg,%o1 ! pointer to buffer
|
3860
|
+
mov (.msgend-.msg),%o2 ! length
|
3861
|
+
ta 8
|
3862
|
+
|
3863
|
+
mov 1,%g1 ! 1 is SYS_exit
|
3864
|
+
clr %o0 ! return status is 0
|
3865
|
+
ta 8
|
3866
|
+
|
3867
|
+
.msg:
|
3868
|
+
.ascii "Hello world!\n"
|
3869
|
+
.msgend:
|
3870
|
+
</syntaxhighlight>
|
3871
|
+
|
3872
|
+
=={{header|Sparkling}}==
|
3873
|
+
<syntaxhighlight lang="sparkling">print("Hello world!");</syntaxhighlight>
|
3874
|
+
|
3875
|
+
=={{header|SPL}}==
|
3876
|
+
<syntaxhighlight lang="spl">#.output("Hello world!")</syntaxhighlight>
|
3877
|
+
|
3878
|
+
=={{header|SQL}}==
|
3879
|
+
{{works with|Oracle}}
|
3880
|
+
{{works with|Db2 LUW}}
|
3881
|
+
<syntaxhighlight lang="sql">
|
3882
|
+
select 'Hello world!' text from dual;
|
3883
|
+
</syntaxhighlight>
|
3884
|
+
|
3885
|
+
<pre>
|
3886
|
+
SQL>select 'Hello world!' text from dual;
|
3887
|
+
TEXT
|
3888
|
+
------------
|
3889
|
+
Hello world!
|
3890
|
+
</pre>
|
3891
|
+
|
3892
|
+
=={{header|SQL PL}}==
|
3893
|
+
{{works with|Db2 LUW}}
|
3894
|
+
With SQL only:
|
3895
|
+
<syntaxhighlight lang="sql pl">
|
3896
|
+
SELECT 'Hello world!' AS text FROM sysibm.sysdummy1;
|
3897
|
+
</syntaxhighlight>
|
3898
|
+
Output:
|
3899
|
+
<pre>
|
3900
|
+
db2 -t
|
3901
|
+
db2 => SELECT 'Hello world!' AS text FROM sysibm.sysdummy1;
|
3902
|
+
|
3903
|
+
TEXT
|
3904
|
+
------------
|
3905
|
+
Hello world!
|
3906
|
+
|
3907
|
+
1 record(s) selected.
|
3908
|
+
</pre>
|
3909
|
+
|
3910
|
+
{{works with|Db2 LUW}} version 9.7 or higher.
|
3911
|
+
With SQL PL:
|
3912
|
+
<syntaxhighlight lang="sql pl">
|
3913
|
+
SET SERVEROUTPUT ON;
|
3914
|
+
|
3915
|
+
CALL DBMS_OUTPUT.PUT_LINE('Hello world!');
|
3916
|
+
</syntaxhighlight>
|
3917
|
+
Output:
|
3918
|
+
<pre>
|
3919
|
+
db2 -t
|
3920
|
+
db2 => SET SERVEROUTPUT ON
|
3921
|
+
DB20000I The SET SERVEROUTPUT command completed successfully.
|
3922
|
+
db2 => CALL DBMS_OUTPUT.PUT_LINE('Hello world!')
|
3923
|
+
|
3924
|
+
Return Status = 0
|
3925
|
+
|
3926
|
+
Hello world!
|
3927
|
+
</pre>
|
3928
|
+
|
3929
|
+
=={{header|Standard ML}}==
|
3930
|
+
<syntaxhighlight lang="sml">print "Hello world!\n"</syntaxhighlight>
|
3931
|
+
|
3932
|
+
=={{header|Stata}}==
|
3933
|
+
<syntaxhighlight lang="stata">display "Hello world!"</syntaxhighlight>
|
3934
|
+
|
3935
|
+
=={{header|Suneido}}==
|
3936
|
+
<syntaxhighlight lang="suneido">Print("Hello world!")</syntaxhighlight>
|
3937
|
+
|
3938
|
+
=={{header|Swahili}}==
|
3939
|
+
<syntaxhighlight lang="swahili">andika("Hello world!")</syntaxhighlight>
|
3940
|
+
|
3941
|
+
=={{header|Swift}}==
|
3942
|
+
{{works with|Swift|2.x+}}
|
3943
|
+
<syntaxhighlight lang="swift">print("Hello world!")</syntaxhighlight>
|
3944
|
+
{{works with|Swift|1.x}}
|
3945
|
+
<syntaxhighlight lang="swift">println("Hello world!")</syntaxhighlight>
|
3946
|
+
|
3947
|
+
=={{header|Symsyn}}==
|
3948
|
+
<syntaxhighlight lang="symsyn">
|
3949
|
+
'hello world' []
|
3950
|
+
</syntaxhighlight>
|
3951
|
+
|
3952
|
+
=={{header|Tailspin}}==
|
3953
|
+
<syntaxhighlight lang="tailspin">'Hello World' -> !OUT::write</syntaxhighlight>
|
3954
|
+
|
3955
|
+
=={{header|Tcl}}==
|
3956
|
+
Output to terminal:
|
3957
|
+
<syntaxhighlight lang="tcl">puts stdout {Hello world!}</syntaxhighlight>
|
3958
|
+
|
3959
|
+
Output to arbitrary open, writable file:
|
3960
|
+
<syntaxhighlight lang="tcl">puts $fileID {Hello world!}</syntaxhighlight>
|
3961
|
+
|
3962
|
+
=={{header|Teco}}==
|
3963
|
+
Outputting to terminal. Please note that ^A means control-A, not a caret followed by 'A', and that $ represent the ESC key.
|
3964
|
+
<syntaxhighlight lang="teco">^AHello world!^A$$</syntaxhighlight>
|
3965
|
+
|
3966
|
+
=={{header|Tern}}==
|
3967
|
+
<syntaxhighlight lang="tern">println("Hello world!");</syntaxhighlight>
|
3968
|
+
|
3969
|
+
=={{header|Terra}}==
|
3970
|
+
<syntaxhighlight lang="terra">C = terralib.includec("stdio.h")
|
3971
|
+
|
3972
|
+
terra hello(argc : int, argv : &rawstring)
|
3973
|
+
C.printf("Hello world!\n")
|
3974
|
+
return 0
|
3975
|
+
end</syntaxhighlight>
|
3976
|
+
|
3977
|
+
=={{header|Terraform}}==
|
3978
|
+
<syntaxhighlight lang="hcl">output "result" {
|
3979
|
+
value = "Hello world!"
|
3980
|
+
}</syntaxhighlight>
|
3981
|
+
{{Out}}
|
3982
|
+
<pre>$ terraform init
|
3983
|
+
$ terraform apply
|
3984
|
+
|
3985
|
+
Apply complete! Resources: 0 added, 0 changed, 0 destroyed.
|
3986
|
+
|
3987
|
+
Outputs:
|
3988
|
+
|
3989
|
+
result = Hello world!
|
3990
|
+
$ terraform output result
|
3991
|
+
Hello world!</pre>
|
3992
|
+
|
3993
|
+
=={{header|TestML}}==
|
3994
|
+
<syntaxhighlight lang="testml">%TestML 0.1.0
|
3995
|
+
Print("Hello world!")</syntaxhighlight>
|
3996
|
+
|
3997
|
+
=={{header|TI-83 BASIC}}==
|
3998
|
+
<syntaxhighlight lang="ti83b">Disp "Hello world!</syntaxhighlight>
|
3999
|
+
(Lowercase letters DO exist in TI-BASIC, though you need an assembly program to enable them.)
|
4000
|
+
|
4001
|
+
=={{header|TI-89 BASIC}}==
|
4002
|
+
<syntaxhighlight lang="ti89b">Disp "Hello world!"</syntaxhighlight>
|
4003
|
+
|
4004
|
+
=={{header|Tiny BASIC}}==
|
4005
|
+
{{works with|TinyBasic}}
|
4006
|
+
<syntaxhighlight lang="basic">
|
4007
|
+
10 PRINT "Hello, World!"
|
4008
|
+
20 END
|
4009
|
+
</syntaxhighlight>
|
4010
|
+
|
4011
|
+
=={{header|TMG}}==
|
4012
|
+
Unix TMG:
|
4013
|
+
<syntaxhighlight lang="tqs">begin: parse(( = { <Hello, World!> * } ));</syntaxhighlight>
|
4014
|
+
|
4015
|
+
=={{header|TorqueScript}}==
|
4016
|
+
<syntaxhighlight lang="tqs">echo("Hello world!");</syntaxhighlight>
|
4017
|
+
|
4018
|
+
=={{header|TPP}}==
|
4019
|
+
<syntaxhighlight lang="tpp">Hello world!</syntaxhighlight>
|
4020
|
+
|
4021
|
+
=={{header|Transact-SQL}}==
|
4022
|
+
|
4023
|
+
<syntaxhighlight lang="sql">PRINT "Hello world!"</syntaxhighlight>
|
4024
|
+
|
4025
|
+
=={{header|Transd}}==
|
4026
|
+
|
4027
|
+
<syntaxhighlight lang="scheme">(textout "Hello, World!")</syntaxhighlight>
|
4028
|
+
|
4029
|
+
=={{header|TransFORTH}}==
|
4030
|
+
<syntaxhighlight lang="forth">PRINT " Hello world! "</syntaxhighlight>
|
4031
|
+
|
4032
|
+
=={{header|Trith}}==
|
4033
|
+
<syntaxhighlight lang="trith">"Hello world!" print</syntaxhighlight>
|
4034
|
+
|
4035
|
+
=={{header|True BASIC}}==
|
4036
|
+
<syntaxhighlight lang="truebasic">
|
4037
|
+
! In True BASIC all programs run in their own window. So this is almost a graphical version.
|
4038
|
+
PRINT "Hello world!"
|
4039
|
+
END
|
4040
|
+
</syntaxhighlight>
|
4041
|
+
|
4042
|
+
=={{header|TUSCRIPT}}==
|
4043
|
+
<syntaxhighlight lang="tuscript">
|
4044
|
+
$$ MODE TUSCRIPT
|
4045
|
+
PRINT "Hello world!"
|
4046
|
+
</syntaxhighlight>
|
4047
|
+
Output:
|
4048
|
+
<pre>
|
4049
|
+
Hello world!
|
4050
|
+
</pre>
|
4051
|
+
|
4052
|
+
=={{header|uBasic/4tH}}==
|
4053
|
+
<syntaxhighlight lang="text">Print "Hello world!"</syntaxhighlight>
|
4054
|
+
=={{header|Uniface}}==
|
4055
|
+
<syntaxhighlight lang="uniface">
|
4056
|
+
message "Hello world!"
|
4057
|
+
</syntaxhighlight>
|
4058
|
+
|
4059
|
+
=={{header|Unison}}==
|
4060
|
+
<syntaxhighlight lang="unison">
|
4061
|
+
main = '(printLine "Hello world!")
|
4062
|
+
</syntaxhighlight>
|
4063
|
+
|
4064
|
+
=={{header|UNIX Shell}}==
|
4065
|
+
{{works with|Bourne Shell}}
|
4066
|
+
<syntaxhighlight lang="bash">#!/bin/sh
|
4067
|
+
echo "Hello world!"</syntaxhighlight>
|
4068
|
+
|
4069
|
+
==={{header|C Shell}}===
|
4070
|
+
<syntaxhighlight lang="csh">#!/bin/csh -f
|
4071
|
+
echo "Hello world!\!"</syntaxhighlight>
|
4072
|
+
|
4073
|
+
We use \! to prevent history substitution. Plain ! at end of string seems to be safe, but we use \! to be sure.
|
4074
|
+
|
4075
|
+
=={{header|Unlambda}}==
|
4076
|
+
<syntaxhighlight lang="unlambda">`r```````````````.G.o.o.d.b.y.e.,. .W.o.r.l.d.!i</syntaxhighlight>
|
4077
|
+
|
4078
|
+
=={{header|Ursa}}==
|
4079
|
+
<syntaxhighlight lang="ursa">out "hello world!" endl console</syntaxhighlight>
|
4080
|
+
|
4081
|
+
=={{header|Ursala}}==
|
4082
|
+
output as a side effect of compilation
|
4083
|
+
<syntaxhighlight lang="ursala">#show+
|
4084
|
+
|
4085
|
+
main = -[Hello world!]-</syntaxhighlight>
|
4086
|
+
output by a compiled executable
|
4087
|
+
<syntaxhighlight lang="ursala">#import std
|
4088
|
+
|
4089
|
+
#executable ('parameterized','')
|
4090
|
+
|
4091
|
+
main = <file[contents: -[Hello world!]-]>!</syntaxhighlight>
|
4092
|
+
|
4093
|
+
=={{header|உயிர்/Uyir}}==
|
4094
|
+
<syntaxhighlight lang="உயிர்/uyir">முதன்மை என்பதின் வகை எண் பணி {{
|
4095
|
+
("உலகத்தோருக்கு வணக்கம்") என்பதை திரை.இடு;
|
4096
|
+
|
4097
|
+
முதன்மை = 0;
|
4098
|
+
}};</syntaxhighlight>
|
4099
|
+
|
4100
|
+
=={{header|V}}==
|
4101
|
+
<syntaxhighlight lang="v">"Hello world!" puts</syntaxhighlight>
|
4102
|
+
|
4103
|
+
=={{header|Vala}}==
|
4104
|
+
<syntaxhighlight lang="vala">void main(){
|
4105
|
+
stdout.printf("Hello world!\n");
|
4106
|
+
}</syntaxhighlight>
|
4107
|
+
|
4108
|
+
=={{header|VAX Assembly}}==
|
4109
|
+
|
4110
|
+
<syntaxhighlight lang="vax assembly">
|
4111
|
+
desc: .ascid "Hello World!" ;descriptor (len+addr) and text
|
4112
|
+
.entry hello, ^m<> ;register save mask
|
4113
|
+
pushaq desc ;address of descriptor
|
4114
|
+
calls #1, g^lib$put_output ;call with one argument on stack
|
4115
|
+
ret ;restore registers, clean stack & return
|
4116
|
+
.end hello ;transfer address for linker
|
4117
|
+
</syntaxhighlight>
|
4118
|
+
|
4119
|
+
|
4120
|
+
=={{header|VBA}}==
|
4121
|
+
<syntaxhighlight lang="vb">
|
4122
|
+
Public Sub hello_world_text
|
4123
|
+
Debug.Print "Hello World!"
|
4124
|
+
End Sub
|
4125
|
+
</syntaxhighlight>
|
4126
|
+
|
4127
|
+
|
4128
|
+
=={{header|VBScript}}==
|
4129
|
+
{{works with|Windows Script Host|5.7}}
|
4130
|
+
<syntaxhighlight lang="vbscript">WScript.Echo "Hello world!"</syntaxhighlight>
|
4131
|
+
|
4132
|
+
=={{header|Vedit macro language}}==
|
4133
|
+
<syntaxhighlight lang="vedit">Message("Hello world!")</syntaxhighlight>
|
4134
|
+
|
4135
|
+
=={{header|Verbexx}}==
|
4136
|
+
<syntaxhighlight lang="verbexx">@SAY "Hello world!";</syntaxhighlight>
|
4137
|
+
|
4138
|
+
|
4139
|
+
=={{header|Verilog}}==
|
4140
|
+
<syntaxhighlight lang="verilog">
|
4141
|
+
module main;
|
4142
|
+
initial begin
|
4143
|
+
$display("Hello world!");
|
4144
|
+
$finish ;
|
4145
|
+
end
|
4146
|
+
endmodule
|
4147
|
+
</syntaxhighlight>
|
4148
|
+
|
4149
|
+
=={{header|VHDL}}==
|
4150
|
+
<syntaxhighlight lang="vhdl">LIBRARY std;
|
4151
|
+
USE std.TEXTIO.all;
|
4152
|
+
|
4153
|
+
entity test is
|
4154
|
+
end entity test;
|
4155
|
+
|
4156
|
+
architecture beh of test is
|
4157
|
+
begin
|
4158
|
+
process
|
4159
|
+
variable line_out : line;
|
4160
|
+
begin
|
4161
|
+
write(line_out, string'("Hello world!"));
|
4162
|
+
writeline(OUTPUT, line_out);
|
4163
|
+
wait; -- needed to stop the execution
|
4164
|
+
end process;
|
4165
|
+
end architecture beh;</syntaxhighlight>
|
4166
|
+
|
4167
|
+
=={{header|Vim Script}}==
|
4168
|
+
<syntaxhighlight lang="vim">echo "Hello world!\n"</syntaxhighlight>
|
4169
|
+
|
4170
|
+
=={{header|Visual Basic}}==
|
4171
|
+
{{Libheader|Microsoft.Scripting}}
|
4172
|
+
{{works with|Visual Basic|VB6 Standard}}
|
4173
|
+
Visual Basic 6 is actually designed to create GUI applications, however with a little help from the Microsoft.Scripting Library it is fairly easy to write a simple console application.
|
4174
|
+
<syntaxhighlight lang="vb">Option Explicit
|
4175
|
+
|
4176
|
+
Private Declare Function AllocConsole Lib "kernel32.dll" () As Long
|
4177
|
+
Private Declare Function FreeConsole Lib "kernel32.dll" () As Long
|
4178
|
+
'needs a reference set to "Microsoft Scripting Runtime" (scrrun.dll)
|
4179
|
+
|
4180
|
+
Sub Main()
|
4181
|
+
Call AllocConsole
|
4182
|
+
Dim mFSO As Scripting.FileSystemObject
|
4183
|
+
Dim mStdIn As Scripting.TextStream
|
4184
|
+
Dim mStdOut As Scripting.TextStream
|
4185
|
+
Set mFSO = New Scripting.FileSystemObject
|
4186
|
+
Set mStdIn = mFSO.GetStandardStream(StdIn)
|
4187
|
+
Set mStdOut = mFSO.GetStandardStream(StdOut)
|
4188
|
+
mStdOut.Write "Hello world!" & vbNewLine
|
4189
|
+
mStdOut.Write "press enter to quit program."
|
4190
|
+
mStdIn.Read 1
|
4191
|
+
Call FreeConsole
|
4192
|
+
End Sub</syntaxhighlight>
|
4193
|
+
|
4194
|
+
=={{header|Visual Basic .NET}}==
|
4195
|
+
<syntaxhighlight lang="vb">Imports System
|
4196
|
+
|
4197
|
+
Module HelloWorld
|
4198
|
+
Sub Main()
|
4199
|
+
Console.WriteLine("Hello world!")
|
4200
|
+
End Sub
|
4201
|
+
End Module</syntaxhighlight>
|
4202
|
+
|
4203
|
+
=={{header|Viua VM assembly}}==
|
4204
|
+
<syntaxhighlight lang="text">.function: main/0
|
4205
|
+
text %1 local "Hello World!"
|
4206
|
+
print %1 local
|
4207
|
+
izero %0 local
|
4208
|
+
return
|
4209
|
+
.end</syntaxhighlight>
|
4210
|
+
|
4211
|
+
=={{header|V (Vlang)}}==
|
4212
|
+
<syntaxhighlight lang="go">fn main() {
|
4213
|
+
println('Hello World!')
|
4214
|
+
}</syntaxhighlight>
|
4215
|
+
|
4216
|
+
=={{header|VTL-2}}==
|
4217
|
+
<syntaxhighlight lang="vtl-2">10 ?="Hello world!"</syntaxhighlight>
|
4218
|
+
|
4219
|
+
=={{header|Wart}}==
|
4220
|
+
|
4221
|
+
<syntaxhighlight lang="wart">prn "Hello world!"</syntaxhighlight>
|
4222
|
+
|
4223
|
+
=={{header|WDTE}}==
|
4224
|
+
<syntaxhighlight lang="wdte">io.writeln io.stdout 'Hello world!';</syntaxhighlight>
|
4225
|
+
|
4226
|
+
=={{header|WebAssembly}}==
|
4227
|
+
|
4228
|
+
{{libheader|WASI}}
|
4229
|
+
<syntaxhighlight lang="webassembly">(module $helloworld
|
4230
|
+
|
4231
|
+
;;Import fd_write from WASI, declaring that it takes 4 i32 inputs and returns 1 i32 value
|
4232
|
+
(import "wasi_unstable" "fd_write"
|
4233
|
+
(func $fd_write (param i32 i32 i32 i32) (result i32))
|
4234
|
+
)
|
4235
|
+
|
4236
|
+
;;Declare initial memory size of 32 bytes
|
4237
|
+
(memory 32)
|
4238
|
+
|
4239
|
+
;;Export memory so external functions can see it
|
4240
|
+
(export "memory" (memory 0))
|
4241
|
+
|
4242
|
+
;;Declare test data starting at address 8
|
4243
|
+
(data (i32.const 8) "Hello world!\n")
|
4244
|
+
|
4245
|
+
;;The entry point for WASI is called _start
|
4246
|
+
(func $main (export "_start")
|
4247
|
+
|
4248
|
+
;;Write the start address of the string to address 0
|
4249
|
+
(i32.store (i32.const 0) (i32.const 8))
|
4250
|
+
|
4251
|
+
;;Write the length of the string to address 4
|
4252
|
+
(i32.store (i32.const 4) (i32.const 13))
|
4253
|
+
|
4254
|
+
;;Call fd_write to print to console
|
4255
|
+
(call $fd_write
|
4256
|
+
(i32.const 1) ;;Value of 1 corresponds to stdout
|
4257
|
+
(i32.const 0) ;;The location in memory of the string pointer
|
4258
|
+
(i32.const 1) ;;Number of strings to output
|
4259
|
+
(i32.const 24) ;;Address to write number of bytes written
|
4260
|
+
)
|
4261
|
+
drop ;;Ignore return code
|
4262
|
+
)
|
4263
|
+
)
|
4264
|
+
</syntaxhighlight>
|
4265
|
+
|
4266
|
+
=={{header|Wee Basic}}==
|
4267
|
+
<syntaxhighlight lang="wee basic">print 1 "Hello world!"
|
4268
|
+
end</syntaxhighlight>
|
4269
|
+
|
4270
|
+
=={{header|Whenever}}==
|
4271
|
+
|
4272
|
+
<syntaxhighlight lang="whenever">1 print("Hello world!");</syntaxhighlight>
|
4273
|
+
|
4274
|
+
=={{header|Whiley}}==
|
4275
|
+
|
4276
|
+
<syntaxhighlight lang="whiley">import whiley.lang.System
|
4277
|
+
|
4278
|
+
method main(System.Console console):
|
4279
|
+
console.out.println("Hello world!")</syntaxhighlight>
|
4280
|
+
|
4281
|
+
=={{header|Whitespace}}==
|
4282
|
+
There is a "Hello World" - example-program on the [http://compsoc.dur.ac.uk/whitespace/hworld.ws Whitespace-website]
|
4283
|
+
|
4284
|
+
=={{header|Wisp}}==
|
4285
|
+
Output in Wisp follows the same concepts as [[Scheme]], but replacing outer parentheses with indentation.
|
4286
|
+
|
4287
|
+
With [[Guile]] and wisp installed, this example can be tested in a REPL started with guile --language=wisp, or directly with the command wisp.
|
4288
|
+
|
4289
|
+
<syntaxhighlight lang="wisp">import : scheme base
|
4290
|
+
scheme write
|
4291
|
+
display "Hello world!"
|
4292
|
+
newline</syntaxhighlight>
|
4293
|
+
|
4294
|
+
=={{header|Wolfram Language}}==
|
4295
|
+
<syntaxhighlight lang="wolfram">Print["Hello world!"]</syntaxhighlight>
|
4296
|
+
|
4297
|
+
=={{header|Wren}}==
|
4298
|
+
<syntaxhighlight lang="ecmascript">System.print("Hello world!")</syntaxhighlight>
|
4299
|
+
|
4300
|
+
=={{header|X10}}==
|
4301
|
+
<syntaxhighlight lang="x10">class HelloWorld {
|
4302
|
+
public static def main(args:Rail[String]):void {
|
4303
|
+
if (args.size < 1) {
|
4304
|
+
Console.OUT.println("Hello world!");
|
4305
|
+
return;
|
4306
|
+
}
|
4307
|
+
}
|
4308
|
+
}</syntaxhighlight>
|
4309
|
+
|
4310
|
+
=={{header|X86 Assembly}}==
|
4311
|
+
{{works with|nasm|2.05.01}}
|
4312
|
+
|
4313
|
+
This is known to work on Linux, it may or may not work on other Unix-like systems
|
4314
|
+
|
4315
|
+
Prints "Hello world!" to stdout (and there is probably an even simpler version):
|
4316
|
+
<syntaxhighlight lang="asm">section .data
|
4317
|
+
msg db 'Hello world!', 0AH
|
4318
|
+
len equ $-msg
|
4319
|
+
|
4320
|
+
section .text
|
4321
|
+
global _start
|
4322
|
+
_start: mov edx, len
|
4323
|
+
mov ecx, msg
|
4324
|
+
mov ebx, 1
|
4325
|
+
mov eax, 4
|
4326
|
+
int 80h
|
4327
|
+
|
4328
|
+
mov ebx, 0
|
4329
|
+
mov eax, 1
|
4330
|
+
int 80h</syntaxhighlight>
|
4331
|
+
|
4332
|
+
'''AT&T syntax:''' works with gcc (version 4.9.2) and gas (version 2.5):
|
4333
|
+
|
4334
|
+
<syntaxhighlight lang="asm">.section .text
|
4335
|
+
|
4336
|
+
.globl main
|
4337
|
+
|
4338
|
+
main:
|
4339
|
+
movl $4,%eax #syscall number 4
|
4340
|
+
movl $1,%ebx #number 1 for stdout
|
4341
|
+
movl $str,%ecx #string pointer
|
4342
|
+
movl $16,%edx #number of bytes
|
4343
|
+
int $0x80 #syscall interrupt
|
4344
|
+
ret
|
4345
|
+
|
4346
|
+
.section .data
|
4347
|
+
str: .ascii "Hello world!\12"</syntaxhighlight>
|
4348
|
+
|
4349
|
+
=={{header|X86-64 Assembly}}==
|
4350
|
+
===UASM===
|
4351
|
+
<syntaxhighlight lang="asm">
|
4352
|
+
option casemap:none
|
4353
|
+
if @Platform eq 1
|
4354
|
+
option dllimport:<kernel32>
|
4355
|
+
ExitProcess proto :dword
|
4356
|
+
option dllimport:none
|
4357
|
+
exit equ ExitProcess
|
4358
|
+
endif
|
4359
|
+
printf proto :qword, :vararg
|
4360
|
+
exit proto :dword
|
4361
|
+
|
4362
|
+
.code
|
4363
|
+
main proc
|
4364
|
+
invoke printf, CSTR("Goodbye, World!",10)
|
4365
|
+
invoke exit, 0
|
4366
|
+
ret
|
4367
|
+
main endp
|
4368
|
+
end
|
4369
|
+
</syntaxhighlight>
|
4370
|
+
===AT&T syntax (Gas)===
|
4371
|
+
<syntaxhighlight lang="asm">// No "main" used
|
4372
|
+
// compile with `gcc -nostdlib`
|
4373
|
+
#define SYS_WRITE $1
|
4374
|
+
#define STDOUT $1
|
4375
|
+
#define SYS_EXIT $60
|
4376
|
+
#define MSGLEN $14
|
4377
|
+
|
4378
|
+
.global _start
|
4379
|
+
.text
|
4380
|
+
|
4381
|
+
_start:
|
4382
|
+
movq $message, %rsi // char *
|
4383
|
+
movq SYS_WRITE, %rax
|
4384
|
+
movq STDOUT, %rdi
|
4385
|
+
movq MSGLEN, %rdx
|
4386
|
+
syscall // sys_write(message, stdout, 0x14);
|
4387
|
+
|
4388
|
+
movq SYS_EXIT, %rax
|
4389
|
+
xorq %rdi, %rdi // The exit code.
|
4390
|
+
syscall // exit(0)
|
4391
|
+
|
4392
|
+
.data
|
4393
|
+
message: .ascii "Hello, world!\n"</syntaxhighlight>
|
4394
|
+
|
4395
|
+
=={{header|XBasic}}==
|
4396
|
+
{{works with|Windows XBasic}}
|
4397
|
+
<syntaxhighlight lang="xbasic">
|
4398
|
+
PROGRAM "hello"
|
4399
|
+
VERSION "0.0003"
|
4400
|
+
|
4401
|
+
DECLARE FUNCTION Entry()
|
4402
|
+
|
4403
|
+
FUNCTION Entry()
|
4404
|
+
PRINT "Hello World"
|
4405
|
+
END FUNCTION
|
4406
|
+
END PROGRAM
|
4407
|
+
</syntaxhighlight>
|
4408
|
+
|
4409
|
+
=={{header|xEec}}==
|
4410
|
+
<syntaxhighlight lang="xeec">
|
4411
|
+
h#10 h$! h$d h$l h$r h$o h$w h#32
|
4412
|
+
h$o h$l h$l h$e h$H >o o$ p jno
|
4413
|
+
</syntaxhighlight>
|
4414
|
+
|
4415
|
+
=={{header|XL}}==
|
4416
|
+
<syntaxhighlight lang="xl">use XL.UI.CONSOLE
|
4417
|
+
WriteLn "Hello world!"</syntaxhighlight>
|
4418
|
+
|
4419
|
+
=={{header|XLISP}}==
|
4420
|
+
<syntaxhighlight lang="xlisp">(DISPLAY "Hello world!")
|
4421
|
+
(NEWLINE)</syntaxhighlight>
|
4422
|
+
|
4423
|
+
=={{header|XPL0}}==
|
4424
|
+
<syntaxhighlight lang="xpl0">code Text=12;
|
4425
|
+
Text(0, "Hello world!
|
4426
|
+
")</syntaxhighlight>
|
4427
|
+
|
4428
|
+
=={{header|XPath}}==
|
4429
|
+
<syntaxhighlight lang="xpath">'Hello world&#xA;'</syntaxhighlight>
|
4430
|
+
|
4431
|
+
=={{header|XSLT}}==
|
4432
|
+
With a literal newline:
|
4433
|
+
<syntaxhighlight lang="xml"><xsl:text>Hello world!
|
4434
|
+
</xsl:text></syntaxhighlight>
|
4435
|
+
Or, with an explicit newline:
|
4436
|
+
<syntaxhighlight lang="xml"><xsl:text>Hello world!&#xA;</xsl:text></syntaxhighlight>
|
4437
|
+
|
4438
|
+
=={{header|Yabasic}}==
|
4439
|
+
<syntaxhighlight lang="yabasic">
|
4440
|
+
print "Hello world!"
|
4441
|
+
</syntaxhighlight>
|
4442
|
+
|
4443
|
+
=={{header|Yorick}}==
|
4444
|
+
<syntaxhighlight lang="yorick">write, "Hello world!"</syntaxhighlight>
|
4445
|
+
|
4446
|
+
=={{header|Z80 Assembly}}==
|
4447
|
+
|
4448
|
+
Using the Amstrad CPC firmware:
|
4449
|
+
|
4450
|
+
<syntaxhighlight lang="z80">org $4000
|
4451
|
+
|
4452
|
+
txt_output: equ $bb5a
|
4453
|
+
|
4454
|
+
push hl
|
4455
|
+
ld hl,world
|
4456
|
+
|
4457
|
+
print: ld a,(hl)
|
4458
|
+
cp 0
|
4459
|
+
jr z,end
|
4460
|
+
call txt_output
|
4461
|
+
inc hl
|
4462
|
+
jr print
|
4463
|
+
|
4464
|
+
end: pop hl
|
4465
|
+
ret
|
4466
|
+
|
4467
|
+
world: defm "Hello world!\r\n\0"</syntaxhighlight>
|
4468
|
+
|
4469
|
+
=={{header|zkl}}==
|
4470
|
+
<syntaxhighlight lang="zkl">println("Hello world!");</syntaxhighlight>
|
4471
|
+
{{omit from|VBA|VBA can't write or output to console}}
|
4472
|
+
|
4473
|
+
=={{header|Zig}}==
|
4474
|
+
<syntaxhighlight lang="zig">const std = @import("std");
|
4475
|
+
pub fn main() !void {
|
4476
|
+
try std.io.getStdOut().writer().writeAll("Hello world!\n");
|
4477
|
+
}</syntaxhighlight>
|
4478
|
+
|
4479
|
+
=={{header|Zoea}}==
|
4480
|
+
<syntaxhighlight lang="zoea">program: hello_world
|
4481
|
+
output: "Hello world!"</syntaxhighlight>
|
4482
|
+
|
4483
|
+
=={{header|Zoea Visual}}==
|
4484
|
+
[http://zoea.co.uk/examples/zv-rc/Hello_world.png Hello World]
|
4485
|
+
|
4486
|
+
=={{header|Zoomscript}}==
|
4487
|
+
For typing:
|
4488
|
+
<syntaxhighlight lang="zoomscript">print "Hello world!"</syntaxhighlight>
|
4489
|
+
For importing:
|
4490
|
+
|
4491
|
+
¶0¶print "Hello world!"
|
4492
|
+
|
4493
|
+
=={{header|ZX Spectrum Basic}}==
|
4494
|
+
<syntaxhighlight lang="zxbasic">10 print "Hello world!"</syntaxhighlight></text>
|
4495
|
+
<sha1>pvejvhhj3r3js3coyflyl113kmxoycz</sha1>
|
4496
|
+
</revision>
|
4497
|
+
</page>
|
4498
|
+
</mediawiki>
|