Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentes Révision précédente Prochaine révision | Révision précédente | ||
logiciels:programmation:accueil [2015/03/11 11:35] resonance |
logiciels:programmation:accueil [2016/02/01 00:08] (Version actuelle) resonance |
||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
====== Programmation informatique ====== | ====== Programmation informatique ====== | ||
+ | ===== Exemples Hello World ===== | ||
+ | * https:// | ||
+ | |||
+ | ==== Bash ==== | ||
+ | <code bash> | ||
+ | #!/bin/bash | ||
+ | echo Hello world! | ||
+ | </ | ||
+ | |||
+ | ==== C ==== | ||
+ | <code c> | ||
+ | #include < | ||
+ | |||
+ | int main(void) | ||
+ | { | ||
+ | printf(" | ||
+ | return 0; | ||
+ | } | ||
+ | |||
+ | </ | ||
+ | |||
+ | ==== Java ==== | ||
+ | <code java> | ||
+ | /* Affichage console */ | ||
+ | public class HelloWorld { | ||
+ | public static void main(String[] args) { | ||
+ | System.out.println(" | ||
+ | } | ||
+ | } | ||
+ | </ | ||
+ | ==== Assembleur ==== | ||
+ | <code asm> | ||
+ | section .data | ||
+ | helloMsg: | ||
+ | helloSize: | ||
+ | | ||
+ | global _start | ||
+ | | ||
+ | mov eax,4 ; Appel système " | ||
+ | mov ebx,1 ; File descriptor, 1 pour STDOUT (sortie standard) | ||
+ | mov ecx, helloMsg | ||
+ | mov edx, helloSize | ||
+ | int 80h ; Exécution de l' | ||
+ | ; Sortie du programme | ||
+ | mov eax,1 ; Appel système " | ||
+ | mov ebx,0 ; Code de retour | ||
+ | int 80h | ||
+ | </ | ||
===== Principes de bases ===== | ===== Principes de bases ===== | ||
- | {{gallery> | + | {{gallery> |
Ligne 13: | Ligne 61: | ||
===== Orienté Objet ===== | ===== Orienté Objet ===== | ||
- | {{gallery> | + | {{gallery> |