Lompat ke isi

Hello world: Perbedaan antara revisi

Dari Wikipedia bahasa Indonesia, ensiklopedia bebas
Konten dihapus Konten ditambahkan
k ←Suntingan 182.2.170.198 (bicara) dibatalkan ke versi terakhir oleh Gervant of Shiganshina
Tag: Pengembalian
HsfBot (bicara | kontrib)
Baris 5: Baris 5:


=== [[bahasa Basic|Basic]] ===
=== [[bahasa Basic|Basic]] ===
<source lang="qbasic">
<syntaxhighlight lang="qbasic">
10 PRINT "Hello world"
10 PRINT "Hello world"
</syntaxhighlight>
</source>


=== [[File Batch]] ===
=== [[File Batch]] ===
Baris 14: Baris 14:


=== [[C (bahasa pemrograman)|C]] ===
=== [[C (bahasa pemrograman)|C]] ===
<source lang="c">
<syntaxhighlight lang="c">
#include <stdio.h>
#include <stdio.h>
Baris 22: Baris 22:
return 0;
return 0;
}
}
</syntaxhighlight>
</source>


=== [[C++]] ===
=== [[C++]] ===
<source lang="cpp">
<syntaxhighlight lang="cpp">
#include <iostream>
#include <iostream>
int main()
int main()
Baris 32: Baris 32:
return 0;
return 0;
}
}
</syntaxhighlight>
</source>


=== [[C sharp|C#]] ===
=== [[C sharp|C#]] ===
<source lang="csharp">
<syntaxhighlight lang="csharp">
class HaloDunia
class HaloDunia
{
{
Baris 43: Baris 43:
}
}
}
}
</syntaxhighlight>
</source>


=== [[Borland Delphi|Delphi]] ===
=== [[Borland Delphi|Delphi]] ===
<source lang="pascal">
<syntaxhighlight lang="pascal">
program HaloDunia;
program HaloDunia;


Baris 57: Baris 57:
writeln('Halo Dunia');
writeln('Halo Dunia');
end.
end.
</syntaxhighlight>
</source>


=== [[Clipper]] ===
=== [[Clipper]] ===
Baris 63: Baris 63:


=== [[Java]] ===
=== [[Java]] ===
<source lang="java">
<syntaxhighlight lang="java">
public class HaloDunia {
public class HaloDunia {
public static void main(String args[]) {
public static void main(String args[]) {
Baris 69: Baris 69:
}
}
</syntaxhighlight>
</source>


=== [[lisp]] ===
=== [[lisp]] ===
<source lang="lisp">
<syntaxhighlight lang="lisp">
(print "Hello world")
(print "Hello world")
</syntaxhighlight>
</source>


=== [[Pascal]] ===
=== [[Pascal]] ===
<source lang="pascal">
<syntaxhighlight lang="pascal">
program helloworld;
program helloworld;
begin {
begin {
Baris 83: Baris 83:
}
}
end.
end.
</syntaxhighlight>
</source>


=== [[Perl]] ===
=== [[Perl]] ===
<source lang="perl">
<syntaxhighlight lang="perl">
print "Hello world\n";
print "Hello world\n";
</syntaxhighlight>
</source>


=== [[PHP]] ===
=== [[PHP]] ===
<source lang="php">
<syntaxhighlight lang="php">


<?php
<?php
Baris 97: Baris 97:
?>
?>


</syntaxhighlight>
</source>


=== [[PLSQL|PL/SQL Oracle]] ===
=== [[PLSQL|PL/SQL Oracle]] ===
<source lang="oracle8">
<syntaxhighlight lang="oracle8">
create or replace procedure HelloWorld is
create or replace procedure HelloWorld is
begin
begin
dbms_out.put_line('HALO DUNIA');
dbms_out.put_line('HALO DUNIA');
end;
end;
</syntaxhighlight>
</source>


=== [[Prolog]] ===
=== [[Prolog]] ===
Baris 111: Baris 111:


=== [[Python (bahasa pemrograman)|Python]] ===
=== [[Python (bahasa pemrograman)|Python]] ===
<source lang="python">
<syntaxhighlight lang="python">
print 'Hello world\n'
print 'Hello world\n'
</syntaxhighlight>
</source>


=== [[RPG (bahasa pemrograman)|RPG]] ===
=== [[RPG (bahasa pemrograman)|RPG]] ===
Baris 128: Baris 128:


=== [[Transact-SQL|Microsoft T-SQL]] ===
=== [[Transact-SQL|Microsoft T-SQL]] ===
<source lang="tsql">
<syntaxhighlight lang="tsql">
create proc HelloWorld as
create proc HelloWorld as
begin
begin
print 'HALO DUNIA'
print 'HALO DUNIA'
end
end
</syntaxhighlight>
</source>


== Hello world dalam beberapa bahasa shell ==
== Hello world dalam beberapa bahasa shell ==
=== [[Bash]] ===
=== [[Bash]] ===
<source lang="bash">
<syntaxhighlight lang="bash">
printf "Hello world"
printf "Hello world"
</syntaxhighlight>
</source>


=== [[Sh]] ===
=== [[Sh]] ===
Baris 147: Baris 147:


=== [[HTML]] ===
=== [[HTML]] ===
<source lang="html4strict">
<syntaxhighlight lang="html4strict">
<pre>
<pre>
<html>
<html>
Baris 160: Baris 160:
</html>
</html>
</pre>
</pre>
</syntaxhighlight>
</source>


=== [[LaTeX]] ===
=== [[LaTeX]] ===
<source lang="latex">
<syntaxhighlight lang="latex">
\documentclass{article}
\documentclass{article}
\begin{document}
\begin{document}
Hello world
Hello world
\end{document}
\end{document}
</syntaxhighlight>
</source>


=== [[Lisp]] ===
=== [[Lisp]] ===
<source lang="lisp">
<syntaxhighlight lang="lisp">
(princ "Hello world\n")
(princ "Hello world\n")
(prin1)
(prin1)
</syntaxhighlight>
</source>


=== [[XML]] ===
=== [[XML]] ===
<source lang="xml">
<syntaxhighlight lang="xml">
<?xml version="1.0"?>
<?xml version="1.0"?>
<text>Hello world</text>
<text>Hello world</text>
</syntaxhighlight>
</source>


== Refrensi ==
== Refrensi ==

Revisi per 22 Juli 2021 02.29

Sebuah pesan "Halo, Dunia!" yang ditampilkan melalui lukisan cahaya pencahayaan lama dengan strip LED yang bergerak

Hello world (Halo dunia) umumnya adalah program komputer yang mengeluarkan atau menampilkan pesan "Hello, World!". Program semacam itu sangat sederhana di sebagian besar bahasa pemrograman, dan sering digunakan untuk menggambarkan sintaks dasar bahasa pemrograman. Ini seringkali merupakan program pertama yang ditulis oleh orang-orang yang belajar kode.[1][2] Ini juga dapat digunakan sebagai tes kewarasan untuk memastikan bahwa bahasa komputer diinstal dengan benar, dan bahwa operator memahami cara menggunakannya.

Hello world dalam beberapa bahasa pemrograman

 10 PRINT "Hello world"
@echo off
echo Hello world
  #include <stdio.h>
  
  int main()
  {
     printf("Hello world\n");
     return 0;
  }
  #include <iostream>
  int main()
  {
     std::cout << "Hello world";
     return 0;
  }
  class HaloDunia
  {
        static void main( )
        {
           System.Console.WriteLine("Halo Dunia");
        }
  }
program HaloDunia;

{$APPTYPE CONSOLE}

uses
  SysUtils;

begin
  writeln('Halo Dunia');
end.
 ?"Hello world"
  public class HaloDunia {  
     public static void main(String args[]) {
        System.out.println("Hello world\n");
     }
 (print "Hello world")
 program helloworld;
 begin {
    writeln('halo dunia');
 }
 end.
  print "Hello world\n";
 <?php
 echo "Hello world";
 ?>
 create or replace procedure HelloWorld is
 begin
     dbms_out.put_line('HALO DUNIA');
 end;
 write('Hello world'),nl.
 print 'Hello world\n'
    I              'Hello world'          C         HELLO
    C                     DSPLY          HELLO
$ include "seed7_05.s7i";

 const proc: main is func
   begin
     writeln("Hello world");
   end func;
 create proc HelloWorld as
 begin
     print 'HALO DUNIA'
 end

Hello world dalam beberapa bahasa shell

  printf "Hello world"
 echo 'Hello world'

Hello world dalam beberapa bahasa mark up

<pre>
 <html>
    <head>
       <title>
          Halo Dunia
       </title>
    </head>
    <body>
       Hello world
    </body>
 </html>
</pre>
 \documentclass{article}
 \begin{document}
   Hello world
 \end{document}
  (princ "Hello world\n")
  (prin1)
 <?xml version="1.0"?>
 <text>Hello world</text>

Refrensi

  1. ^ Langbridge, James A. (2013-12-03). Professional Embedded ARM Development (dalam bahasa Inggris). John Wiley & Sons. ISBN 978-1-118-88782-0. 
  2. ^ sinobitorg/hardware, 2020-07-10, diakses tanggal 2020-08-19 

Pranala luar