Salam Dünya proqram nümunələrinin siyahısı

Proqramlaşdırma dilini yeni öyrənməyə başlayarkən ilk yazılan proqram adətən "Salam Dünya" proqramı olur. Bir çox dildə yazılmış Salam Dünya proqram nümunələri:

print "Salam Dünya"
wait key
REPORT Z_HALLO_WELT.
WRITE 'Salam Dünya!'.
trace('Salam Dünya');
with Ada.Text_IO;
procedure Salam is
begin
    Ada.Text_IO.Put_Line ("Salam Dünya!");
end Hallo;
 'BEGIN'
     OUTSTRING(2,'('Salam Dünya')');
 'END'
 ( print("Salam Dünya!") )
? "Salam Dünya!"
display dialog "Salam Dünya"
<%
  Response.Write("Salam Dünya!")
%>

və ya

<%="Salam Dünya!"%>
MsgBox Salam Dünya!
MsgBox(0, "", "Salam Dünya!")
(princ "Salam Dünya!")
BEGIN { print "Salam Dünya!" }
main() {
    printf("Salam Dünya!");
}
10 PRINT "Salam Dünya!"
@echo Salam Dünya!
print("Salam Dünya!");
Framework BRL.StandardIO
Print("Salam Dünya!")
print "Salam Dünya!"
MESSAGE('Salam Dünya')
#include <stdio.h>

int main(void)
{
    puts("Salam Dünya!");
}
/*
 * "gcc hello_world.c -o hello_world `pkg-config --cflags --libs gtk+-2.0`" şəklində kompilyasiya edin. 
 * 
 */
#include <gtk/gtk.h>
gboolean delete_event(GtkWidget *widget, GdkEvent *event, gpointer data) {
  return FALSE;
}
void destroy(GtkWidget *widget, gpointer data) {
  gtk_main_quit();
}
void clicked(GtkWidget *widget, gpointer data) {
  g_print("Salam Dünya!\n");
}
int main (int argc, char *argv[]) {
  gtk_init(&argc, &argv);
  GtkWidget *window;
  GtkWidget *button;
  window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
  gtk_container_set_border_width(GTK_CONTAINER(window), 10);
  g_signal_connect(G_OBJECT(window), "delete-event", G_CALLBACK(delete_event), NULL);
  g_signal_connect(G_OBJECT(window), "destroy", G_CALLBACK(destroy), NULL);
  button = gtk_button_new_with_label("Salam Dünya!");
  g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(clicked), NULL);
  gtk_widget_show(button);
  gtk_container_add(GTK_CONTAINER(window), button);
  gtk_widget_show(window);
  gtk_main();
  return 0;
}
#include <windows.h>
int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
  MessageBox(0, "Salam Dünya!", "Mənim birinci proqramım", MB_OK);
  return 0;
}
#include <iostream>
int main()
{
    std::cout << "Salam Dünya!" << std::endl;
}
int main()
{
    System::Console::WriteLine("Salam Dünya!");
}

=== [[C++]] [[gtkmm]] ilə ===
<syntaxhighlight lang="cpp" highlight="10">
#include <gtkmm/main.h>
#include <gtkmm/button.h>
#include <gtkmm/window.h>
int main (int argc, char* argv[])
{
    Gtk::Main m_main(argc, argv);
    Gtk::Window m_window;
    Gtk::Button m_button("Salam Dünya!");
    m_window.add(m_button);
    m_button.show();
    Gtk::Main::run(m_window);
    return 0;
}

C++ Qt kitabxanası ilə

redaktə
#include <QLabel>
#include <QApplication>
int main(int argc, char* argv[])
{
    QApplication app(argc, argv);
    QLabel label("Salam Dünya!");
    label.show();
    return app.exec();
}
class MainClass
{
    public static void Main()
    {
        System.Console.WriteLine("Salam Dünya!");
    }
}
.assembly SalamDunya { }
.assembly extern mscorlib { }
.method public static void Main() cil managed
{
    .entrypoint
    .maxstack 1
    ldstr "Salam Dünya!"
    call void [mscorlib]System.Console::WriteLine(string)
    ret
}
WRITE Salam Dünya
(println "Salam Dünya!")
PGM
SNDPGMMSG MSG('Salam Dünya!') MSGTYPE(*COMP)
ENDPGM
000100 IDENTIFICATION DIVISION.
000200 PROGRAM-ID. HELLOWORLD.
000900 PROCEDURE DIVISION.
001000 MAIN.
001100 DISPLAY "Salam Dünya!".
001200 STOP RUN.
<cfset beispiel = "Salam Dünya!" >
<cfoutput>#beispiel#</cfoutput>
10 PRINT "Salam Dünya!"
(write-line "Salam Dünya!")
MODULE SalamDunya;
IMPORT Out;
PROCEDURE Output*;
BEGIN
   Out.String ("Salam Dünya!");
   Out.Ln;
END Output;
END HalloWelt.
import std.stdio;
void main() {
    writeln("Salam Dünya!");
}
? "Salam Dünya!"

komanda interfeysi:

program SalamDunya;
begin
  writeln('Salam Dünya!');
end.

qrafik interfeys:

    program HalloWelt;
    {$APPTYPE GUI}
    uses Dialogs;
     begin
      ShowMessage('Salam Dünya!');
    end.
class Salam_Dunya
create
    make
feature
    make is
    do
        io.put_string("Salam Dünya!%N")
    end
end
putline ("Salam Dünya!");
(print "Salam Dünya!")
-module(Salam).
-export([Salam_Dunya/0]).

Salam_Dunya() -> io:fwrite("Salam Dünya!\n").
printfn "Salam Dünya"
.( Salam Dünya!)
program salam
write(*,*) "Salam Dünya!"
end program salam
print "Salam Dünya!"
show_message("Salam Dünya!");
    PUBLIC SUB Form_Enter()
    PRINT "Salam Dünya!"
    END
package main

import "fmt"

func main() {
	fmt.Println("Salam Dünya!")
}
println "Salam Dünya!"
main :: IO ()
main = putStrLn "Salam Dünya!"
class Test {
    static function main() {
        trace("Salam Dünya!");
    }
}
PRO salam_dunya
    PRINT, "Salam Dünya!"
END
"Salam Dünya!" print
public class HalloWelt
{
    public static void main(String[] args)
    {
        System.Console.WriteLine("Salam Dünya!");
    }
}
document.write("Salam Dünya!");
class Hallo {
  public static void main( String[] args ) {
    System.out.println("Salam Dünya!");
  }
}

və ya

import javax.swing.*;
class Salam {
  public static void main( String[] args ) {
    JOptionPane.showMessageDialog( null, "Salam Dünya!" );
  }
}
? "Salam Dünya!"
\documentclass{article}
\begin{document}
Salam Dünya!
\end{document}
(print "Salam Dünya!")
print [Salam Dünya!]
print ("Salam Dünya!")
fprintf('Salam Dünya!');

və ya

disp('Salam Dünya!');

və ya

disp Salam_Dünya

və ya

'Salam Dünya'
on 1:load:*: { echo Salam Dünya! }
MODULE SalamDunya;
IMPORT Write;
BEGIN
    Write.Line("Salam Dünya!");
END HalloWelt.
print_endline "Salam Dünya!";;
#import <stdio.h>
int main()
{
  puts("Salam Dünya!");
  return 0;
}
#import <Cocoa/Cocoa.h>
@interface Controller : NSObject
{
 NSWindow *window;
 NSTextField *textField;
}
@end
int main(int argc, const char *argv[])
{
 NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
 NSApp = [NSApplication sharedApplication];
 Controller *controller = [[Controller alloc] init];
 [NSApp run];
 [controller release];
 [NSApp release];
 [pool release];
 return EXIT_SUCCESS;
}
@implementation Controller
- (id)init
{
 if ((self = [super init]) != nil) {
                textField = [[NSTextField alloc] initWithFrame:NSMakeRect(10.0, 10.0, 85.0, 20.0)];
                [textField setEditable:NO];
                [textField setStringValue:@"Salam Dünya!"];

                window = [[NSWindow alloc] initWithContentRect:NSMakeRect(100.0, 350.0, 200.0, 40.0)
                                                                                         styleMask:NSTitledWindowMask | NSClosableWindowMask | NSMiniaturizableWindowMask
                                                                                           backing:NSBackingStoreBuffered
                                                                                                 defer:YES];
                [window setDelegate:self];
                [window setTitle:@"Salam Dünya!"];
                [[window contentView] addSubview:textField];
                [window makeKeyAndOrderFront:nil];
 }

 return self;
}
- (void)windowWillClose:(NSNotification *)notification
{
 [NSApp terminate:self];
}

@end
<canvas>
   <text>Salam Dünya!</text>
</canvas>
{Show 'Salam Dünya'}
program Hallo ( output );
begin
  writeln('Salam Dünya!');
end.
main()
{
        printf("Salam Dünya!\n");
}
MODULE (HALLOWELT);
    SYSTEM;
        TERMINAL:DIS<->SDVLS(2);

    PROBLEM;
        SPC TERMINAL DATION OUT ALPHIC DIM(,) TFU MAX FORWARD CONTROL (ALL);

    MAIN:TASK;
       OPEN TERMINAL;
       PUT 'Hallo Welt!' TO TERMINAL;
       CLOSE TERMINAL;
   END;

MODEND;
print "Salam Dünya!\n";
<?php
    print "Salam Dünya!";
?>

və ya:

<?php
    echo "Salam Dünya!";
?>

və ya:

<?="Salam Dünya!"?>
int main() {
    write("Salam Dünya!\n");
    return 0;
}
 Test: procedure options(main);
    put skip list("Salam Dünya!");
 end Test;

Konsole:

main() {
  puts("Salam Dünya!");
}
camera {
 location <0, 0, -5>
 look_at  <0, 0, 0>
}
light_source {
 <10, 20, -10>
 color rgb 1
}
light_source {
 <-10, 20, -10>
 color rgb 1
}
background {
 color rgb 1
}
text {
 ttf "someFont.ttf"
 "Salam Dünya!", 0.015, 0
 pigment {
   color rgb <0, 0, 1>
 }
 translate -3*x
}
"Salam Dünya!"

və ya:

echo "Salam Dünya!"

və ya:

[System.Console]::WriteLine("Salam Dünya!")
 DISPLAY "Salam Dünya!".

oder:

 MESSAGE "Salam Dünya!"
   VIEW-AS ALERT-BOX INFO BUTTONS OK.
 ?- write('Salam Dünya!'), nl.
 OpenConsole()
   Print("Salam Dünya!")
   Input() ;Beendet das Programm beim nächsten Tastendruck
 CloseConsole()

python 3-cü versiyaya qədər:

print "Salam Dünya!"

pyton 3-cü versiyadan sonra (3-cü versiya daxil olmaqla):

print("Salam Dünya")
PRINT "Salam Dünya!"
print ("Salam Dünya!")

və ya

cat ("Salam Dünya!\n")
say "Salam Dünya!"
puts "Salam Dünya!"
require "gtk2"
Gtk::Window.new("Salam Dünya!").show_all.signal_connect(:delete_event){Gtk.main_quit}
Gtk.main
require "tk"
TkRoot.new{ title "Salam Dünya!" }
Tk.mainloop

SAC (Single Assignment C)

redaktə
use StdIO: all;
int main()
{
  printf("Salam Dünya!\n");
  return(0);
}
data _null_;
   put "Salam Dünya!";
run;
object HalloWelt extends Application {
  println("Salam Dünya!")
}
(display "Salam Dünya!")
(newline)
'Salam Dünya!' out.
 using System;
 public class Programm
 {
    public static void Main(string![]! args)
    requires forall{int i in (0:args.Length); args[i] != null};
    {
        Console.WriteLine("Salam Dünya!");
    }
 }
print "Salam Dünya!\n"
debug "Salam Dünya!";
SELECT 'Salam Dünya' AS message;

OracleMySQL üçün:

SELECT 'Salam Dünya!' FROM dual;

IBM-DB2 üçün:

SELECT 'Salam Dünya!' FROM sysibm.sysdummy1;

MSSQL, MySQL, PostgreSQL üçün:

SELECT 'Salam Dünya!';

StarOffice Basic

redaktə
 sub main
 print "Salam Dünya!"
 end sub

və ya:

 sub HalloWeltAlternativ
     MsgBox "Salam Dünya!"
 end sub
puts "Salam Dünya!"
label .l -text "Salam Dünya"
pack .l
Salam, Dunya!\bye
proc hello {
puts "Salam Dünya!"
}
put "Salam Dünya!"
echo 'Salam Dünya!'
module salam_dunya;
initial begin
 $display ("Salam Dünya!");
 #10 $finish;
end
endmodule
entity HelloWorld is
end entity HelloWorld;
architecture Bhv of HelloWorld is
begin
  HelloWorldProc: process is
  begin
    report "Salam Dünya!";
    wait;
  end process HelloWorldProc;
end architecture Bhv;
    MsgBox "Salam Dünya!"

Konsoldan:

Module Module1
    Sub Main()
        Console.WriteLine("Salam Dünya!")
    End Sub
End Module

Qrafik interfeyslə:

Class Salam
    Sub SalamDunya
       MsgBox("Salam Dünya")
    End Sub
End Class
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<label value="Salam Dünya!"/>
</window>
<?Mapping ClrNamespace="System" Assembly="mscorlib"
         xmlNamespace="http://www.gotdotnet.com/team/dbox/mscorlib/System" ?>
<Object xmlns="http://www.gotdotnet.com/team/dbox/mscorlib/System"
         xmlns:def="Definition" def:Class="MyApp.Hello">
    <def:Code>
    <![CDATA[
     Shared Sub Main()
     '{
         System.Console.WriteLine("Salam Dünya!")' ;
     '}
     End Sub
    ]]>
    </def:Code>
</Object>

Həmçinin bax

redaktə

İstinadlar

redaktə

Xarici keçidlər

redaktə