task_url
stringlengths
30
116
task_name
stringlengths
2
86
task_description
stringlengths
0
14.4k
language_url
stringlengths
2
53
language_name
stringlengths
1
52
code
stringlengths
0
61.9k
http://rosettacode.org/wiki/Hello_world/Line_printer
Hello world/Line printer
Task Cause a line printer attached to the computer to print a line containing the message:   Hello World! Note A line printer is not the same as standard output. A   line printer   was an older-style printer which prints one line at a time to a continuous ream of paper. With some systems, a line printer can be...
#AutoHotkey
AutoHotkey
  Fileappend, Hello World!, print.txt Run, print "print.txt"  
http://rosettacode.org/wiki/Higher-order_functions
Higher-order functions
Task Pass a function     as an argument     to another function. Related task   First-class functions
#Q
Q
  q)sayHi:{-1"Hello ",x;} q)callFuncWithParam:{x["Peter"]} q)callFuncWithParam sayHi Hello Peter q)callFuncWithParam[sayHi] Hello Peter
http://rosettacode.org/wiki/Hello_world/Text
Hello world/Text
Hello world/Text is part of Short Circuit's Console Program Basics selection. Task Display the string Hello world! on a text console. Related tasks   Hello world/Graphical   Hello world/Line Printer   Hello world/Newbie   Hello world/Newline omission   Hello world/Standard error   Hello world/Web server
#CoffeeScript
CoffeeScript
console.log "Hello world!"
http://rosettacode.org/wiki/Hello_world/Line_printer
Hello world/Line printer
Task Cause a line printer attached to the computer to print a line containing the message:   Hello World! Note A line printer is not the same as standard output. A   line printer   was an older-style printer which prints one line at a time to a continuous ream of paper. With some systems, a line printer can be...
#AWK
AWK
  BEGIN { print("Hello World!") >"/dev/lp0" }  
http://rosettacode.org/wiki/Hello_world/Line_printer
Hello world/Line printer
Task Cause a line printer attached to the computer to print a line containing the message:   Hello World! Note A line printer is not the same as standard output. A   line printer   was an older-style printer which prints one line at a time to a continuous ream of paper. With some systems, a line printer can be...
#BASIC
BASIC
LPRINT "Hello World!"
http://rosettacode.org/wiki/Higher-order_functions
Higher-order functions
Task Pass a function     as an argument     to another function. Related task   First-class functions
#Quackery
Quackery
[ over [] = iff drop done dip [ behead swap ' [ witheach ] ] nested join do ] is fold ( [ x --> x ) [ ' [ [ ] ] rot join swap nested ' [ nested join ] join fold ] is map ( [ x --> [ ) [ ' [ [ ] ] rot join swap nested ' dup swap join ' [ i...
http://rosettacode.org/wiki/Hello_world/Text
Hello world/Text
Hello world/Text is part of Short Circuit's Console Program Basics selection. Task Display the string Hello world! on a text console. Related tasks   Hello world/Graphical   Hello world/Line Printer   Hello world/Newbie   Hello world/Newline omission   Hello world/Standard error   Hello world/Web server
#ColdFusion
ColdFusion
<cfoutput>Hello world!</cfoutput>
http://rosettacode.org/wiki/Hello_world/Line_printer
Hello world/Line printer
Task Cause a line printer attached to the computer to print a line containing the message:   Hello World! Note A line printer is not the same as standard output. A   line printer   was an older-style printer which prints one line at a time to a continuous ream of paper. With some systems, a line printer can be...
#Batch_File
Batch File
ECHO Hello world!>PRN
http://rosettacode.org/wiki/Hello_world/Line_printer
Hello world/Line printer
Task Cause a line printer attached to the computer to print a line containing the message:   Hello World! Note A line printer is not the same as standard output. A   line printer   was an older-style printer which prints one line at a time to a continuous ream of paper. With some systems, a line printer can be...
#C
C
#include <stdio.h>   int main() { FILE *lp; lp = fopen("/dev/lp0","w"); fprintf(lp,"Hello world!\n"); fclose(lp); return 0; }
http://rosettacode.org/wiki/Higher-order_functions
Higher-order functions
Task Pass a function     as an argument     to another function. Related task   First-class functions
#R
R
f <- function(f0) f0(pi) # calc. the function in pi tf <- function(x) x^pi # a func. just to test   print(f(sin)) print(f(cos)) print(f(tf))
http://rosettacode.org/wiki/Hello_world/Text
Hello world/Text
Hello world/Text is part of Short Circuit's Console Program Basics selection. Task Display the string Hello world! on a text console. Related tasks   Hello world/Graphical   Hello world/Line Printer   Hello world/Newbie   Hello world/Newline omission   Hello world/Standard error   Hello world/Web server
#Comal
Comal
PRINT "Hello world!"
http://rosettacode.org/wiki/Hello_world/Line_printer
Hello world/Line printer
Task Cause a line printer attached to the computer to print a line containing the message:   Hello World! Note A line printer is not the same as standard output. A   line printer   was an older-style printer which prints one line at a time to a continuous ream of paper. With some systems, a line printer can be...
#C.23
C#
  [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)] public class DOCINFOA { [MarshalAs(UnmanagedType.LPStr)] public string pDocName; [MarshalAs(UnmanagedType.LPStr)] public string pOutputFile; [MarshalAs(UnmanagedType.LPStr)] public string pDataType; }   [DllImport("winspool.Drv", En...
http://rosettacode.org/wiki/Higher-order_functions
Higher-order functions
Task Pass a function     as an argument     to another function. Related task   First-class functions
#Racket
Racket
  #lang racket/base (define (add f g x) (+ (f x) (g x))) (add sin cos 10)  
http://rosettacode.org/wiki/Hello_world/Text
Hello world/Text
Hello world/Text is part of Short Circuit's Console Program Basics selection. Task Display the string Hello world! on a text console. Related tasks   Hello world/Graphical   Hello world/Line Printer   Hello world/Newbie   Hello world/Newline omission   Hello world/Standard error   Hello world/Web server
#Comefrom0x10
Comefrom0x10
'Hello world!'
http://rosettacode.org/wiki/Hello_world/Line_printer
Hello world/Line printer
Task Cause a line printer attached to the computer to print a line containing the message:   Hello World! Note A line printer is not the same as standard output. A   line printer   was an older-style printer which prints one line at a time to a continuous ream of paper. With some systems, a line printer can be...
#C.2B.2B
C++
#include <iostream> #include <fstream>   int main(){ std::ofstream lprFile; lprFile.open( "/dev/lp0" ); lprFile << "Hello World!\n"; lprFile.close(); return 0; }
http://rosettacode.org/wiki/Hello_world/Line_printer
Hello world/Line printer
Task Cause a line printer attached to the computer to print a line containing the message:   Hello World! Note A line printer is not the same as standard output. A   line printer   was an older-style printer which prints one line at a time to a continuous ream of paper. With some systems, a line printer can be...
#Clipper
Clipper
SET PRINT ON SET CONSOLE OFF ? "Hello World!" SET PRINT OFF SET CONSOLE ON  
http://rosettacode.org/wiki/Higher-order_functions
Higher-order functions
Task Pass a function     as an argument     to another function. Related task   First-class functions
#Raku
Raku
sub twice(&todo) { todo(); todo(); # declaring &todo also defines bare function } twice { say "Boing!" } # output: # Boing! # Boing!   sub twice-with-param(&todo) { todo(0); todo(1); } twice-with-param -> $time { say "{$time+1}: Hello!" } # output: # 1: Hello! # 2: Hello!
http://rosettacode.org/wiki/Hello_world/Text
Hello world/Text
Hello world/Text is part of Short Circuit's Console Program Basics selection. Task Display the string Hello world! on a text console. Related tasks   Hello world/Graphical   Hello world/Line Printer   Hello world/Newbie   Hello world/Newline omission   Hello world/Standard error   Hello world/Web server
#Commodore_BASIC
Commodore BASIC
10 print chr$(147);chr$(14);:REM 147=clear screen, 14=switch to lowercase mode 20 print "Hello world!" 30 end  
http://rosettacode.org/wiki/Hello_world/Line_printer
Hello world/Line printer
Task Cause a line printer attached to the computer to print a line containing the message:   Hello World! Note A line printer is not the same as standard output. A   line printer   was an older-style printer which prints one line at a time to a continuous ream of paper. With some systems, a line printer can be...
#Clojure
Clojure
(ns rosetta-code.line-printer (:import java.io.FileWriter))   (defn -main [& args] (with-open [wr (new FileWriter "/dev/lp0")] (.write wr "Hello, World!")))
http://rosettacode.org/wiki/Hello_world/Line_printer
Hello world/Line printer
Task Cause a line printer attached to the computer to print a line containing the message:   Hello World! Note A line printer is not the same as standard output. A   line printer   was an older-style printer which prints one line at a time to a continuous ream of paper. With some systems, a line printer can be...
#COBOL
COBOL
IDENTIFICATION DIVISION. PROGRAM-ID. GOODBYE-WORLD-PRINTER.   PROCEDURE DIVISION. DISPLAY 'Hello World!' UPON PRINTER END-DISPLAY. STOP RUN.
http://rosettacode.org/wiki/Higher-order_functions
Higher-order functions
Task Pass a function     as an argument     to another function. Related task   First-class functions
#Raven
Raven
define doit use $v1 "doit called with " print $v1 print "\n" print   define callit use $v2 "callit called with " print $v2 print "\n" print $v2 call   23.54 "doit" callit
http://rosettacode.org/wiki/Hello_world/Text
Hello world/Text
Hello world/Text is part of Short Circuit's Console Program Basics selection. Task Display the string Hello world! on a text console. Related tasks   Hello world/Graphical   Hello world/Line Printer   Hello world/Newbie   Hello world/Newline omission   Hello world/Standard error   Hello world/Web server
#Common_Lisp
Common Lisp
(format t "Hello world!~%")
http://rosettacode.org/wiki/Hello_world/Line_printer
Hello world/Line printer
Task Cause a line printer attached to the computer to print a line containing the message:   Hello World! Note A line printer is not the same as standard output. A   line printer   was an older-style printer which prints one line at a time to a continuous ream of paper. With some systems, a line printer can be...
#Commodore_BASIC
Commodore BASIC
  10 rem rosetta code - "Hello World" on line printer 20 open 7,4 : rem open <logical file number>, <device number> 30 print#7,"hello world!" : rem print line as shown to logical file number 40 close 7 : rem close the file number  
http://rosettacode.org/wiki/Hello_world/Line_printer
Hello world/Line printer
Task Cause a line printer attached to the computer to print a line containing the message:   Hello World! Note A line printer is not the same as standard output. A   line printer   was an older-style printer which prints one line at a time to a continuous ream of paper. With some systems, a line printer can be...
#Common_Lisp
Common Lisp
(defun main () (with-open-file (stream "/dev/lp0" :direction :output :if-exists :append) (format stream "Hello World~%"))) (main)  
http://rosettacode.org/wiki/Higher-order_functions
Higher-order functions
Task Pass a function     as an argument     to another function. Related task   First-class functions
#REBOL
REBOL
rebol [ Title: "Function Argument" URL: http://rosettacode.org/wiki/Function_as_an_Argument ]   map: func [ "Apply function to contents of list, return new list." f [function!] "Function to apply to list." data [block! list!] "List to transform." /local result i ][ result: copy [] repeat i data [append result f...
http://rosettacode.org/wiki/Hello_world/Text
Hello world/Text
Hello world/Text is part of Short Circuit's Console Program Basics selection. Task Display the string Hello world! on a text console. Related tasks   Hello world/Graphical   Hello world/Line Printer   Hello world/Newbie   Hello world/Newline omission   Hello world/Standard error   Hello world/Web server
#Component_Pascal
Component Pascal
  MODULE Hello; IMPORT Out;   PROCEDURE Do*; BEGIN Out.String("Hello world!"); Out.Ln END Do; END Hello.
http://rosettacode.org/wiki/Hello_world/Line_printer
Hello world/Line printer
Task Cause a line printer attached to the computer to print a line containing the message:   Hello World! Note A line printer is not the same as standard output. A   line printer   was an older-style printer which prints one line at a time to a continuous ream of paper. With some systems, a line printer can be...
#D
D
import std.stdio;   void main() { auto lp = File("/dev/lp0", "w"); lp.writeln("Hello World!"); }  
http://rosettacode.org/wiki/Hello_world/Line_printer
Hello world/Line printer
Task Cause a line printer attached to the computer to print a line containing the message:   Hello World! Note A line printer is not the same as standard output. A   line printer   was an older-style printer which prints one line at a time to a continuous ream of paper. With some systems, a line printer can be...
#Delphi
Delphi
program Project1;   {$APPTYPE CONSOLE}   uses Printers;   var lPrinterAsTextFile: TextFile; begin AssignPrn(lPrinterAsTextFile); Rewrite(lPrinterAsTextFile); Writeln(lPrinterAsTextFile, 'Hello World!'); CloseFile(lPrinterAsTextFile); end.
http://rosettacode.org/wiki/Higher-order_functions
Higher-order functions
Task Pass a function     as an argument     to another function. Related task   First-class functions
#Retro
Retro
:disp (nq-) call n:put ;   #31 [ (n-n) #100 * ] disp  
http://rosettacode.org/wiki/Hello_world/Text
Hello world/Text
Hello world/Text is part of Short Circuit's Console Program Basics selection. Task Display the string Hello world! on a text console. Related tasks   Hello world/Graphical   Hello world/Line Printer   Hello world/Newbie   Hello world/Newline omission   Hello world/Standard error   Hello world/Web server
#Coq
Coq
  Require Import Coq.Strings.String.   Eval compute in ("Hello world!"%string).  
http://rosettacode.org/wiki/Hello_world/Line_printer
Hello world/Line printer
Task Cause a line printer attached to the computer to print a line containing the message:   Hello World! Note A line printer is not the same as standard output. A   line printer   was an older-style printer which prints one line at a time to a continuous ream of paper. With some systems, a line printer can be...
#Diego
Diego
with_computer(comp1)_printer(lp1)_text(Hello World!);
http://rosettacode.org/wiki/Hello_world/Line_printer
Hello world/Line printer
Task Cause a line printer attached to the computer to print a line containing the message:   Hello World! Note A line printer is not the same as standard output. A   line printer   was an older-style printer which prints one line at a time to a continuous ream of paper. With some systems, a line printer can be...
#Dragon
Dragon
  select "files"   f2 = fopen("E:\my.txt", "w") f = "my data" writeText(f2,f) flush(f2) fclose(f2)  
http://rosettacode.org/wiki/Hello_world/Line_printer
Hello world/Line printer
Task Cause a line printer attached to the computer to print a line containing the message:   Hello World! Note A line printer is not the same as standard output. A   line printer   was an older-style printer which prints one line at a time to a continuous ream of paper. With some systems, a line printer can be...
#EchoLisp
EchoLisp
  (printer-font "Courier") ;; change printer font (printer-page "ROSETTA CODE") ;; starts a new page with nice header (printer-writeln "Hello World!") ;; prints new line (not seen on stdout)  
http://rosettacode.org/wiki/Higher-order_functions
Higher-order functions
Task Pass a function     as an argument     to another function. Related task   First-class functions
#REXX
REXX
/*REXX program demonstrates the passing of a name of a function to another function. */ call function 'fact' , 6; say right( 'fact{'$"} = ", 30) result call function 'square' , 13; say right( 'square{'$"} = ", 30) result call function 'cube' , 3; say right( 'cub...
http://rosettacode.org/wiki/Hello_world/Text
Hello world/Text
Hello world/Text is part of Short Circuit's Console Program Basics selection. Task Display the string Hello world! on a text console. Related tasks   Hello world/Graphical   Hello world/Line Printer   Hello world/Newbie   Hello world/Newline omission   Hello world/Standard error   Hello world/Web server
#Corescript
Corescript
print Hello world!
http://rosettacode.org/wiki/Hello_world/Line_printer
Hello world/Line printer
Task Cause a line printer attached to the computer to print a line containing the message:   Hello World! Note A line printer is not the same as standard output. A   line printer   was an older-style printer which prints one line at a time to a continuous ream of paper. With some systems, a line printer can be...
#EDSAC_order_code
EDSAC order code
[ Hello world ===========   A program for the EDSAC   Can be used to print any character string: the string (including necessary *F and #F characters) should be stored in sequential memory addresses beginning at @+17.   The last character of the string should be marked with a 1 in the least significant ...
http://rosettacode.org/wiki/Hello_world/Line_printer
Hello world/Line printer
Task Cause a line printer attached to the computer to print a line containing the message:   Hello World! Note A line printer is not the same as standard output. A   line printer   was an older-style printer which prints one line at a time to a continuous ream of paper. With some systems, a line printer can be...
#ERRE
ERRE
  ! Hello World in ERRE language PROGRAM HELLO BEGIN  !$REDIR PRINT("Hello World !")  !$NOREDIR END PROGRAM  
http://rosettacode.org/wiki/Hello_world/Line_printer
Hello world/Line printer
Task Cause a line printer attached to the computer to print a line containing the message:   Hello World! Note A line printer is not the same as standard output. A   line printer   was an older-style printer which prints one line at a time to a continuous ream of paper. With some systems, a line printer can be...
#Factor
Factor
( scratchpad ) USE: io.encodings.utf8 ( scratchpad ) USE: io.launcher ( scratchpad ) "lpr" utf8 [ "Hello World!" print ] with-process-writer
http://rosettacode.org/wiki/Higher-order_functions
Higher-order functions
Task Pass a function     as an argument     to another function. Related task   First-class functions
#Ring
Ring
  # Project : Higher-order functions   docalcs(1,10,"squares",:square) docalcs(1,10,"cubes",:cube)   func square(n) return n * n   func cube(n) return n * n * n   func docalcs(from2,upto,title,func2) see title + " -> " + nl for i = from2 to upto x = call func2(i) ...
http://rosettacode.org/wiki/Hello_world/Text
Hello world/Text
Hello world/Text is part of Short Circuit's Console Program Basics selection. Task Display the string Hello world! on a text console. Related tasks   Hello world/Graphical   Hello world/Line Printer   Hello world/Newbie   Hello world/Newline omission   Hello world/Standard error   Hello world/Web server
#Cowgol
Cowgol
include "cowgol.coh"; print("Hello world!"); print_nl();
http://rosettacode.org/wiki/Hello_world/Line_printer
Hello world/Line printer
Task Cause a line printer attached to the computer to print a line containing the message:   Hello World! Note A line printer is not the same as standard output. A   line printer   was an older-style printer which prints one line at a time to a continuous ream of paper. With some systems, a line printer can be...
#Forth
Forth
\ No operating system, embedded device, printer output example   defer emit \ deferred words in Forth are a place holder for an \ execution token (XT) that is assigned later. \ When executed the ...
http://rosettacode.org/wiki/Hello_world/Line_printer
Hello world/Line printer
Task Cause a line printer attached to the computer to print a line containing the message:   Hello World! Note A line printer is not the same as standard output. A   line printer   was an older-style printer which prints one line at a time to a continuous ream of paper. With some systems, a line printer can be...
#Fortran
Fortran
+ No movement - thus overprint. (a blank) Advance one line. 0 Advance two lines - thus leave a blank line. 1 Page throw.
http://rosettacode.org/wiki/Hello_world/Line_printer
Hello world/Line printer
Task Cause a line printer attached to the computer to print a line containing the message:   Hello World! Note A line printer is not the same as standard output. A   line printer   was an older-style printer which prints one line at a time to a continuous ream of paper. With some systems, a line printer can be...
#FreeBASIC
FreeBASIC
' FB 1.05.0 Win64   Open Lpt "Lpt:" As #1 '' prints to default printer Print #1, "Hello World!" Close #1
http://rosettacode.org/wiki/Higher-order_functions
Higher-order functions
Task Pass a function     as an argument     to another function. Related task   First-class functions
#Ruby
Ruby
succ = proc{|x| x+1} def to2(&f) f[2] end   to2(&succ) #=> 3 to2{|x| x+1} #=> 3
http://rosettacode.org/wiki/Hello_world/Text
Hello world/Text
Hello world/Text is part of Short Circuit's Console Program Basics selection. Task Display the string Hello world! on a text console. Related tasks   Hello world/Graphical   Hello world/Line Printer   Hello world/Newbie   Hello world/Newline omission   Hello world/Standard error   Hello world/Web server
#Crack
Crack
  import crack.io cout; cout `Hello world!\n`;  
http://rosettacode.org/wiki/Hello_world/Line_printer
Hello world/Line printer
Task Cause a line printer attached to the computer to print a line containing the message:   Hello World! Note A line printer is not the same as standard output. A   line printer   was an older-style printer which prints one line at a time to a continuous ream of paper. With some systems, a line printer can be...
#Go
Go
package main   import ( "fmt" "os" )   func main() { lp0, err := os.Create("/dev/lp0")   if err != nil { panic(err) }   defer lp0.Close()   fmt.Fprintln(lp0, "Hello World!") }
http://rosettacode.org/wiki/Hello_world/Line_printer
Hello world/Line printer
Task Cause a line printer attached to the computer to print a line containing the message:   Hello World! Note A line printer is not the same as standard output. A   line printer   was an older-style printer which prints one line at a time to a continuous ream of paper. With some systems, a line printer can be...
#Groovy
Groovy
new File('/dev/lp0').write('Hello World!\n')  
http://rosettacode.org/wiki/Higher-order_functions
Higher-order functions
Task Pass a function     as an argument     to another function. Related task   First-class functions
#Rust
Rust
fn execute_with_10<F: Fn(u64) -> u64> (f: F) -> u64 { f(10) }   fn square(n: u64) -> u64 { n*n }   fn main() { println!("{}", execute_with_10(|n| n*n )); // closure println!("{}", execute_with_10(square)); // function }
http://rosettacode.org/wiki/Hello_world/Text
Hello world/Text
Hello world/Text is part of Short Circuit's Console Program Basics selection. Task Display the string Hello world! on a text console. Related tasks   Hello world/Graphical   Hello world/Line Printer   Hello world/Newbie   Hello world/Newline omission   Hello world/Standard error   Hello world/Web server
#Creative_Basic
Creative Basic
  OPENCONSOLE   PRINT"Hello world!"   'This line could be left out. PRINT:PRINT:PRINT"Press any key to end."   'Keep the console from closing right away so the text can be read. DO:UNTIL INKEY$<>""   CLOSECONSOLE   END  
http://rosettacode.org/wiki/Hello_world/Line_printer
Hello world/Line printer
Task Cause a line printer attached to the computer to print a line containing the message:   Hello World! Note A line printer is not the same as standard output. A   line printer   was an older-style printer which prints one line at a time to a continuous ream of paper. With some systems, a line printer can be...
#GUISS
GUISS
Start,Programs,Accessories,Notepad,Type:Goodbye World[pling], Menu:File,Print,Button:OK
http://rosettacode.org/wiki/Hello_world/Line_printer
Hello world/Line printer
Task Cause a line printer attached to the computer to print a line containing the message:   Hello World! Note A line printer is not the same as standard output. A   line printer   was an older-style printer which prints one line at a time to a continuous ream of paper. With some systems, a line printer can be...
#Harbour
Harbour
SET PRINT ON SET CONSOLE OFF ? "Hello World!" SET PRINT OFF SET CONSOLE ON
http://rosettacode.org/wiki/Hash_join
Hash join
An inner join is an operation that combines two data tables into one table, based on matching column values. The simplest way of implementing this operation is the nested loop join algorithm, but a more scalable alternative is the hash join algorithm. Task[edit] Implement the "hash join" algorithm, and demonstrate tha...
#11l
11l
F hash_join(table1, table2) DefaultDict[String, [(Int, String)]] h L(s) table1 h[s[1]].append(s)   [((Int, String), (String, String))] res L(r) table2 L(s) h[r[0]] res [+]= (s, r) R res   V table1 = [(27, ‘Jonah’), (18, ‘Alan’), (28, ‘Glory’), (18,...
http://rosettacode.org/wiki/Higher-order_functions
Higher-order functions
Task Pass a function     as an argument     to another function. Related task   First-class functions
#Scala
Scala
def functionWithAFunctionArgument(x : int, y : int, f : (int, int) => int) = f(x,y)
http://rosettacode.org/wiki/Hello_world/Text
Hello world/Text
Hello world/Text is part of Short Circuit's Console Program Basics selection. Task Display the string Hello world! on a text console. Related tasks   Hello world/Graphical   Hello world/Line Printer   Hello world/Newbie   Hello world/Newline omission   Hello world/Standard error   Hello world/Web server
#Crystal
Crystal
puts "Hello world!"
http://rosettacode.org/wiki/Hello_world/Line_printer
Hello world/Line printer
Task Cause a line printer attached to the computer to print a line containing the message:   Hello World! Note A line printer is not the same as standard output. A   line printer   was an older-style printer which prints one line at a time to a continuous ream of paper. With some systems, a line printer can be...
#Haskell
Haskell
import System.Process (ProcessHandle, runCommand)   main :: IO ProcessHandle main = runCommand "echo \"Hello World!\" | lpr"
http://rosettacode.org/wiki/Hello_world/Line_printer
Hello world/Line printer
Task Cause a line printer attached to the computer to print a line containing the message:   Hello World! Note A line printer is not the same as standard output. A   line printer   was an older-style printer which prints one line at a time to a continuous ream of paper. With some systems, a line printer can be...
#Icon_and_Unicon
Icon and Unicon
procedure main() write(open("/dev/lp0","w"),"Hello, world!") end
http://rosettacode.org/wiki/Hash_join
Hash join
An inner join is an operation that combines two data tables into one table, based on matching column values. The simplest way of implementing this operation is the nested loop join algorithm, but a more scalable alternative is the hash join algorithm. Task[edit] Implement the "hash join" algorithm, and demonstrate tha...
#AppleScript
AppleScript
use framework "Foundation" -- Yosemite onwards, for record-handling functions   -- HASH JOIN -----------------------------------------------------------------   -- hashJoin :: [Record] -> [Record] -> String -> [Record] on hashJoin(tblA, tblB, strJoin) set {jA, jB} to splitOn("=", strJoin)   script instanceOfjB ...
http://rosettacode.org/wiki/Higher-order_functions
Higher-order functions
Task Pass a function     as an argument     to another function. Related task   First-class functions
#Scheme
Scheme
> (define (func1 f) (f "a string")) > (define (func2 s) (string-append "func2 called with " s)) > (begin (display (func1 func2)) (newline)) func2 called with a string
http://rosettacode.org/wiki/Hello_world/Text
Hello world/Text
Hello world/Text is part of Short Circuit's Console Program Basics selection. Task Display the string Hello world! on a text console. Related tasks   Hello world/Graphical   Hello world/Line Printer   Hello world/Newbie   Hello world/Newline omission   Hello world/Standard error   Hello world/Web server
#D
D
import std.stdio;   void main() { writeln("Hello world!"); }
http://rosettacode.org/wiki/Hello_world/Line_printer
Hello world/Line printer
Task Cause a line printer attached to the computer to print a line containing the message:   Hello World! Note A line printer is not the same as standard output. A   line printer   was an older-style printer which prints one line at a time to a continuous ream of paper. With some systems, a line printer can be...
#Integer_BASIC
Integer BASIC
require'print' print'Hello world!'
http://rosettacode.org/wiki/Hello_world/Line_printer
Hello world/Line printer
Task Cause a line printer attached to the computer to print a line containing the message:   Hello World! Note A line printer is not the same as standard output. A   line printer   was an older-style printer which prints one line at a time to a continuous ream of paper. With some systems, a line printer can be...
#J
J
require'print' print'Hello world!'
http://rosettacode.org/wiki/Harshad_or_Niven_series
Harshad or Niven series
The Harshad or Niven numbers are positive integers ≥ 1 that are divisible by the sum of their digits. For example,   42   is a Harshad number as   42   is divisible by   (4 + 2)   without remainder. Assume that the series is defined as the numbers in increasing order. Task The task is to create a function/method/...
#11l
11l
F is_harshad(n) R n % sum(String(n).map(ch -> Int(ch))) == 0   F harshad(num) [Int] r L(n) 1.. I is_harshad(n) r [+]= n I r.len == num R r   print(harshad(20))   L(n) 1001.. I is_harshad(n) print(n) L.break
http://rosettacode.org/wiki/Hello_world/Newbie
Hello world/Newbie
Task Guide a new user of a language through the steps necessary to install the programming language and selection of a text editor if needed, to run the languages' example in the Hello world/Text task. Assume the language-newbie is a programmer in another language. Assume the language-newbie is competent in install...
#11l
11l
print("Hello world!")
http://rosettacode.org/wiki/Hash_join
Hash join
An inner join is an operation that combines two data tables into one table, based on matching column values. The simplest way of implementing this operation is the nested loop join algorithm, but a more scalable alternative is the hash join algorithm. Task[edit] Implement the "hash join" algorithm, and demonstrate tha...
#AWK
AWK
  # syntax: GAWK -f HASH_JOIN.AWK [-v debug={0|1}] TABLE_A TABLE_B # # sorting: # PROCINFO["sorted_in"] is used by GAWK # SORTTYPE is used by Thompson Automation's TAWK # BEGIN { FS = "," PROCINFO["sorted_in"] = "@ind_str_asc" ; SORTTYPE = 1 if (ARGC-1 != 2) { print("error: incorrect number of arg...
http://rosettacode.org/wiki/Higher-order_functions
Higher-order functions
Task Pass a function     as an argument     to another function. Related task   First-class functions
#SenseTalk
SenseTalk
function Map oldlist, func put () into newlist repeat with each item of oldlist insert (func)(it) after newlist end repeat return newlist end Map
http://rosettacode.org/wiki/Hello_world/Text
Hello world/Text
Hello world/Text is part of Short Circuit's Console Program Basics selection. Task Display the string Hello world! on a text console. Related tasks   Hello world/Graphical   Hello world/Line Printer   Hello world/Newbie   Hello world/Newline omission   Hello world/Standard error   Hello world/Web server
#Dafny
Dafny
  method Main() { print "hello, world!\n"; assert 10 < 2; }  
http://rosettacode.org/wiki/Hello_world/Line_printer
Hello world/Line printer
Task Cause a line printer attached to the computer to print a line containing the message:   Hello World! Note A line printer is not the same as standard output. A   line printer   was an older-style printer which prints one line at a time to a continuous ream of paper. With some systems, a line printer can be...
#Java
Java
import java.io.FileWriter; import java.io.IOException;   public class LinePrinter { public static void main(String[] args) { try { FileWriter lp0 = new FileWriter("/dev/lp0"); lp0.write("Hello World!"); lp0.close(); } catch (IOException ioe) { ioe.printStackTrace(); } } }
http://rosettacode.org/wiki/Hello_world/Line_printer
Hello world/Line printer
Task Cause a line printer attached to the computer to print a line containing the message:   Hello World! Note A line printer is not the same as standard output. A   line printer   was an older-style printer which prints one line at a time to a continuous ream of paper. With some systems, a line printer can be...
#JavaScript
JavaScript
// This example runs on Node.js var fs = require('fs'); // Assuming lp is at /dev/lp0 var lp = fs.openSync('/dev/lp0', 'w'); fs.writeSync(lp, 'Hello, world!\n'); fs.close(lp);
http://rosettacode.org/wiki/Harshad_or_Niven_series
Harshad or Niven series
The Harshad or Niven numbers are positive integers ≥ 1 that are divisible by the sum of their digits. For example,   42   is a Harshad number as   42   is divisible by   (4 + 2)   without remainder. Assume that the series is defined as the numbers in increasing order. Task The task is to create a function/method/...
#360_Assembly
360 Assembly
* Harshad or Niven series - 01/05/2019 NIVEN CSECT USING NIVEN,R13 base register B 72(R15) skip savearea DC 17F'0' savearea SAVE (14,12) save previous context ST R13,4(R15) link backward ST...
http://rosettacode.org/wiki/Hello_world/Newbie
Hello world/Newbie
Task Guide a new user of a language through the steps necessary to install the programming language and selection of a text editor if needed, to run the languages' example in the Hello world/Text task. Assume the language-newbie is a programmer in another language. Assume the language-newbie is competent in install...
#AArch64_Assembly
AArch64 Assembly
create file helloword64.s compile it with : as -o helloword64.o helloword.s link it with  : ld -o helloword64 helloword64.o -e main execute it  : helloword64
http://rosettacode.org/wiki/Hello_world/Newbie
Hello world/Newbie
Task Guide a new user of a language through the steps necessary to install the programming language and selection of a text editor if needed, to run the languages' example in the Hello world/Text task. Assume the language-newbie is a programmer in another language. Assume the language-newbie is competent in install...
#Ada
Ada
GNAT Community -------------- This contains the GNAT Community edition. ...
http://rosettacode.org/wiki/Hash_join
Hash join
An inner join is an operation that combines two data tables into one table, based on matching column values. The simplest way of implementing this operation is the nested loop join algorithm, but a more scalable alternative is the hash join algorithm. Task[edit] Implement the "hash join" algorithm, and demonstrate tha...
#Bracmat
Bracmat
( (27.Jonah) (18.Alan) (28.Glory) (18.Popeye) (28.Alan)  : ?table-A & (Jonah.Whales) (Jonah.Spiders) (Alan.Ghosts) (Alan.Zombies) (Glory.Buffy)  : ?table-B & new$hash:?H & !table-A:? [?lenA & !table-B:? [?lenB & ( join = smalltab bigtab smallschema bigsche...
http://rosettacode.org/wiki/Hash_join
Hash join
An inner join is an operation that combines two data tables into one table, based on matching column values. The simplest way of implementing this operation is the nested loop join algorithm, but a more scalable alternative is the hash join algorithm. Task[edit] Implement the "hash join" algorithm, and demonstrate tha...
#C.23
C#
using System; using System.Collections.Generic; using System.Linq;   namespace HashJoin { public class AgeName { public AgeName(byte age, string name) { Age = age; Name = name; } public byte Age { get; private set; } public string Name { get; priva...
http://rosettacode.org/wiki/Higher-order_functions
Higher-order functions
Task Pass a function     as an argument     to another function. Related task   First-class functions
#Sidef
Sidef
func first(f) { return f(); }   func second { return "second"; }   say first(second); # => "second" say first(func { "third" }); # => "third"
http://rosettacode.org/wiki/Hello_world/Text
Hello world/Text
Hello world/Text is part of Short Circuit's Console Program Basics selection. Task Display the string Hello world! on a text console. Related tasks   Hello world/Graphical   Hello world/Line Printer   Hello world/Newbie   Hello world/Newline omission   Hello world/Standard error   Hello world/Web server
#Dao
Dao
io.writeln( 'Hello world!' )
http://rosettacode.org/wiki/Hello_world/Line_printer
Hello world/Line printer
Task Cause a line printer attached to the computer to print a line containing the message:   Hello World! Note A line printer is not the same as standard output. A   line printer   was an older-style printer which prints one line at a time to a continuous ream of paper. With some systems, a line printer can be...
#Julia
Julia
  lineprinter = Sys.iswindows() ? "LPT3" : "/dev/lp0" lp = open(lineprinter, "w") write(lp, "Hello world")  
http://rosettacode.org/wiki/Hello_world/Line_printer
Hello world/Line printer
Task Cause a line printer attached to the computer to print a line containing the message:   Hello World! Note A line printer is not the same as standard output. A   line printer   was an older-style printer which prints one line at a time to a continuous ream of paper. With some systems, a line printer can be...
#Kotlin
Kotlin
import java.io.File   fun main(args: Array<String>) { val text = "Hello World!\n" File("/dev/lp0").writeText(text) }
http://rosettacode.org/wiki/Hello_world/Line_printer
Hello world/Line printer
Task Cause a line printer attached to the computer to print a line containing the message:   Hello World! Note A line printer is not the same as standard output. A   line printer   was an older-style printer which prints one line at a time to a continuous ream of paper. With some systems, a line printer can be...
#Lasso
Lasso
File_Write: '/dev/lp0', 'Hello world', -FileOverWrite;
http://rosettacode.org/wiki/Harshad_or_Niven_series
Harshad or Niven series
The Harshad or Niven numbers are positive integers ≥ 1 that are divisible by the sum of their digits. For example,   42   is a Harshad number as   42   is divisible by   (4 + 2)   without remainder. Assume that the series is defined as the numbers in increasing order. Task The task is to create a function/method/...
#8080_Assembly
8080 Assembly
cpu 8086 org 100h section .text mov di,10 ; DI is the divisor to find digits xor bp,bp ; Find first 20 Harshad numbers mov cx,20 first: call next mov ax,bp call print loop first mov bp,1000 ; Find first Harshad number > 1000 call next ; .. fall through (print and stop) mov ax,bp ;;; Print the number ...
http://rosettacode.org/wiki/Hello_world/Newbie
Hello world/Newbie
Task Guide a new user of a language through the steps necessary to install the programming language and selection of a text editor if needed, to run the languages' example in the Hello world/Text task. Assume the language-newbie is a programmer in another language. Assume the language-newbie is competent in install...
#ALGOL_68
ALGOL 68
main: ( printf($"Goodbye, World!"l$) )
http://rosettacode.org/wiki/Hello_world/Newbie
Hello world/Newbie
Task Guide a new user of a language through the steps necessary to install the programming language and selection of a text editor if needed, to run the languages' example in the Hello world/Text task. Assume the language-newbie is a programmer in another language. Assume the language-newbie is competent in install...
#Agda
Agda
create file helloword.s compile it with : as -o helloword.o helloword.s link it with  : ld -o helloword helloword.o -e main execute it  : helloword
http://rosettacode.org/wiki/Hash_join
Hash join
An inner join is an operation that combines two data tables into one table, based on matching column values. The simplest way of implementing this operation is the nested loop join algorithm, but a more scalable alternative is the hash join algorithm. Task[edit] Implement the "hash join" algorithm, and demonstrate tha...
#C.2B.2B
C++
#include <iostream> #include <string> #include <vector> #include <unordered_map>   using tab_t = std::vector<std::vector<std::string>>; tab_t tab1 { // Age Name {"27", "Jonah"} , {"18", "Alan"} , {"28", "Glory"} , {"18", "Popeye"} , {"28", "Alan"} };   tab_t tab2 { // Character Nemesis {"Jonah", "Whales"} , {"Jon...
http://rosettacode.org/wiki/Higher-order_functions
Higher-order functions
Task Pass a function     as an argument     to another function. Related task   First-class functions
#Slate
Slate
define: #function -> [| :x | x * 3 - 1]. #(1 1 2 3 5 8) collect: function.
http://rosettacode.org/wiki/Hello_world/Text
Hello world/Text
Hello world/Text is part of Short Circuit's Console Program Basics selection. Task Display the string Hello world! on a text console. Related tasks   Hello world/Graphical   Hello world/Line Printer   Hello world/Newbie   Hello world/Newline omission   Hello world/Standard error   Hello world/Web server
#Dart
Dart
main() { var bye = 'Hello world!'; print("$bye"); }
http://rosettacode.org/wiki/Hello_world/Line_printer
Hello world/Line printer
Task Cause a line printer attached to the computer to print a line containing the message:   Hello World! Note A line printer is not the same as standard output. A   line printer   was an older-style printer which prints one line at a time to a continuous ream of paper. With some systems, a line printer can be...
#Locomotive_Basic
Locomotive Basic
10 PRINT #8, "Hello World!"
http://rosettacode.org/wiki/Hello_world/Line_printer
Hello world/Line printer
Task Cause a line printer attached to the computer to print a line containing the message:   Hello World! Note A line printer is not the same as standard output. A   line printer   was an older-style printer which prints one line at a time to a continuous ream of paper. With some systems, a line printer can be...
#M2000_Interpreter
M2000 Interpreter
  Printer { \\ just change the current layer to Print Page \\ Using Layer { } we can change to basic console layer inside any layer Print "Hello World!" }  
http://rosettacode.org/wiki/Hello_world/Line_printer
Hello world/Line printer
Task Cause a line printer attached to the computer to print a line containing the message:   Hello World! Note A line printer is not the same as standard output. A   line printer   was an older-style printer which prints one line at a time to a continuous ream of paper. With some systems, a line printer can be...
#Maple
Maple
lprint("Hello World!")
http://rosettacode.org/wiki/Harshad_or_Niven_series
Harshad or Niven series
The Harshad or Niven numbers are positive integers ≥ 1 that are divisible by the sum of their digits. For example,   42   is a Harshad number as   42   is divisible by   (4 + 2)   without remainder. Assume that the series is defined as the numbers in increasing order. Task The task is to create a function/method/...
#Action.21
Action!
INT FUNC SumOfDigits(INT a) INT sum   sum=0 WHILE a#0 DO sum==+a MOD 10 a==/10 OD RETURN (sum)   INT FUNC Next(INT a) INT sum   DO a==+1 sum=SumOfDigits(a) UNTIL a MOD sum=0 OD RETURN (a)   PROC Main() INT i,a   a=0 FOR i=1 TO 20 DO a=Next(a) PrintI(a) Put(32) OD ...
http://rosettacode.org/wiki/Hello_world/Newbie
Hello world/Newbie
Task Guide a new user of a language through the steps necessary to install the programming language and selection of a text editor if needed, to run the languages' example in the Hello world/Text task. Assume the language-newbie is a programmer in another language. Assume the language-newbie is competent in install...
#ARM_Assembly
ARM Assembly
create file helloword.s compile it with : as -o helloword.o helloword.s link it with  : ld -o helloword helloword.o -e main execute it  : helloword
http://rosettacode.org/wiki/Hello_world/Newbie
Hello world/Newbie
Task Guide a new user of a language through the steps necessary to install the programming language and selection of a text editor if needed, to run the languages' example in the Hello world/Text task. Assume the language-newbie is a programmer in another language. Assume the language-newbie is competent in install...
#Arturo
Arturo
  print "Hello World!!"  
http://rosettacode.org/wiki/Hash_join
Hash join
An inner join is an operation that combines two data tables into one table, based on matching column values. The simplest way of implementing this operation is the nested loop join algorithm, but a more scalable alternative is the hash join algorithm. Task[edit] Implement the "hash join" algorithm, and demonstrate tha...
#Clojure
Clojure
  (defn hash-join [table1 col1 table2 col2] (let [hashed (group-by col1 table1)] (flatten (for [r table2] (for [s (hashed (col2 r))] (merge s r))))))   (def s '({:age 27 :name "Jonah"} {:age 18 :name "Alan"} {:age 28 :name "Glory"} {:age 18 :name "Popeye"} ...
http://rosettacode.org/wiki/Higher-order_functions
Higher-order functions
Task Pass a function     as an argument     to another function. Related task   First-class functions
#Smalltalk
Smalltalk
first := [ :f | f value ]. second := [ 'second' ]. Transcript show: (first value: second).
http://rosettacode.org/wiki/Hello_world/Text
Hello world/Text
Hello world/Text is part of Short Circuit's Console Program Basics selection. Task Display the string Hello world! on a text console. Related tasks   Hello world/Graphical   Hello world/Line Printer   Hello world/Newbie   Hello world/Newline omission   Hello world/Standard error   Hello world/Web server
#DataWeave
DataWeave
"Hello world!"
http://rosettacode.org/wiki/Hello_world/Line_printer
Hello world/Line printer
Task Cause a line printer attached to the computer to print a line containing the message:   Hello World! Note A line printer is not the same as standard output. A   line printer   was an older-style printer which prints one line at a time to a continuous ream of paper. With some systems, a line printer can be...
#Mathematica_.2F_Wolfram_Language
Mathematica / Wolfram Language
commandstring = "echo Hello World! | lpr -P Printer01" Run[commandstring]
http://rosettacode.org/wiki/Hello_world/Line_printer
Hello world/Line printer
Task Cause a line printer attached to the computer to print a line containing the message:   Hello World! Note A line printer is not the same as standard output. A   line printer   was an older-style printer which prints one line at a time to a continuous ream of paper. With some systems, a line printer can be...
#MATLAB_.2F_Octave
MATLAB / Octave
fid = fopen('/dev/lp0'); fprintf(fid,'Hello World!\n'); fclose(fid);
http://rosettacode.org/wiki/Hello_world/Line_printer
Hello world/Line printer
Task Cause a line printer attached to the computer to print a line containing the message:   Hello World! Note A line printer is not the same as standard output. A   line printer   was an older-style printer which prints one line at a time to a continuous ream of paper. With some systems, a line printer can be...
#MIXAL
MIXAL
  LPR EQU 18 STRING EQU 2000 ORIG 3000 START IOC 0(LPR) OUT STRING(LPR) HLT ORIG STRING ALF HELLO ALF WORL ALF D! END START  
http://rosettacode.org/wiki/Harshad_or_Niven_series
Harshad or Niven series
The Harshad or Niven numbers are positive integers ≥ 1 that are divisible by the sum of their digits. For example,   42   is a Harshad number as   42   is divisible by   (4 + 2)   without remainder. Assume that the series is defined as the numbers in increasing order. Task The task is to create a function/method/...
#Ada
Ada
with Ada.Text_IO;   procedure Harshad is   function Next(N: in out Positive) return Positive is   function Sum_Of_Digits(N: Natural) return Natural is ( if N = 0 then 0 else ((N mod 10) + Sum_Of_Digits(N / 10)) );   begin while not (N mod Sum_Of_Digits(N) = 0) loop N := N + 1; end loop; ...
http://rosettacode.org/wiki/Hello_world/Newbie
Hello world/Newbie
Task Guide a new user of a language through the steps necessary to install the programming language and selection of a text editor if needed, to run the languages' example in the Hello world/Text task. Assume the language-newbie is a programmer in another language. Assume the language-newbie is competent in install...
#AutoHotkey
AutoHotkey
MsgBox, Hello World!
http://rosettacode.org/wiki/Hello_world/Newbie
Hello world/Newbie
Task Guide a new user of a language through the steps necessary to install the programming language and selection of a text editor if needed, to run the languages' example in the Hello world/Text task. Assume the language-newbie is a programmer in another language. Assume the language-newbie is competent in install...
#AWK
AWK
$ awk 'BEGIN{print "Goodbye, World!"}'
http://rosettacode.org/wiki/Hash_join
Hash join
An inner join is an operation that combines two data tables into one table, based on matching column values. The simplest way of implementing this operation is the nested loop join algorithm, but a more scalable alternative is the hash join algorithm. Task[edit] Implement the "hash join" algorithm, and demonstrate tha...
#Common_Lisp
Common Lisp
(defparameter *table-A* '((27 "Jonah") (18 "Alan") (28 "Glory") (18 "Popeye") (28 "Alan")))   (defparameter *table-B* '(("Jonah" "Whales") ("Jonah" "Spiders") ("Alan" "Ghosts") ("Alan" "Zombies") ("Glory" "Buffy")))   ;; Hash phase (defparameter *hash-table* (make-hash-table :test #'equal))   (loop for (i r) in *table-...