Hello world/Newbie: Difference between revisions

Content deleted Content added
KenS (talk | contribs)
mNo edit summary
Petelomax (talk | contribs)
m moved perl above PHP
Line 854:
Save the file in your PARI working directory and start the program, either in a console (command: <code>gp</code>) or in the GUI in Windows (by double-clicking the shortcut). Type <code>\r filename</code> to read in the program. (If you saved the file with a .gp extension, you can leave it off here.)
The program executes, displaying "Hello, world!".
 
=={{header|PHP}}==
PHP can be run either from the command line or via a web server such as Apache.
If you are running Mac or Linux, PHP is likely already installed. If you are on
Windows, you can set up your own web server locally by using XAMPP (https://www.apachefriends.org/index.html).
 
Create the file, hello.php, in your htdocs or public_html directory.
<pre>
<?php
echo 'Hello, world!';
?>
</pre>
 
If Apache is running on your local computer and you saved the file in htdocs, open a
web browser and go to http://localhost/hello.php. You should see the phrase in a basic
font displayed in the window.
 
From the command line, simply type
<pre>
php ./hello.php
</pre>
 
=={{header|PicoLisp}}==
===Debian-based systems===
Install
<pre>$ apt-get install picolisp</pre>
then run it
<pre>$ pil +
: (prinl "Goodbye, World!")</pre>
===Other POSIX systems===
Fetch and unpack the tarball
<pre>$ wget software-lab.de/picoLisp.tgz && tar xfz picoLisp.tgz</pre>
then build the executable (see http://software-lab.de/INSTALL file for 64-bit systems)
<pre>$ cd picoLisp
$ (cd src; make)</pre>
and run it locally
<pre>$ ./pil +
: (prinl "Goodbye, World!")</pre>
 
===Non-POSIX systems===
On non-POSIX systems only limited implementations of PicoLisp are available.
 
If Java 1.6 is installed, get and unpack either the tarball given in
"Other POSIX systems", or just "software-lab.de/ersatz.tgz", and run
<pre>$ ersatz/pil
: (prinl "Goodbye, World!")</pre>
(see also http://software-lab.de/ersatz/README).
 
If no Java is available, you can compile "software-lab.de/miniPicoLisp.tgz" and run it
<pre>$ ./pil +
: (prinl "Goodbye, World!")</pre>
 
=={{header|Perl}}==
Line 1,013 ⟶ 962:
 
Note that the file name may have any extension or none at all.
 
=={{header|PHP}}==
PHP can be run either from the command line or via a web server such as Apache.
If you are running Mac or Linux, PHP is likely already installed. If you are on
Windows, you can set up your own web server locally by using XAMPP (https://www.apachefriends.org/index.html).
 
Create the file, hello.php, in your htdocs or public_html directory.
<pre>
<?php
echo 'Hello, world!';
?>
</pre>
 
If Apache is running on your local computer and you saved the file in htdocs, open a
web browser and go to http://localhost/hello.php. You should see the phrase in a basic
font displayed in the window.
 
From the command line, simply type
<pre>
php ./hello.php
</pre>
 
=={{header|PicoLisp}}==
===Debian-based systems===
Install
<pre>$ apt-get install picolisp</pre>
then run it
<pre>$ pil +
: (prinl "Goodbye, World!")</pre>
===Other POSIX systems===
Fetch and unpack the tarball
<pre>$ wget software-lab.de/picoLisp.tgz && tar xfz picoLisp.tgz</pre>
then build the executable (see http://software-lab.de/INSTALL file for 64-bit systems)
<pre>$ cd picoLisp
$ (cd src; make)</pre>
and run it locally
<pre>$ ./pil +
: (prinl "Goodbye, World!")</pre>
 
===Non-POSIX systems===
On non-POSIX systems only limited implementations of PicoLisp are available.
 
If Java 1.6 is installed, get and unpack either the tarball given in
"Other POSIX systems", or just "software-lab.de/ersatz.tgz", and run
<pre>$ ersatz/pil
: (prinl "Goodbye, World!")</pre>
(see also http://software-lab.de/ersatz/README).
 
If no Java is available, you can compile "software-lab.de/miniPicoLisp.tgz" and run it
<pre>$ ./pil +
: (prinl "Goodbye, World!")</pre>
 
=={{header|PowerShell}}==