Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,3 @@
---
from: http://rosettacode.org/wiki/Hello_world/Newline_omission
note: Basic language learning

View file

@ -0,0 +1,14 @@
Some languages automatically insert a newline after outputting a string, unless measures are taken to prevent its output.
;Task:
Display the string &nbsp; <big><big><code>Goodbye, World!</code></big></big> &nbsp; without a trailing newline.
;Related tasks:
* &nbsp; [[Hello world/Graphical]]
* &nbsp; [[Hello world/Line Printer]]
* &nbsp; [[Hello world/Standard error]]
* &nbsp; [[Hello world/Text]]
<br><br>

View file

@ -0,0 +1 @@
print(Goodbye, World!, end' )

View file

@ -0,0 +1,18 @@
PrintString:
;input: A0 = source address
;outputs to screen.
MOVE.B (A0)+,D0
BEQ Terminated
JSR PrintChar
BRA PrintString
Terminated:
; If this routine did in fact put a new line by default, it would do so here with the following:
; MOVE.B #13,D0 ;13 is ascii for Carriage Return (moves cursor back to beginning of row).
; JSR PrintChar
; MOVE.B #10,D0 ;10 is ascii for Line Feed (moves cursor down one line).
; JSR PrintChar
RTS
myString:
DC.B "Goodbye, World!",0
EVEN

View file

@ -0,0 +1 @@
(cw "Goodbye, World!")

View file

@ -0,0 +1,3 @@
BEGIN
print ("Goodbye, World!")
END

View file

@ -0,0 +1 @@
implement main0 () = print "Goodbye, World!"

View file

@ -0,0 +1 @@
BEGIN { printf("Goodbye, World!") }

View file

@ -0,0 +1,3 @@
PROC Main()
Print("Goodbye, World!")
RETURN

View file

@ -0,0 +1,6 @@
with Ada.Text_IO;
procedure Goodbye_World is
begin
Ada.Text_IO.Put("Goodbye, World!");
end Goodbye_World;

View file

@ -0,0 +1,8 @@
with Ada.Text_IO;
with Ada.Text_IO.Text_Streams;
procedure Goodbye_World is
stdout: Ada.Text_IO.File_Type := Ada.Text_IO.Standard_Output;
begin
String'Write(Ada.Text_IO.Text_Streams.Stream(stdout), "Goodbye World");
end Goodbye_World;

View file

@ -0,0 +1 @@
io.write( "Goodbye, World!" )

View file

@ -0,0 +1 @@
PRINT "GOODBYE, WORLD!";

View file

@ -0,0 +1 @@
prints "Goodbye, World!"

View file

@ -0,0 +1,3 @@
DllCall("AllocConsole")
FileAppend, Goodbye`, World!, CONOUT$ ; No newline outputted
MsgBox

View file

@ -0,0 +1 @@
ConsoleWrite("Goodbye, World!")

View file

@ -0,0 +1 @@
Disp "Goodbye, World!"

View file

@ -0,0 +1,5 @@
main()
{
putstr("Goodbye, World!");
return(0);
}

View file

@ -0,0 +1,2 @@
10 REM The trailing semicolon prevents a newline
20 PRINT "Goodbye, World!";

View file

@ -0,0 +1,3 @@
print "Goodbye,";
print " ";
print "World!";

View file

@ -0,0 +1,8 @@
REM BBC BASIC accepts the standard trailing semicolon:
PRINT "Goodbye World!";
REM One could also output the characters individually:
GW$ = "Goodbye World!"
FOR i% = 1 TO LEN(GW$)
VDU ASCMID$(GW$, i%)
NEXT

View file

@ -0,0 +1,2 @@
PRINT "Goodbye, World!";
PRINT "Goodbye, World!" FORMAT "%s"

View file

@ -0,0 +1,2 @@
<nul set/p"=Goodbye, World!"
<nul set/p=Goodbye, World!

View file

@ -0,0 +1,3 @@
setlocal enableDelayedExpansion
<nul set/p"=Goodbye, World^!"
<nul set/p=Goodbye, World^^^!

View file

@ -0,0 +1 @@
"Goodbye, World!"

View file

@ -0,0 +1 @@
_`Goodbye, World!

View file

@ -0,0 +1 @@
"!dlroW ,eybdooG">:#,_@

View file

@ -0,0 +1 @@
print('Goodbye, World!')

View file

@ -0,0 +1,2 @@
10 print "Goodbye, w";
20 print "orld!";

View file

@ -0,0 +1 @@
put$"Goodbye, World!"

View file

@ -0,0 +1,3 @@
>+++++[>++++>+>+>++++>>+++<<<+<+<++[>++>+++>+++>++++>+>+[<]>>-]<-]>>
+.>>+..<.--.++>>+.<<+.>>>-.>++.[<]++++[>++++<-]>.>>.+++.------.<-.[>]<+.[-]
[G oo d b y e , W o r l d !]

View file

@ -0,0 +1,6 @@
#include <iostream>
int main() {
std::cout << "Goodbye, World!";
return 0;
}

View file

@ -0,0 +1,2 @@
echo -n "Goodbye, World!"
echo -n "-hyphens and \backslashes"

View file

@ -0,0 +1,13 @@
using System;
class Program
{
static void Main(string[] args)
{
//Using Console.WriteLine() will append a newline
Console.WriteLine("Goodbye, World!");
//Using Console.Write() will not append a newline
Console.Write("Goodbye, World!");
}
}

View file

@ -0,0 +1,7 @@
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char *argv[]) {
(void) printf("Goodbye, World!"); /* No automatic newline */
return EXIT_SUCCESS;
}

View file

@ -0,0 +1,9 @@
IDENTIFICATION DIVISION.
PROGRAM-ID. GOODBYE-WORLD.
PROCEDURE DIVISION.
DISPLAY 'Goodbye, World!'
WITH NO ADVANCING
END-DISPLAY
.
STOP RUN.

View file

@ -0,0 +1 @@
print "Goodbye, World!"; '' the trailing semi-colon suppresses the new line

View file

@ -0,0 +1 @@
?? "Goodbye, World!"

View file

@ -0,0 +1 @@
(print "Goodbye, World!")

View file

@ -0,0 +1 @@
process.stdout.write "Goodbye, World!"

View file

@ -0,0 +1,7 @@
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
40 rem BASIC will print 'READY' at a new line anyway.
50 rem * So, we just print additional message...
60 print "(End of the world)"
70 end

View file

@ -0,0 +1 @@
(princ "Goodbye, World!")

View file

@ -0,0 +1,45 @@
'In a window
DEF Win:WINDOW
DEF Close:CHAR
DEF ScreenSizeX,ScreenSizeY:INT
GETSCREENSIZE(ScreenSizeX,ScreenSizeY)
WINDOW Win,0,0,ScreenSizeX,ScreenSizeY,0,0,"Goodbye program",MainHandler
PRINT Win,"Goodbye, World!"
'Prints in the upper left corner of the window (position 0,0).
PRINT"Win," I ride off into the sunset."
'There does not appear to be a means of starting a new line when printing in a window, other than by using the MOVE command.
'Therefore, both sentences here will print on the same line, i.e., in the same vertical position.
WAITUNTIL Close=1
CLOSEWINDOW Win
END
SUB MainHandler
IF @CLASS=@IDCLOSEWINDOW THEN Close=1
RETURN
'In the console
OPENCONSOLE
'Insert a trailing comma.
PRINT"Goodbye, World!",
PRINT" I ride off into the sunset."
PRINT:PRINT"Press any key to end."
DO:UNTIL INKEY$<>""
CLOSECONSOLE
'Since this a Cbasic console program.
END

View file

@ -0,0 +1,5 @@
import std.stdio;
void main() {
write("Goodbye, World!");
}

View file

@ -0,0 +1 @@
Print('Goodbye, World!');

View file

@ -0,0 +1,5 @@
import 'dart:io';
void main() {
stdout.write("Goodbye, World!");
}

View file

@ -0,0 +1 @@
[Goodbye, World!]P

View file

@ -0,0 +1 @@
370913249815566165486152944077005857 P

View file

@ -0,0 +1,7 @@
program Project1;
{$APPTYPE CONSOLE}
begin
Write('Goodbye, World!');
end.

View file

@ -0,0 +1 @@
print("Goodbye, World!", terminator: "")

View file

@ -0,0 +1 @@
Console::Write("Goodbye, World!")

View file

@ -0,0 +1,16 @@
//compile using the new dylan.NET v, 11.5.1.2 or later
//use mono to run the compiler
#refstdasm mscorlib.dll
import System
assembly gdbyeex exe
ver 1.2.0.0
class public Program
method public static void main()
Console::Write("Goodbye, World!")
end method
end class

View file

@ -0,0 +1 @@
write("Goodbye, World!")

View file

@ -0,0 +1,3 @@
.......
PRINT("Goodbye, World!";)
.......

View file

@ -0,0 +1 @@
write "Goodbye, World!"

View file

@ -0,0 +1,3 @@
(begin
(write "GoodBye, World")
(write "Next on same line"))

View file

@ -0,0 +1,5 @@
public program()
{
//print will not append a newline
console.write("Goodbye, World!")
}

View file

@ -0,0 +1 @@
IO.write "Goodbye, World!"

View file

@ -0,0 +1 @@
(princ "Goodbye, World!")

View file

@ -0,0 +1 @@
io:format("Goodbye, world!").

View file

@ -0,0 +1,2 @@
-- In Euphoria puts() does not insert a newline character after outputting a string
puts(1,"Goodbye, world!")

View file

@ -0,0 +1,8 @@
// A program that will run in the interpreter (fsi.exe)
printf "Goodbye, World!";;
// A compiled program
[<EntryPoint>]
let main args =
printf "Goodbye, World!"
0

View file

@ -0,0 +1 @@
TYPE "Goodbye, World!"

View file

@ -0,0 +1,2 @@
USE: io
"Goodbye, World!" write

View file

@ -0,0 +1 @@
print("Goodbye, World!")

View file

@ -0,0 +1 @@
>> "Goodbye, World!"

View file

@ -0,0 +1,5 @@
class Main {
Void main() {
echo("Goodbye, World!")
}
}

View file

@ -0,0 +1,2 @@
\ The Forth word ." does not insert a newline character after outputting a string
." Goodbye, World!"

View file

@ -0,0 +1,3 @@
program bye
write (*,'(a)',advance='no') 'Goodbye, World!'
end program bye

View file

@ -0,0 +1,3 @@
WRITE (6,1) "Goodbye, World!"
1 FORMAT (A,$)
END

View file

@ -0,0 +1,4 @@
' FB 1.05.0 Win64
Print "Goodbye, World!"; '' the trailing semi-colon suppresses the new line
Sleep

View file

@ -0,0 +1 @@
print["Goodbye, World!"]

View file

@ -0,0 +1,29 @@
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

View file

@ -0,0 +1 @@
show_message("Goodbye, World!")

View file

@ -0,0 +1 @@
Start,Programs,Accessories,Notepad,Type:Goodbye World[pling]

View file

@ -0,0 +1 @@
10 PRINT "Goodbye, World!"; '' the trailing semi-colon suppresses the new line

View file

@ -0,0 +1,6 @@
Public Sub Main()
Print "Goodbye, "; 'The semicolon stops the newline being added
Print "World!"
End

View file

@ -0,0 +1 @@
'Hello, <> 'World! print

View file

@ -0,0 +1,8 @@
[indent=4]
/*
Hello, with no newline, in Genie
valac helloNoNewline.gs
*/
init
stdout.printf("%s", "Goodbye, World!")

View file

@ -0,0 +1,5 @@
package main
import "fmt"
func main() { fmt.Print("Goodbye, World!") }

View file

@ -0,0 +1 @@
print "Goodbye, world"

View file

@ -0,0 +1,3 @@
?? "Goodbye, world"
or
QQout( "Goodbye, world" )

View file

@ -0,0 +1 @@
main = putStr "Goodbye, world"

View file

@ -0,0 +1 @@
"Goodbye, World!";

View file

@ -0,0 +1,8 @@
#! /bin/sh
exec huginn --no-argv -E "${0}" "${@}"
#! huginn
main() {
print( "Goodbye, World!" );
return ( 0 );
}

View file

@ -0,0 +1 @@
10 PRINT "Goodbye, World! ";

View file

@ -0,0 +1,46 @@
'In a window
DEF Win:WINDOW
DEF Close:CHAR
DEF ScreenSizeX,ScreenSizeY:UINT
GETSCREENSIZE(ScreenSizeX,ScreenSizeY)
OPENWINDOW Win,0,0,ScreenSizeX,ScreenSizeY,NULL,NULL,"Goodbye program",&MainHandler
PRINT Win,"Goodbye, World!"
'Prints in upper left corner of the window (position 0,0).
PRINT Win," You won't have this program to kick around anymore."
'There does not appear to be a means of starting a new line when printing in a window, other than by using the MOVE command.
'Therefore, both sentences here will print on the same line, i.e., in the same vertical position.
WAITUNTIL Close=1
CLOSEWINDOW Win
END
SUB MainHandler
IF @MESSAGE=@IDCLOSEWINDOW THEN Close=1
RETURN
ENDSUB
'In the console
OPENCONSOLE
'by inserting a trailing comma.
PRINT"Goodbye, World!",
PRINT" You won't have this program to kick around anymore."
PRINT:PRINT
'A press any key to continue message is automatic in a program compiled as console only.
'I presume the compiler adds the code.
CLOSECONSOLE
'Since this an IWBASIC console program.
END

View file

@ -0,0 +1,3 @@
procedure main()
writes("Goodbye, World!")
end

View file

@ -0,0 +1 @@
write("Goodbye, World!")

View file

@ -0,0 +1,2 @@
'Goodbye, World!' 1!:3 <'/proc/self/fd/1'
Goodbye, World!

View file

@ -0,0 +1,3 @@
load 'general/misc/prompt'
prompt 'Goodbye, World!'
Goodbye, World!

View file

@ -0,0 +1,6 @@
class Main {
function void main () {
do Output.printString("Goodbye, World!");und
return;
}
}

View file

@ -0,0 +1,3 @@
fn main() {
print("Goodbye, World!")
}

View file

@ -0,0 +1 @@
(prin "Goodbye, World!")

View file

@ -0,0 +1,7 @@
public class HelloWorld
{
public static void main(String[] args)
{
System.out.print("Goodbye, World!");
}
}

View file

@ -0,0 +1 @@
process.stdout.write("Goodbye, World!");

View file

@ -0,0 +1 @@
"Goodbye, World!" putchars.

View file

@ -0,0 +1,2 @@
$ jq -n -j '"Goodbye, World!"'
Goodbye, World!$

View file

@ -0,0 +1,2 @@
$ echo '"Goodbye, World!"' | jq -j
Goodbye, World!$

View file

@ -0,0 +1 @@
printf("Goodbye, World!")

Some files were not shown because too many files have changed in this diff Show more