Difference between revisions of "Print text to the default display"

From CodeCodex

(Erlang)
 
Line 15: Line 15:
 
<pre>
 
<pre>
 
(format t "text to display")
 
(format t "text to display")
 +
</pre>
 +
 +
===Erlang===
 +
<pre>
 +
io:format("text to display~n").
 
</pre>
 
</pre>
  
Line 57: Line 62:
 
[[Category:C++]]
 
[[Category:C++]]
 
[[Category:Common Lisp]]
 
[[Category:Common Lisp]]
 +
[[Category:Erlang]]
 
[[Category:Haskell]]
 
[[Category:Haskell]]
 
[[Category:Java]]
 
[[Category:Java]]

Latest revision as of 16:57, 13 January 2011

Implementations[edit]

C[edit]

#include <stdio.h>
printf("text to display\n");

C++[edit]

#include <iostream>
std::cout << "text to display" << std::endl;

Common Lisp[edit]

(format t "text to display")

Erlang[edit]

io:format("text to display~n").

Haskell[edit]

putStrLn "text to display"

Java[edit]

System.out.println("text to display");

OCaml[edit]

print_endline "text to display"

Perl[edit]

print "text to display\n";

PHP[edit]

<?php
echo "text to display\n";
?>

Python[edit]

print "text to display"

Ruby[edit]

print "text to display\n"