Hello world/Newline omission: Difference between revisions

m
 
(38 intermediate revisions by 22 users not shown)
Line 16:
 
=={{header|11l}}==
<langsyntaxhighlight lang="11l">print(‘Goodbye, World!’, end' ‘’)</langsyntaxhighlight>
 
=={{header|68000 Assembly}}==
Line 22:
 
Code is called as a subroutine, taking <code>A0</code> as its argument (e.g. <code>LEA myString,A0 JSR PrintString</code>). The hardware-specific <code>PrintChar</code> routine is left unimplemented.
<langsyntaxhighlight lang="68000devpac">PrintString:
;input: A0 = source address
;outputs to screen.
Line 39:
myString:
DC.B "Goodbye, World!",0
EVEN</langsyntaxhighlight>
 
=={{header|ACL2}}==
<langsyntaxhighlight lang="lisp">(cw "Goodbye, World!")</langsyntaxhighlight>
 
=={{header|Action!}}==
<langsyntaxhighlight Actionlang="action!">PROC Main()
Print("Goodbye, World!")
RETURN</langsyntaxhighlight>
{{out}}
[https://gitlab.com/amarok8bit/action-rosetta-code/-/raw/master/images/Newline_omission.png Screenshot from Atari 8-bit computer]
Line 56:
=={{header|Ada}}==
This example will implicitly include a final, implementation defined, terminator (usually a linefeed) if the output is a file (RM A.10.7-8) such as <code>stdout</code> on UNIX systems.
<langsyntaxhighlight lang="ada">
with Ada.Text_IO;
 
Line 63:
Ada.Text_IO.Put("Goodbye, World!");
end Goodbye_World;
</syntaxhighlight>
</lang>
Using <code>Ada.Text_IO.Text_Streams</code> instead allows us to control the termination.
<langsyntaxhighlight lang="ada">
with Ada.Text_IO;
with Ada.Text_IO.Text_Streams;
Line 74:
String'Write(Ada.Text_IO.Text_Streams.Stream(stdout), "Goodbye World");
end Goodbye_World;
</syntaxhighlight>
</lang>
 
=={{header|Agena}}==
<langsyntaxhighlight lang="agena">io.write( "Goodbye, World!" )</langsyntaxhighlight>
 
=={{header|ALGOL 68}}==
This works with Algol68 Genie 2.8.2 and above. Earlier versions appended a gratuitous newline on unflushed output when the program terminated.
<langsyntaxhighlight lang="algol68">BEGIN
print ("Goodbye, World!")
END</langsyntaxhighlight>
 
=={{header|Arturo}}==
<langsyntaxhighlight lang="arturo">prints "Goodbye, World!"</langsyntaxhighlight>
 
{{out}}
Line 93:
 
=={{header|ATS}}==
<langsyntaxhighlight ATSlang="ats">implement main0 () = print "Goodbye, World!"</langsyntaxhighlight>
 
=={{header|AutoHotkey}}==
<langsyntaxhighlight AHKlang="ahk">DllCall("AllocConsole")
FileAppend, Goodbye`, World!, CONOUT$ ; No newline outputted
MsgBox</langsyntaxhighlight>
 
=={{header|AutoIt}}==
<syntaxhighlight lang="autoit">
<lang AutoIt>
ConsoleWrite("Goodbye, World!")
</syntaxhighlight>
</lang>
 
=={{header|AWK}}==
<syntaxhighlight lang="awk">
<lang AWK>
BEGIN { printf("Goodbye, World!") }
</syntaxhighlight>
</lang>
 
=={{header|Axe}}==
<langsyntaxhighlight lang="axe">Disp "Goodbye, World!"</langsyntaxhighlight>
 
=={{header|B}}==
{{works with|The Amsterdam Compiler Kit - B|V6.1pre1}}
<langsyntaxhighlight Blang="b">main()
{
putstr("Goodbye, World!");
return(0);
}</langsyntaxhighlight>
 
=={{header|BASIC}}==
<langsyntaxhighlight lang="basic">10 REM The trailing semicolon prevents a newline
20 PRINT "Goodbye, World!";</langsyntaxhighlight>
 
==={{header|BaCon}}===
BaCon supports BASIC PRINT ending with trailing semicolon to prevent a newline and also supports a FORMAT clause that uses ''printf'' specifications and special character escapes (with no \n, there is no newline).
<langsyntaxhighlight lang="freebasic">PRINT "Goodbye, World!";
PRINT "Goodbye, World!" FORMAT "%s"</langsyntaxhighlight>
 
==={{header|Applesoft BASIC}}===
<langsyntaxhighlight ApplesoftBasiclang="applesoftbasic">PRINT "GOODBYE, WORLD!";</langsyntaxhighlight>
 
==={{header|Chipmunk Basic}}===
{{works with|Chipmunk Basic|3.6.4}}
<syntaxhighlight lang="qbasic">print "Goodbye, World!"; '' the trailing semi-colon suppresses the new line</syntaxhighlight>
 
==={{header|Commodore BASIC}}===
<langsyntaxhighlight lang="basic">10 print chr$(14) : rem Switch to lower+uppercase character set
20 print "Goodbye, World!";
30 rem * If we end this program here, we will not see the effect because
Line 140 ⟶ 144:
50 rem * So, we just print additional message...
60 print "(End of the world)"
70 end</langsyntaxhighlight>
{{out}}
'''Output:'''
<pre>Goodbye, World!(End of the world)
<pre>
Goodbye, World!(End of the world)
 
ready.</pre>
</pre>
 
==={{header|BASIC256}}===
Output all on a single line.
<langsyntaxhighlight BASIC256lang="basic256">print "Goodbye,";
print " ";
print "World!";</langsyntaxhighlight>
 
==={{header|GW-BASIC}}===
{{works with|BASICA}}
<syntaxhighlight lang="qbasic">10 PRINT "Goodbye, World!"; '' the trailing semi-colon suppresses the new line</syntaxhighlight>
 
==={{header|IS-BASIC}}===
<langsyntaxhighlight IS-BASIClang="qbasic">10 PRINT "Goodbye, World! ";</langsyntaxhighlight>
 
==={{header|Minimal BASIC}}===
<syntaxhighlight lang="qbasic">10 PRINT "Goodbye, World!"; : REM the trailing semi-colon suppresses the new line
20 END</syntaxhighlight>
 
==={{header|MSX Basic}}===
<syntaxhighlight lang="qbasic">10 PRINT "Goodbye, World!"; : REM the trailing semi-colon suppresses the new line</syntaxhighlight>
 
==={{header|QBasic}}===
Line 162 ⟶ 175:
{{works with|Yabasic}}
A trailing semicolon prevents a newline
<langsyntaxhighlight lang="qbasic">PRINT "Goodbye, World!";
END</langsyntaxhighlight>
 
==={{header|Quite BASIC}}===
<syntaxhighlight lang="qbasic">10 PRINT "Goodbye, World!"; : REM the trailing semi-colon suppresses the new line</syntaxhighlight>
 
==={{header|True BASIC}}===
Line 170 ⟶ 186:
{{works with|Yabasic}}
A trailing semicolon prevents a newline
<langsyntaxhighlight lang="qbasic">PRINT "Goodbye, World!";
END</langsyntaxhighlight>
 
==={{header|XBasic}}===
<syntaxhighlight lang="qbasic">PROGRAM "helloworld"
VERSION "0.0000"
 
DECLARE FUNCTION Entry ()
 
FUNCTION Entry ()
PRINT "Goodbye, World!";
END FUNCTION
END PROGRAM</syntaxhighlight>
 
==={{header|Yabasic}}===
Line 178 ⟶ 205:
{{works with|True BASIC}}
A trailing semicolon prevents a newline
<langsyntaxhighlight lang="yabasic">print "Goodbye, World!";
end</langsyntaxhighlight>
 
=={{header|Batch File}}==
'''Under normal circumstances, when delayed expansion is disabled'''<br/>
The quoted form guarantees there are no hidden trailing spaces after World!
<langsyntaxhighlight lang="dos"><nul set/p"=Goodbye, World!"
<nul set/p=Goodbye, World!</langsyntaxhighlight>
 
'''If delayed expansion is enabled, then the ! must be escaped'''<br/>
Escape once if quoted form, twice if unquoted.
<langsyntaxhighlight lang="dos">setlocal enableDelayedExpansion
<nul set/p"=Goodbye, World^!"
<nul set/p=Goodbye, World^^^!</langsyntaxhighlight>
 
=={{header|BBC BASIC}}==
<langsyntaxhighlight lang="bbcbasic"> REM BBC BASIC accepts the standard trailing semicolon:
PRINT "Goodbye World!";
Line 201 ⟶ 228:
FOR i% = 1 TO LEN(GW$)
VDU ASCMID$(GW$, i%)
NEXT</langsyntaxhighlight>
 
=={{header|Bcbc}}==
<langsyntaxhighlight Bclang="bc">print "Goodbye, World!"</langsyntaxhighlight>
 
=={{header|beeswax}}==
<syntaxhighlight lang ="beeswax">_`Goodbye, World!</langsyntaxhighlight>
 
beeswax prints everything without appending a newline character. beeswax has an instruction to explicitely print a newline character: <code>N</code>.
Line 214 ⟶ 241:
In Befunge, a newline has to be explicitly output when required, so you can just not include one if it's not wanted.
 
<langsyntaxhighlight lang="befunge">"!dlroW ,eybdooG">:#,_@</langsyntaxhighlight>
 
=={{header|Binary Lambda Calculus}}==
 
Starting a program with any of the 16 ASCII characters from space to slash will copy the remainder to stdout, so for example
 
<pre>*Goodbye, World!</pre>
 
=={{header|Blade}}==
<syntaxhighlight lang="blade">print('Goodbye, World!')</syntaxhighlight>
 
=={{header|bootBASIC}}==
"Goodbye, w" and "orld!" are printed on different lines because not enough characters are allowed per line to complete this task in one line, even for the most code golfed version.
<langsyntaxhighlight bootBASIClang="BASIC">10 print "Goodbye, w";
20 print "orld!";</langsyntaxhighlight>
 
=={{header|Bracmat}}==
 
<langsyntaxhighlight lang="bracmat">put$"Goodbye, World!"</langsyntaxhighlight>
 
=={{header|Brainf***}}==
One option was to copy the code from the regular Hello World version and omit the last period, but one of the nicer things about the language is that no matter how simple your program is, if it's more than a few characters long, it's probably unique. So here's yet another version of Goodbye, World in Brainf***.
<langsyntaxhighlight lang="bf">>+++++[>++++>+>+>++++>>+++<<<+<+<++[>++>+++>+++>++++>+>+[<]>>-]<-]>>
+.>>+..<.--.++>>+.<<+.>>>-.>++.[<]++++[>++++<-]>.>>.+++.------.<-.[>]<+.[-]
[G oo d b y e , W o r l d !]</langsyntaxhighlight>
 
=={{header|C}}==
In C, we do not get a newline unless we embed one:
<langsyntaxhighlight lang="c">#include <stdio.h>
#include <stdlib.h>
 
Line 239 ⟶ 275:
(void) printf("Goodbye, World!"); /* No automatic newline */
return EXIT_SUCCESS;
}</langsyntaxhighlight>
 
However ISO C leaves it up to implementations to define whether or not the last line of a text stream requires a new-line. This means that the C can be targetted to environments where this task is impossible to implement, at least with a direct text stream manipulation like this.
 
=={{header|C sharp|C#}}==
<langsyntaxhighlight lang="csharp">using System;
 
class Program
Line 256 ⟶ 292:
Console.Write("Goodbye, World!");
}
}</langsyntaxhighlight>
 
=={{header|C++}}==
<langsyntaxhighlight lang="cpp">#include <iostream>
 
int main() {
std::cout << "Goodbye, World!";
return 0;
}</langsyntaxhighlight>
 
=={{header|Clipper}}==
<langsyntaxhighlight Clipperlang="clipper">?? "Goodbye, World!"</langsyntaxhighlight>
 
=={{header|Clojure}}==
<langsyntaxhighlight lang="clojure">(print "Goodbye, World!")</langsyntaxhighlight>
 
=={{header|COBOL}}==
<langsyntaxhighlight lang="cobol"> IDENTIFICATION DIVISION.
PROGRAM-ID. GOODBYE-WORLD.
PROCEDURE DIVISION.
 
DISPLAY 'Goodbye, World!' WITH NO ADVANCING.
PROCEDURE DIVISION.
STOP RUN.
DISPLAY 'Goodbye, World!'
END PROGRAM GOODBYE-WORLD.</syntaxhighlight>
WITH NO ADVANCING
END-DISPLAY
.
STOP RUN.</lang>
 
=={{header|CoffeeScript}}==
Node JS:
<langsyntaxhighlight lang="coffeescript">process.stdout.write "Goodbye, World!"</langsyntaxhighlight>
 
=={{header|Common Lisp}}==
<langsyntaxhighlight lang="lisp">(princ "Goodbye, World!")</langsyntaxhighlight>
 
=={{header|Creative Basic}}==
<syntaxhighlight lang="creative basic">
<lang Creative Basic>
'In a window
 
Line 337 ⟶ 370:
'Since this a Cbasic console program.
END
</syntaxhighlight>
</lang>
 
=={{header|D}}==
{{works with|D|2.0}}
<langsyntaxhighlight Dlang="d">import std.stdio;
 
void main() {
write("Goodbye, World!");
}</langsyntaxhighlight>
 
=={{header|Dart}}==
<syntaxhighlight lang="dart">import 'dart:io';
void main() {
stdout.write("Goodbye, World!");
}</syntaxhighlight>
 
=={{header|Dc}}==
<syntaxhighlight lang Dc="dc">[Goodbye, World!]P</langsyntaxhighlight>
<syntaxhighlight lang Dc="dc">370913249815566165486152944077005857 P</langsyntaxhighlight>
 
=={{header|Delphi}}==
<langsyntaxhighlight Delphilang="delphi">program Project1;
 
{$APPTYPE CONSOLE}
Line 358 ⟶ 398:
begin
Write('Goodbye, World!');
end.</langsyntaxhighlight>
 
=={{header|dt}}==
<syntaxhighlight lang="dt">"Goodbye, World!" p</syntaxhighlight>
 
=={{header|DWScript}}==
<syntaxhighlight lang Delphi="delphi">Print('Goodbye, World!');</langsyntaxhighlight>
 
=={{header|Dyalect}}==
<langsyntaxhighlight Dyalectlang="dyalect">print("Goodbye, World!", terminator: "")</langsyntaxhighlight>
 
=={{header|Dylan.NET}}==
Line 374 ⟶ 417:
{{works with|.NET|4.5}}
One Line version:
<langsyntaxhighlight Dylanlang="dylan.NETnet">Console::Write("Goodbye, World!")</langsyntaxhighlight>
Goodbye World Program:
<syntaxhighlight lang="dylan.net">
<lang Dylan.NET>
//compile using the new dylan.NET v, 11.5.1.2 or later
//use mono to run the compiler
Line 393 ⟶ 436:
 
end class
</syntaxhighlight>
</lang>
 
=={{header|Déjà Vu}}==
<langsyntaxhighlight lang="dejavu">!print\ "Goodbye, World!"</langsyntaxhighlight>
 
=={{header|EasyLang}}==
<syntaxhighlight>
# write omits newline
write "Goodbye, World!"
 
</syntaxhighlight>
 
=={{header|EchoLisp}}==
<langsyntaxhighlight lang="lisp">
(begin
(write "GoodBye, World")
(write "Next on same line"))
</syntaxhighlight>
</lang>
 
=={{header|Elena}}==
ELENA 4.x:
<langsyntaxhighlight lang="elena">public program()
{
//print will not append a newline
console.write("Goodbye, World!")
}</langsyntaxhighlight>
 
=={{header|Elixir}}==
<langsyntaxhighlight lang="elixir">
IO.write "Goodbye, World!"
</syntaxhighlight>
</lang>
 
=={{header|Emacs Lisp}}==
<langsyntaxhighlight Emacslang="emacs Lisplisp">(princ "Goodbye, World!")</langsyntaxhighlight>
 
{{out}}
 
Goodbye, World!
 
=={{header|EMal}}==
<syntaxhighlight lang="emal">write("Goodbye, World!")</syntaxhighlight>
 
=={{header|Erlang}}==
In erlang a newline must be specified in the format string.
<langsyntaxhighlight lang="erlang">io:format("Goodbye, world!").</langsyntaxhighlight>
 
=={{header|ERRE}}==
<syntaxhighlight lang="erre">
<lang ERRE>
.......
PRINT("Goodbye, World!";)
.......
</syntaxhighlight>
</lang>
 
=={{header|Euphoria}}==
<langsyntaxhighlight lang="euphoria">-- In Euphoria puts() does not insert a newline character after outputting a string
puts(1,"Goodbye, world!")</langsyntaxhighlight>
 
=={{header|F Sharp|F#}}==
<langsyntaxhighlight lang="fsharp">
// A program that will run in the interpreter (fsi.exe)
printf "Goodbye, World!";;
Line 450 ⟶ 503:
printf "Goodbye, World!"
0
</syntaxhighlight>
</lang>
 
=={{header|Factor}}==
<langsyntaxhighlight lang="factor">USE: io
"Goodbye, World!" write</langsyntaxhighlight>
 
=={{header|Falcon}}==
With the print() function:
<langsyntaxhighlight lang="falcon">print("Goodbye, World!")</langsyntaxhighlight>
Or via "fast print":
<langsyntaxhighlight lang="falcon">>> "Goodbye, World!"</langsyntaxhighlight>
 
=={{header|Fantom}}==
 
<syntaxhighlight lang="java">
<lang fantom>
class Main {
Void main() {
// Print with newline
echo("Goodbye, World!")
echo("Hello, World!")
// Or
Env.cur.out.printLine("Hello, World!")
 
// Print without a newline
Env.cur.out.print("Goodbye, world!")
 
// Also can get a reference to the standard output stream
out := Env.cur.out
 
out.print("Goodbye, world!")
out.flush() // and flush buffer if needed
// or method chain
out.print("Goodbye, world!").flush()
 
// Also we can an implement a user-defined method
print("Hello, world! I'm back!");
 
}
// User-defined 'print' method
private Void print(Str s) {
Env.cur.out.print(s)
}
 
}
</syntaxhighlight>
</lang>
 
=={{header|FOCAL}}==
FOCAL does not insert a newline unless we specifically request one.
<langsyntaxhighlight lang="focal">TYPE "Goodbye, World!"</langsyntaxhighlight>
 
=={{header|Forth}}==
<langsyntaxhighlight Forthlang="forth">\ The Forth word ." does not insert a newline character after outputting a string
." Goodbye, World!"</langsyntaxhighlight>
 
=={{header|Fortran}}==
<langsyntaxhighlight Fortranlang="fortran">program bye
write (*,'(a)',advance='no') 'Goodbye, World!'
end program bye</langsyntaxhighlight>
 
The "advance" facility was introduced with F90, as was the ability to specify format instructions (the <code>'(A)'</code> part) without a separate FORMAT statement. Earlier, there was a common extension:
<langsyntaxhighlight Fortranlang="fortran"> WRITE (6,1) "Goodbye, World!"
1 FORMAT (A,$)
END</langsyntaxhighlight>
In this, the FORMAT instruction is to accept alphabetic text (the A) from the WRITE statement, followed by the special $ item (of no mnemonic form) which signified that there was not to be any new line action at the end of the output. This sort of thing is useful when writing a prompt to the screen so that the input of the response appears on the same screen line. The text could also have been incorporated into the FORMAT statement, which would be useful if there were many WRITE statements scattered about that were to send forth the same text.
 
Line 496 ⟶ 573:
 
=={{header|FreeBASIC}}==
<langsyntaxhighlight freebasiclang="basic">' FB 1.0510.01 Win64
 
Print "Goodbye, World!"; '' the trailing semi-colon suppresses the new line
Sleep</langsyntaxhighlight>
 
=={{header|Frink}}==
<langsyntaxhighlight Frinklang="frink">print["Goodbye, World!"]</langsyntaxhighlight>
 
 
=={{header|FutureBasic}}==
FB has several ways to suppress line feeds and/or carriage returns. A few are demonstrated here.
<syntaxhighlight lang="futurebasic">
include "NSLog.incl"
 
print
// A semicolon will suppress a line feed in a print statement.
print "a, ";
print "b, ";
print "c"
 
print : print
 
// When logging, a \b (escaped b) appended to a string will suppress a line feed.
NSLog( @"d, \b" )
NSLog( @"e, \b" )
NSLog( @"f" )
 
long i
CFMutableStringRef mutStr
mutStr = fn MutableStringWithCapacity(0)
 
// Feeds and returns can be easily omitted using a mutable string
for i = 1 to 99
MutableStringAppendFormat( mutStr, @"%3ld, ", i )
if ( i mod 10 == 0 ) then MutableStringAppendString( mutStr, @"\n" )
if ( i == 99 ) then MutableStringAppendFormat( mutStr, @"%3ld", i + 1 )
next
 
print mutStr
 
HandleEvents
</syntaxhighlight>
{{output}}
[[File:FB Supressed Line Feed.png]]
 
=={{header|Gambas}}==
'''[https://gambas-playground.proko.eu/?gist=09c8c3464c556325f089f9e4c326eaca Click this link to run this code]'''
<langsyntaxhighlight gambaslang="basic">Public Sub Main()
 
Print "Goodbye, "; 'The semicolon stops the newline being added
Print "World!"
 
End</langsyntaxhighlight>
Output:
<pre>
Line 518 ⟶ 632:
 
=={{header|gecho}}==
<langsyntaxhighlight lang="gecho">'Hello, <> 'World! print</langsyntaxhighlight>
 
=={{header|Genie}}==
<langsyntaxhighlight lang="genie">[indent=4]
/*
Hello, with no newline, in Genie
Line 528 ⟶ 642:
 
init
stdout.printf("%s", "Goodbye, World!")</langsyntaxhighlight>
 
{{out}}
Line 536 ⟶ 650:
 
=={{header|GML}}==
<langsyntaxhighlight lang="lisp">show_message("Goodbye, World!")</langsyntaxhighlight>
 
=={{header|Go}}==
<langsyntaxhighlight lang="go">package main
 
import "fmt"
 
func main() { fmt.Print("Goodbye, World!") }</langsyntaxhighlight>
 
=={{header|Groovy}}==
 
<langsyntaxhighlight lang="groovy">print "Goodbye, world"</langsyntaxhighlight>
 
=={{header|GUISS}}==
In Graphical User Interface Support Script, we specify a newline, if we want one. The following will not produce a newline:
<langsyntaxhighlight GUISSlang="guiss">Start,Programs,Accessories,Notepad,Type:Goodbye World[pling]</langsyntaxhighlight>
 
=={{header|Harbour}}==
<langsyntaxhighlight lang="visualfoxpro">?? "Goodbye, world"
or
QQout( "Goodbye, world" )
</syntaxhighlight>
</lang>
 
=={{header|Haskell}}==
 
<langsyntaxhighlight lang="haskell">main = putStr "Goodbye, world"</langsyntaxhighlight>
 
=={{header|HolyC}}==
<langsyntaxhighlight lang="holyc">"Goodbye, World!";</langsyntaxhighlight>
 
=={{header|Io}}==
<syntaxhighlight lang="io">
<lang io>
write("Goodbye, World!")
</syntaxhighlight>
</lang>
 
=={{header|Huginn}}==
<langsyntaxhighlight lang="huginn">#! /bin/sh
exec huginn --no-argv -E "${0}" "${@}"
#! huginn
Line 579 ⟶ 693:
print( "Goodbye, World!" );
return ( 0 );
}</langsyntaxhighlight>
 
=={{header|Icon}} and {{header|Unicon}}==
Native output in Icon and Unicon is performed via the ''write'' and ''writes'' procedures. The ''write'' procedure terminates each line with both a return and newline (for consistency across platforms). The ''writes'' procedure omits this. Additionally, the programming library has a series of ''printf'' procedures as well.
<langsyntaxhighlight Iconlang="icon">procedure main()
writes("Goodbye, World!")
end</langsyntaxhighlight>
 
=={{header|IWBASIC}}==
<syntaxhighlight lang="iwbasic">
<lang IWBASIC>
'In a window
 
Line 635 ⟶ 749:
'Since this an IWBASIC console program.
END
</syntaxhighlight>
</lang>
 
=={{header|J}}==
With ''jconsole'', <code>stdout</code> can be used.
On a linux system, you can use 1!:3 because stdout is a file:
<syntaxhighlight lang="j"> stdout
<lang j> 'Goodbye, World!' 1!:3 <'/proc/self/fd/1'
1!:2&4</syntaxhighlight>
Goodbye, World! </lang>
<code>1!:2&4</code> returns its input unmodified. To avoid implicit output (which would repeat the output), when used interactively:
However, J works in environments other than Linux, so...
<syntaxhighlight lang="j"> put=: 0 0 $ 1!:2&4
 
put 'Goodbye, World!'
Goodbye, World!</syntaxhighlight>
However, J also works in graphical environments, which might not be connected to standard output.
'''Solution''':<code>prompt</code> from the misc package.
'''Example''':<langsyntaxhighlight lang="j"> load 'general/misc/prompt'
prompt 'Goodbye, World!'
Goodbye, World!</langsyntaxhighlight>
'''Notes''': J programs are normally run from a REPL, or session manager, which comes in several flavors. The traditional commandline-based terminal (jconsole), one of several desktop applications (jqt for the current version of J, jgtk and jwd for older but still supported versions), a web-based frontend (jhs), and various mobile apps (J for iOS, Android).
 
The specific session manager being used changes the context and therefore answer to this task. For example, when using J from a browser (including mobile browsers) newlines are omitted by default. Further, J provides strong tools for coalescing results and manipulating them prior to output, so newline elimination would typically happen before output rather than after.
 
With that said, <code>prompt</code> handles the most common cases (using binary output for jconsole, so no newline is appended; adjusting the REPL prompt in the desktop apps to to elide the newline which is normally included by default, etc).
 
For truly automated processes, you'd almost always want this kind of functionality (omitting the newline when printing) in a file- or stream-oriented application. For those cases, the simple <code>text 1!:3 file</code> will append the text to the referenced file verbatim, without inserting any extra newlines.
 
So, if a J programmer were asked to solve this task, the right approach would be to ask why that is needed, and then craft a solution appropriate to that situation.
 
=={{header|Jack}}==
<langsyntaxhighlight lang="jack">class Main {
function void main () {
do Output.printString("Goodbye, World!");und
return;
}
}</langsyntaxhighlight>
 
=={{header|Jakt}}==
<syntaxhighlight lang="jakt">
fn main() {
print("Goodbye, World!")
}
</syntaxhighlight>
 
=={{header|Janet}}==
<langsyntaxhighlight lang="janet">(prin "Goodbye, World!")</langsyntaxhighlight>
 
=={{header|Java}}==
<langsyntaxhighlight lang="java">public class HelloWorld
{
public static void main(String[] args)
Line 674 ⟶ 800:
System.out.print("Goodbye, World!");
}
}</langsyntaxhighlight>
 
=={{header|JavaScript}}==
Node JS:
<langsyntaxhighlight lang="javascript">process.stdout.write("Goodbye, World!");</langsyntaxhighlight>
 
=={{header|Joy}}==
<syntaxhighlight lang="joy">"Goodbye, World!" putchars.</syntaxhighlight>
 
=={{header|jq}}==
The "-j" command-line option suppresses the newline that would otherwise be printed, e.g. if "$" is the command-line prompt:
<langsyntaxhighlight lang="sh">$ jq -n -j '"Goodbye, World!"'
Goodbye, World!$ </langsyntaxhighlight>
The trailing "$" is the command-line prompt.
 
Similarly:
<langsyntaxhighlight lang="sh">$ echo '"Goodbye, World!"' | jq -j
Goodbye, World!$ </langsyntaxhighlight>
 
=={{header|Jsish}}==
<langsyntaxhighlight lang="javascript">printf("Goodbye, World!")</langsyntaxhighlight>
 
Evaluated from the command line as:
Line 700 ⟶ 829:
=={{header|Julia}}==
Julia provides a <code>println</code> function which appends a newline, and a <code>print</code> function which doesn't:
<langsyntaxhighlight lang="julia">print("Goodbye, World!")</langsyntaxhighlight>
 
=={{header|Kotlin}}==
{{trans|Java}}
<langsyntaxhighlight lang="scala">fun main(args: Array<String>) = print("Goodbye, World!")</langsyntaxhighlight>
 
=={{header|Lang}}==
<syntaxhighlight lang="lang">fn.print(Goodbye, World!)</syntaxhighlight>
 
=={{header|Lasso}}==
Lasso provides a <code>stdoutnl</code> method that prints a trailing newline, and a <code>stdout</code> method that does not:
<langsyntaxhighlight lang="lasso">stdout("Goodbye, World!")</langsyntaxhighlight>
 
=={{header|LFE}}==
<langsyntaxhighlight lang="lisp">
(io:format "Goodbye, World")
</syntaxhighlight>
</lang>
 
=={{header|Liberty BASIC}}==
A trailing semicolon prevents a newline
<langsyntaxhighlight lang="lb">print "Goodbye, World!";
</syntaxhighlight>
</lang>
 
=={{header|LIL}}==
<syntaxhighlight lang ="tcl">write Goodbye, World!</langsyntaxhighlight>
 
=={{header|Limbo}}==
<langsyntaxhighlight lang="limbo">implement HelloWorld;
 
include "sys.m"; sys: Sys;
Line 737 ⟶ 869:
sys = load Sys Sys->PATH;
sys->print("Goodbye, World!"); # No automatic newline.
}</langsyntaxhighlight>
 
=={{header|LLVM}}==
<langsyntaxhighlight lang="llvm">; This is not strictly LLVM, as it uses the C library function "printf".
; LLVM does not provide a way to print values, so the alternative would be
; to just load the string into memory, and that would be boring.
Line 753 ⟶ 885:
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @"OUTPUT_STR", i32 0, i32 0))
ret i32 0
}</langsyntaxhighlight>
 
=={{header|Logtalk}}==
No action is necessary to avoid an unwanted newline.
<langsyntaxhighlight lang="logtalk">
:- object(error_message).
 
Line 765 ⟶ 897:
 
:- end_object.
</syntaxhighlight>
</lang>
 
=={{header|Lua}}==
<langsyntaxhighlight lang="lua">io.write("Goodbye, World!")</langsyntaxhighlight>
 
=={{header|M2000 Interpreter}}==
 
<syntaxhighlight lang="m2000 interpreter">
Form 80, 45
// set no special format, 8 character column, at 0,0 position, row (top left)
Print $("", 8),@(0,0),
// semi colon
Module Test1 {
Print "Goodbye, "; 'The semicolon stops the newline being added
Print "World!"
}
// comma
Module Test2 {
Print 1,
Print 2,
Print 3,
Print // now we change line
For i=4 to 30 : Print i,: Next
// lines changed according the use of columns
}
Test1
Test2
// we can mix ; and ,
Print "aaa ";1, "bbb ";2, "ccc ";3
</syntaxhighlight>
 
 
=={{header|m4}}==
Line 774 ⟶ 933:
(Quoted) text is issued verbatim, "dnl" suppresses all input until and including the next newline. Simply creating an input without a trailing newline would of course accomplish the same task.
 
<syntaxhighlight lang ="m4">`Goodbye, World!'dnl</langsyntaxhighlight>
 
=={{header|MANOOL}}==
<langsyntaxhighlight MANOOLlang="manool">{{extern "manool.org.18/std/0.3/all"} in Out.Write["Goodbye, World!"]}</langsyntaxhighlight>
 
=={{header|Maple}}==
<syntaxhighlight lang="maple">
<lang Maple>
printf( "Goodbye, World!" );
</syntaxhighlight>
</lang>
 
=={{header|Mathematica}} / {{header|Wolfram Language}}==
<langsyntaxhighlight Mathematicalang="mathematica">NotebookWrite[EvaluationNotebook[], "Goodbye, World!"]</langsyntaxhighlight>
Another one that works in scripts:
<langsyntaxhighlight Mathematicalang="mathematica">WriteString[$Output, "Goodbye, World!"]</langsyntaxhighlight>
 
=={{header|MATLAB}} / {{header|Octave}}==
<langsyntaxhighlight Matlablang="matlab"> fprintf('Goodbye, World!');</langsyntaxhighlight>
 
=={{header|Microsoft Small Basic}}==
<syntaxhighlight lang="smallbasic">TextWindow.Write("Goodbye, World!")</syntaxhighlight>
{{out}}
<pre>Goodbye, World!Press any key to continue...</pre>
 
=={{header|min}}==
<langsyntaxhighlight lang="min">"Goodbye, World!" print</langsyntaxhighlight>
 
=={{header|mIRC Scripting Language}}==
<syntaxhighlight lang ="mirc">echo -ag Goodbye, World!</langsyntaxhighlight>
 
=={{header|ML/I}}==
===Simple solution===
In ML/I, if there isn't a newline in the input, there won't be one in the output; so a simple solution is this (although it's hard to see that there isn't a newline).
<syntaxhighlight lang ML="ml/Ii">Goodbye, World!</langsyntaxhighlight>
===More sophisticated solution===
To make it clearer, we can define an ML/I ''skip'' to delete itself and an immediately following newline.
<langsyntaxhighlight MLlang="ml/Ii">MCSKIP " WITH " NL
Goodbye, World!""</langsyntaxhighlight>
 
=={{header|Modula-2}}==
<langsyntaxhighlight lang="modula2">MODULE HelloWorld;
FROM Terminal IMPORT WriteString,ReadChar;
 
Line 814 ⟶ 978:
WriteString("Goodbye, World!");
ReadChar
END HelloWorld.</langsyntaxhighlight>
 
=={{header|N/t/roff}}==
Line 822 ⟶ 986:
Because /.ROFF/ is a document formatting language, most text input is expected to be text input which will get output on paper, so there is usually no need to run a special procedure or routine to output text.
 
<langsyntaxhighlight Nlang="n/t/roff">
Goodbye, World!
</syntaxhighlight>
</lang>
 
=={{header|Nanoquery}}==
<langsyntaxhighlight lang="nanoquery">print "Goodbye, world!"</langsyntaxhighlight>
 
=={{header|Neko}}==
The Neko builtin $print does not add a newline.
 
<syntaxhighlight lang="actionscript">/**
<lang ActionScript>/**
hellonnl.neko
Tectonics:
Line 845 ⟶ 1,009:
*/
 
$print("Goodbye, World!");</langsyntaxhighlight>
 
{{out}}
Line 854 ⟶ 1,018:
=={{header|Nemerle}}==
 
<langsyntaxhighlight Nemerlelang="nemerle">using System.Console;
 
module Hello
Line 864 ⟶ 1,028:
Write("Goodbye, ");
Write("world!");
}</langsyntaxhighlight>
 
=={{header|NetRexx}}==
<langsyntaxhighlight NetRexxlang="netrexx">/* NetRexx */
options replace format comments java crossref symbols binary
 
say 'Goodbye, World!\-'
</syntaxhighlight>
</lang>
 
=={{header|NewLISP}}==
<langsyntaxhighlight NewLISPlang="newlisp">(print "Goodbye, World!")</langsyntaxhighlight>
 
=={{header|Nim}}==
<langsyntaxhighlight lang="nim">stdout.write "Goodbye, World!"</langsyntaxhighlight>
 
=={{header|NS-HUBASIC}}==
<langsyntaxhighlight NSlang="ns-HUBASIChubasic">10 PRINT "GOODBYE, WORLD!";</langsyntaxhighlight>
 
=={{header|Oberon-2}}==
<langsyntaxhighlight lang="oberon2">
MODULE HelloWorld;
IMPORT Out;
Line 889 ⟶ 1,053:
Out.String("Goodbye, world!")
END HelloWorld.
</syntaxhighlight>
</lang>
 
=={{header|Objeck}}==
 
<langsyntaxhighlight lang="objeck">
bundle Default {
class SayGoodbye {
Line 901 ⟶ 1,065:
}
}
</syntaxhighlight>
</lang>
 
=={{header|OCaml}}==
Line 907 ⟶ 1,071:
In OCaml, the function <code>[http://caml.inria.fr/pub/docs/manual-ocaml/libref/Pervasives.html#VALprint_endline print_endline]</code> prints a string followed by a newline character on the standard output and flush the standard output. And the function <code>[http://caml.inria.fr/pub/docs/manual-ocaml/libref/Pervasives.html#VALprint_string print_string]</code> just prints a string with nothing additional.
 
<langsyntaxhighlight lang="ocaml">print_string "Goodbye, World!"</langsyntaxhighlight>
 
=={{header|Oforth}}==
<langsyntaxhighlight Oforthlang="oforth">"Goodbye, World!" print</langsyntaxhighlight>
 
=={{header|Ol}}==
To omit the trailing newline use `display` instead of `print`.
<langsyntaxhighlight lang="scheme">
(display "Goodbye, World!")
</syntaxhighlight>
</lang>
 
=={{header|OOC}}==
To omit the trailing newline use print instead of println:
<langsyntaxhighlight lang="ooc">main: func {
"Goodbye, World!" print()
}</langsyntaxhighlight>
 
=={{header|Oxygene}}==
{{incorrect|Oxygene|output isn't consistent with the task's requirements: wording, capitalization.}}
 
<langsyntaxhighlight lang="oxygene">
namespace HelloWorld;
Line 948 ⟶ 1,112:
end.
</syntaxhighlight>
</lang>
<pre>
>HelloWorld.exe
Line 955 ⟶ 1,119:
 
=={{header|Panoramic}}==
<syntaxhighlight lang="panoramic">
<lang Panoramic>
rem insert a trailing semicolon.
print "Goodbye, World!";
print " Nice having known you."</langsyntaxhighlight>
 
=={{header|PARI/GP}}==
<langsyntaxhighlight lang="parigp">print1("Goodbye, World!")</langsyntaxhighlight>
 
=={{header|Pascal}}==
<langsyntaxhighlight lang="pascal">program NewLineOmission(output);
begin
write('Goodbye, World!');
end.</langsyntaxhighlight>
Output:
<pre>% ./NewLineOmission
Line 975 ⟶ 1,139:
=={{header|PASM}}==
 
<langsyntaxhighlight lang="pasm">print "Goodbye World!" # Newlines do not occur unless we embed them
end</langsyntaxhighlight>
 
=={{header|Perl}}==
<langsyntaxhighlight lang="perl">print "Goodbye, World!"; # A newline does not occur automatically</langsyntaxhighlight>
 
=={{header|Phix}}==
Phix does not add '\n' automatically, except for the '?' (debugging) shorthand; if you want one you must remember to add it explicitly.
<!--<langsyntaxhighlight Phixlang="phix">-->
<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;">"Goodbye, World!"</span><span style="color: #0000FF;">)</span>
<!--</langsyntaxhighlight>-->
 
=={{header|PHL}}==
Printf doesn't add newline automatically.
 
<langsyntaxhighlight lang="phl">module helloworld_noln;
extern printf;
 
Line 996 ⟶ 1,160:
printf("Goodbye, World!");
return 0;
]</langsyntaxhighlight>
 
=={{header|PHP}}==
 
<langsyntaxhighlight PHPlang="php">echo "Goodbye, World !";</langsyntaxhighlight>
 
=={{header|Picat}}==
<syntaxhighlight lang="picat">print("Goodbye, World!")</syntaxhighlight>
 
=={{header|PicoLisp}}==
<langsyntaxhighlight PicoLisplang="picolisp">(prin "Goodbye, World!")</langsyntaxhighlight>
 
=={{header|Pict}}==
<langsyntaxhighlight lang="pict">(pr "Hello World!");</langsyntaxhighlight>
 
=={{header|Pike}}==
<langsyntaxhighlight Pikelang="pike">write("Goodbye, World!");</langsyntaxhighlight>
 
=={{header|Pixilang}}==
<langsyntaxhighlight Pixilanglang="pixilang">fputs("Goodbye, World!")</langsyntaxhighlight>
 
=={{header|PL/I}}==
<syntaxhighlight lang="pl/i">
<lang PL/I>
put ('Goodbye, World!');
</syntaxhighlight>
</lang>
 
=={{header|Plain English}}==
<langsyntaxhighlight lang="plainenglish">To run:
Start up.
Write "Goodbye, world!" on the console without advancing.
Wait for the escape key.
Shut down.</langsyntaxhighlight>
 
=={{header|PowerShell}}==
<langsyntaxhighlight PowerShelllang="powershell">Write-Host -NoNewLine "Goodbye, "
Write-Host -NoNewLine "World!"</langsyntaxhighlight>
{{Out}}
<pre>Goodbye, World!PS C:\></pre>
 
=={{header|Processing}}==
<langsyntaxhighlight lang="processing">
print("Goodbye, World!"); /* No automatic newline */
</syntaxhighlight>
</lang>
 
=={{header|PureBasic}}==
<langsyntaxhighlight PureBasiclang="purebasic">OpenConsole()
Print("Goodbye, World!")
Input() ;wait for enter key to be pressed</langsyntaxhighlight>
 
=={{header|Python}}==
<langsyntaxhighlight lang="python">import sys
sys.stdout.write("Goodbye, World!")</langsyntaxhighlight>
 
{{works with|Python|3.x}}
<langsyntaxhighlight lang="python">print("Goodbye, World!", end="")</langsyntaxhighlight>
 
=={{header|Quackery}}==
Line 1,053 ⟶ 1,220:
Quackery does not automatically insert a new line.
 
<langsyntaxhighlight Quackerylang="quackery">say "Goodbye, world!"</langsyntaxhighlight>
 
=={{header|R}}==
<langsyntaxhighlight Rlang="r">cat("Goodbye, world!")</langsyntaxhighlight>
 
=={{header|Ra}}==
<syntaxhighlight lang="ra">
<lang Ra>
class HelloWorld
**Prints "Goodbye, World!" without a new line**
Line 1,066 ⟶ 1,233:
 
print "Goodbye, World!" without new line
</syntaxhighlight>
</lang>
 
=={{header|Racket}}==
<langsyntaxhighlight Racketlang="racket">#lang racket
(display "Goodbye, World!")</langsyntaxhighlight>
 
=={{header|Raku}}==
(formerly Perl 6)
A newline is not added automatically to print or printf
<syntaxhighlight lang="raku" perl6line>print "Goodbye, World!";
printf "%s", "Goodbye, World!";</langsyntaxhighlight>
 
=={{header|RASEL}}==
<syntaxhighlight lang="text">"!dlroW ,olleH">:?@,Gj</langsyntaxhighlight>
 
=={{header|REBOL}}==
<langsyntaxhighlight REBOLlang="rebol">prin "Goodbye, World!"</langsyntaxhighlight>
 
=={{header|Red}}==
<langsyntaxhighlight Redlang="red">prin "Goodbye, World!"</langsyntaxhighlight>
 
=={{header|Retro}}==
<syntaxhighlight lang Retro="retro">'Goodbye,_World! s:put</langsyntaxhighlight>
 
=={{header|REXX}}==
Line 1,094 ⟶ 1,261:
<br>blank line so as to not leave the state of the terminal with malformed "text lines" (which can be followed by other text
<br>(lines) from a calling program(s), or the operating system (shell) which is usually some sort of a "prompt" text string.
<langsyntaxhighlight lang="rexx">/*REXX pgm displays a "Goodbye, World!" without a trailing newline. */
 
call charout ,'Goodbye, World!'</langsyntaxhighlight>
 
=={{header|Ring}}==
<langsyntaxhighlight lang="ring">see "Goodbye, World!"</langsyntaxhighlight>
 
=={{header|Ruby}}==
<langsyntaxhighlight lang="ruby">print "Goodbye, World!"</langsyntaxhighlight>
 
=={{header|Run BASIC}}==
<langsyntaxhighlight RunBasiclang="runbasic">print "Goodbye, World!";</langsyntaxhighlight>
 
=={{header|Rust}}==
<langsyntaxhighlight lang="rust">fn main () {
print!("Goodbye, World!");
}</langsyntaxhighlight>
 
=={{header|Salmon}}==
<langsyntaxhighlight Salmonlang="salmon">print("Goodbye, World!");</langsyntaxhighlight>
 
=={{header|Scala}}==
Line 1,119 ⟶ 1,286:
===Ad hoc REPL solution===
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:
<langsyntaxhighlight Scalalang="scala">print("Goodbye, World!")</langsyntaxhighlight>
 
=={{header|Scheme}}==
<langsyntaxhighlight lang="scheme">(display "Goodbye, World!")</langsyntaxhighlight>
 
=={{header|Scilab}}==
Scilab can emulate C <code>printf</code> which, by default, does not return the carriage.
<langsyntaxhighlight lang="scilab">print("Goodbye, World!")</langsyntaxhighlight>
 
=={{header|Seed7}}==
<langsyntaxhighlight lang="seed7">$ include "seed7_05.s7i";
const proc: main is func
begin
write("Goodbye, World!");
end func;</langsyntaxhighlight>
 
=={{header|SETL}}==
<langsyntaxhighlight lang="setl">nprint( 'Goodbye, World!' );</langsyntaxhighlight>
 
=={{header|Sidef}}==
<langsyntaxhighlight lang="ruby">print "Goodbye, World!";</langsyntaxhighlight>
or:
<langsyntaxhighlight lang="ruby">"%s".printf("Goodbye, World!");</langsyntaxhighlight>
 
=={{header|Smalltalk}}==
<langsyntaxhighlight lang="smalltalk">
Transcript show: 'Goodbye, World!'.
</syntaxhighlight>
</lang>
 
=={{header|Standard ML}}==
<langsyntaxhighlight lang="sml">print "Goodbye, World!"</langsyntaxhighlight>
 
=={{header|Swift}}==
{{works with|Swift|2.x+}}
<langsyntaxhighlight lang="swift">print("Goodbye, World!", terminator: "")</langsyntaxhighlight>
{{works with|Swift|1.x}}
<langsyntaxhighlight lang="swift">print("Goodbye, World!")</langsyntaxhighlight>
 
=={{header|Tcl}}==
<langsyntaxhighlight lang="tcl">puts -nonewline "Goodbye, World!"</langsyntaxhighlight>
 
=={{header|Transact-SQL}}==
{{incorrect|Transact-SQL|output isn't consistent with the task's requirements: wrong word.}}
As an output statement, PRINT always adds a new line
<syntaxhighlight lang Transact="transact-SQLsql"> PRINT 'Goodbye, World!'</langsyntaxhighlight>
or:
As a result set
<syntaxhighlight lang Transact="transact-SQLsql"> select 'Goodbye, World!'</langsyntaxhighlight>
 
=={{header|TUSCRIPT}}==
<langsyntaxhighlight lang="tuscript">
$$ MODE TUSCRIPT
PRINT "Goodbye, World!"
</syntaxhighlight>
</lang>
Output:
<pre>
Line 1,181 ⟶ 1,348:
=={{header|TXR}}==
Possible using access to standard output stream via TXR Lisp:
<langsyntaxhighlight lang="bash">$ txr -e '(put-string "Goodbye, world!")'
Goodbye, world!$</langsyntaxhighlight>
 
=={{header|UNIX Shell}}==
Line 1,189 ⟶ 1,356:
{{works with|Bourne Shell}}
 
<langsyntaxhighlight lang="bash">printf "Goodbye, World!" # This works. There is no newline.
printf %s "-hyphens and % signs" # Use %s with arbitrary strings.</langsyntaxhighlight>
 
Unfortunately, older systems where you have to rely on vanilla Bourne shell may not have a ''printf'' command, either. It's possible that there is no command available to complete the task, but only on very old systems. For the rest, one of these two should work:
 
<langsyntaxhighlight lang="bash">echo -n 'Goodbye, World!'</langsyntaxhighlight>
or
<langsyntaxhighlight lang="bash">echo 'Goodbye, World!\c'</langsyntaxhighlight>
 
The ''print'' command, from the [[Korn Shell]], would work well, but most shells have no ''print'' command. (With [[pdksh]], ''print'' is slightly faster than ''printf'' because ''print'' runs a built-in command, but ''printf'' forks an external command. With [[ksh93]] and [[zsh]], ''print'' and ''printf'' are both built-in commands.)
Line 1,204 ⟶ 1,371:
{{works with|zsh}}
 
<langsyntaxhighlight lang="bash">print -n "Goodbye, World!"
print -nr -- "-hyphens and \backslashes"</langsyntaxhighlight>
 
==={{header|C Shell}}===
C Shell does support <code>echo -n</code> and omits the newline.
 
<langsyntaxhighlight lang="csh">echo -n "Goodbye, World!"
echo -n "-hyphens and \backslashes"</langsyntaxhighlight>
 
=={{header|Ursa}}==
Ursa doesn't output a newline to an I/O device by default, so simply omitting an endl object at the end of the output stream is all that's needed.
<langsyntaxhighlight lang="ursa">out "goodbye world!" console</langsyntaxhighlight>
 
=={{header|VerbexxUxntal}}==
<syntaxhighlight lang="Uxntal">|00 @System &vector $2 &expansion $2 &wst $1 &rst $1 &metadata $2 &r $2 &g $2 &b $2 &debug $1 &state $1
<lang verbexx>@STDOUT "Goodbye, World!";</lang>
|10 @Console &vector $2 &read $1 &pad $4 &type $1 &write $1 &error $1
 
|0100
;message
&loop
LDAk .Console/write DEO
INC2 LDAk ?&loop
POP2
#80 .System/state DEO
BRK
 
@message "Goodbye, 20 "World! 00</syntaxhighlight>
 
=={{header|Vale}}==
{{works with|Vale|0.2.0}}
<syntaxhighlight lang="vale">
import stdlib.*;
 
exported func main() {
print("Goodbye, World!");
}
</syntaxhighlight>
 
=={{header|Verbexx}}==
<syntaxhighlight lang="verbexx">@STDOUT "Goodbye, World!";</syntaxhighlight>
 
=={{header|Verilog}}==
<langsyntaxhighlight Veriloglang="verilog">module main;
initial
begin
Line 1,228 ⟶ 1,419:
$finish ;
end
endmodule</langsyntaxhighlight>
 
 
=={{header|Vim Script}}==
<langsyntaxhighlight lang="vim">echon "Goodbye, World!"</langsyntaxhighlight>
 
=={{header|Visual Basic .NET}}==
<langsyntaxhighlight lang="vbnet">Module Module1
 
Sub Main()
Line 1,241 ⟶ 1,432:
End Sub
 
End Module</langsyntaxhighlight>
 
=={{header|V (Vlang)}}==
<syntaxhighlight lang="v (vlang)">fn main() { print("Goodbye, World!") }</syntaxhighlight>
 
=={{header|Web 68}}==
Line 1,247 ⟶ 1,441:
Use the command 'tang -V hello.w68', then 'chmod +x hello.a68', then './hello.a68'
 
<langsyntaxhighlight lang="web68">@ @a@=#!/usr/bin/a68g -nowarn@>@\BEGIN print("Hello World") END</langsyntaxhighlight>
 
=={{header|Wren}}==
<langsyntaxhighlight ecmascriptlang="wren">System.write("Goodbye, World!")</langsyntaxhighlight>
 
=={{header|XLISP}}==
Either
<langsyntaxhighlight lang="scheme">(display "Goodbye, World!")</langsyntaxhighlight>
or
<langsyntaxhighlight lang="lisp">(princ "Goodbye, World!")</langsyntaxhighlight>
 
 
=={{header|XPath}}==
<syntaxhighlight lang="xpath">'Goodbye, World!'</syntaxhighlight>
 
=={{header|XPL0}}==
<langsyntaxhighlight XPL0lang="xpl0">code Text=12;
Text(0, "Goodbye, World!")</langsyntaxhighlight>
 
=={{header|XSLT}}==
<syntaxhighlight lang="text"><xsl:text>Goodbye, World!</xsl:text></syntaxhighlight>
 
=={{header|zkl}}==
<langsyntaxhighlight lang="zkl">print("Goodbye, World!");
Console.write("Goodbye, World!");</langsyntaxhighlight>
 
=={{header|Zig}}==
<syntaxhighlight lang="zig">const std = @import("std");
{{works with|Zig|0.7.0 and higher}}
<lang Zig>
const std = @import("std");
 
// return type is Error Union type.
// it will return an inferred error set or void data type:
pub fn main() !void {
const stdout =try std.io.getStdOut().writer().writeAll("Hello world!");
}</syntaxhighlight>
try stdout.print("Goodbye, {s}", .{"World!"}); // anonymous struct literal used for string substitution
}
</lang>
 
=={{header|ZX Spectrum Basic}}==
<langsyntaxhighlight lang="basic">10 REM The trailing semicolon prevents a newline
20 PRINT "Goodbye, World!";</langsyntaxhighlight>
 
{{omit from|Craft Basic|No keyword to output without newline}}
{{omit from|SQL PL|It does not provide a command to not add a new line. There is not CALL DBMS_OUTPUT.CURRENT_LINE, only CALL DBMS_OUTPUT.NEW_LINE}}
56

edits