Hello World: Difference between revisions
Jump to navigation
Jump to search
imported>Ewan Nisbet m (added link to c++ language) |
imported>Eric Evers |
||
Line 63: | Line 63: | ||
WScript.Echo "Hello world" | WScript.Echo "Hello world" | ||
</pre> | </pre> | ||
== Hello World in Other Languages == | |||
[[Erlang_programming_language|Erlang]] | |||
[[MySQL/Tutorials|MySQL]] | |||
== See also == | == See also == |
Revision as of 05:09, 15 April 2008
A Hello World program, as first introduced in the book The C Programming Language, is a very short program that typically just prints a word or two of output to a console. Such a program is often one of the first programs that a programmer writes when learning a programming language, as it provide's a cursory introduction to the language's syntax and output.
Example in some of the most popular languages
Example in C
#include <stdio.h> int main() { printf("This is my first C program!\n"); return 0; }
Example in C++
// Hello World in C++ (pre-ISO) #include <iostream.h> main() { cout << "Hello World!" << endl; return 0; }
Example in Java
// Hello World in Java class HelloWorld { static public void main( String args[] ) { System.out.println( "Hello World!" ); } }
Example in Perl
# Hello world in perl print "Hello World!\n";
Example in PHP
<?php // Hello World in PHP echo 'Hello World!'; ?>
Example in Python
# Hello World in Python print "Hello world"
Example in VBScript
'Hello World in VBScript WScript.Echo "Hello world"
Hello World in Other Languages
Erlang MySQL
See also
External links
The Hello World Collection in more than 300 programming languages