Spaces:
Running
Create a user-friendly HTML animation on this topic, in French [Voici un **cours clair et pédagogique en français** sur le **concept de *statement* en COBOL**, avec la **traduction du terme**, des **explications progressives**, et des **exemples commentés**, parfaitement adapté aux **débutants**.
Browse files---
# 📘 Les *Statements* en COBOL
### (Instructions COBOL)
---
## 🔤 Traduction du terme
* **Statement (anglais)** → **Instruction (français)**
👉 En COBOL, on parle donc d’**instructions COBOL**.
---
## 1️⃣ Qu’est-ce qu’une instruction (Statement) en COBOL ?
### 🔹 Définition
Une **instruction COBOL** est une **combinaison de mots-clés COBOL et d’opérandes**.
📌 Règle fondamentale :
> **Une instruction doit toujours contenir au moins un mot-clé COBOL.**
Les mots-clés sont les **briques de base** du langage COBOL.
---
### 🧠 Exemples de mots-clés COBOL
* `DISPLAY`
* `MOVE`
* `ADD`
* `IF`
* `PERFORM`
* `STOP RUN`
---
### 🧠 Exemple simple d’instruction
```cobol
DISPLAY "Hello World".
```
* `DISPLAY` → mot-clé COBOL
* `"Hello World"` → opérande (chaîne de caractères)
* `.` → fin de l’instruction
---
## 2️⃣ À quoi servent les instructions COBOL ?
Les instructions permettent de :
* 🧭 contrôler le **flux du programme**
* 🔢 manipuler les **données**
* ⌨️ gérer les **entrées / sorties**
* 🔁 effectuer des **boucles**
* 🔀 gérer des **conditions**
👉 **Sans instructions, un programme COBOL ne fait rien.**
---
## 3️⃣ Où écrire les instructions COBOL ?
### 📍 Règle de positionnement
✔ **Toutes les instructions doivent être écrites :**
* dans la **PROCEDURE DIVISION**
* en **Zone B** (colonnes 12 à 72)
---
### 🧠 Exemple avec Zone A / Zone B
```text
PROCEDURE DIVISION. ← Zone A
DISPLAY "Hello". ← Zone B
```
👉
* Zone A → structure
* Zone B → actions (instructions)
---
## 4️⃣ Les instructions et le point (`.`)
### 🔹 Règle classique
> Une instruction COBOL est généralement **terminée par un point**.
Exemple :
```cobol
DISPLAY "Bonjour".
```
---
### ⚠️ Nuance importante (pour débutants)
Dans certains cas modernes (ex. `IF`, `PERFORM`),
le point peut être **remplacé par un terminateur explicite** :
* `END-IF`
* `END-PERFORM`
👉 Le point sert alors à **terminer une phrase**, pas chaque instruction.
---
## 5️⃣ Les 4 grandes catégories d’instructions COBOL
Les instructions COBOL sont classées **selon leur usage**.
---
### ① Instructions impératives (*Imperative Statements*)
👉 Elles **ordonnent une action directe**.
#### Exemples :
```cobol
DISPLAY "Hello".
MOVE 10 TO TOTAL.
ADD 1 TO I.
STOP RUN.
```
📌 Ce sont les **plus simples et les plus fréquentes**.
---
### ② Instructions conditionnelles (*Conditional Statements*)
👉 Elles exécutent une action **si une condition est vraie**.
#### Exemple :
```cobol
IF I > 5
DISPLAY "Fin".
END-IF
```
📌 Le flux du programme dépend d’une condition.
---
### ③ Instructions à portée délimitée
(*Delimited Scope Statements*)
👉 Elles définissent un **bloc logique clair**, délimité par un début et une fin.
#### Exemples :
```cobol
IF condition
DISPLAY "OK"
END-IF
PERFORM VARYING I FROM 1 BY 1 UNTIL I > 5
DISPLAY I
END-PERFORM
```
📌 Elles **améliorent la lisibilité** et évitent les erreurs liées aux points.
---
### ④ Instructions de directives au compilateur
(*Compiler Directing Statements*)
👉 Elles **donnent des instructions au compilateur**, pas au programme lui-même.
#### Exemples :
```cobol
COPY MY-COPYBOOK.
REPLACE ==:OLD:== BY ==:NEW:==.
```
📌 Utilisées surtout dans des projets professionnels.
---
## 6️⃣ Exemple complet avec plusieurs instructions
### 🧠 Code COBOL commenté
```cobol
IDENTIFICATION DIVISION.
PROGRAM-ID. PROGSTRU.
AUTHOR. MTH.
PROCEDURE DIVISION.
1000-SEC1 SECTION.
1000-PARA.
DISPLAY "Hello World". *> Instruction 1
DISPLAY "Welcome to MTH". *> Instruction 2
STOP RUN.
```
---
### 🔍 Analyse
* `DISPLAY "Hello World".` → instruction impérative
* `DISPLAY "Welcome to MTH".` → instruction impérative
* `STOP RUN.` → instruction de fin de programme
✔ Toutes sont :
* en **PROCEDURE DIVISION**
* en **Zone B**
* terminées correctement
---
## ✅ À retenir absolument
✔ *Statement* = **Instruction**
✔ Une instruction contient **au moins un mot-clé COBOL**
✔ Les instructions sont écrites **en PROCEDURE DIVISION**
✔ Elles sont placées **en Zone B**
✔ Elles contrôlent **tout le comportement du programme**
---
]
- README.md +7 -4
- components/footer.js +86 -0
- components/navbar.js +65 -0
- index.html +189 -19
- script.js +48 -0
- statements.html +208 -0
- style.css +73 -19
|
@@ -1,10 +1,13 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
-
|
| 4 |
-
colorFrom: gray
|
| 5 |
colorTo: blue
|
|
|
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
|
|
|
|
|
|
| 8 |
---
|
| 9 |
|
| 10 |
-
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
title: COBOL Command Carnival 🎪
|
| 3 |
+
colorFrom: pink
|
|
|
|
| 4 |
colorTo: blue
|
| 5 |
+
emoji: 🐳
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
| 8 |
+
tags:
|
| 9 |
+
- deepsite-v3
|
| 10 |
---
|
| 11 |
|
| 12 |
+
# Welcome to your new DeepSite project!
|
| 13 |
+
This project was created with [DeepSite](https://huggingface.co/deepsite).
|
|
@@ -0,0 +1,86 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
class CustomFooter extends HTMLElement {
|
| 2 |
+
connectedCallback() {
|
| 3 |
+
this.attachShadow({ mode: 'open' });
|
| 4 |
+
this.shadowRoot.innerHTML = `
|
| 5 |
+
<style>
|
| 6 |
+
footer {
|
| 7 |
+
background-color: #1e293b;
|
| 8 |
+
color: white;
|
| 9 |
+
padding: 2rem 0;
|
| 10 |
+
margin-top: 3rem;
|
| 11 |
+
}
|
| 12 |
+
.footer-container {
|
| 13 |
+
max-width: 1200px;
|
| 14 |
+
margin: 0 auto;
|
| 15 |
+
padding: 0 2rem;
|
| 16 |
+
display: grid;
|
| 17 |
+
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
|
| 18 |
+
gap: 2rem;
|
| 19 |
+
}
|
| 20 |
+
.footer-section h3 {
|
| 21 |
+
color: #60a5fa;
|
| 22 |
+
margin-bottom: 1rem;
|
| 23 |
+
font-size: 1.125rem;
|
| 24 |
+
}
|
| 25 |
+
.footer-links {
|
| 26 |
+
display: flex;
|
| 27 |
+
flex-direction: column;
|
| 28 |
+
gap: 0.5rem;
|
| 29 |
+
}
|
| 30 |
+
.footer-link {
|
| 31 |
+
color: #e2e8f0;
|
| 32 |
+
text-decoration: none;
|
| 33 |
+
transition: color 0.2s;
|
| 34 |
+
}
|
| 35 |
+
.footer-link:hover {
|
| 36 |
+
color: #60a5fa;
|
| 37 |
+
}
|
| 38 |
+
.copyright {
|
| 39 |
+
text-align: center;
|
| 40 |
+
margin-top: 2rem;
|
| 41 |
+
padding-top: 1rem;
|
| 42 |
+
border-top: 1px solid #334155;
|
| 43 |
+
color: #94a3b8;
|
| 44 |
+
}
|
| 45 |
+
@media (max-width: 768px) {
|
| 46 |
+
.footer-container {
|
| 47 |
+
padding: 0 1rem;
|
| 48 |
+
grid-template-columns: 1fr;
|
| 49 |
+
}
|
| 50 |
+
}
|
| 51 |
+
</style>
|
| 52 |
+
<footer>
|
| 53 |
+
<div class="footer-container">
|
| 54 |
+
<div class="footer-section">
|
| 55 |
+
<h3>Ressources</h3>
|
| 56 |
+
<div class="footer-links">
|
| 57 |
+
<a href="#" class="footer-link">Documentation</a>
|
| 58 |
+
<a href="#" class="footer-link">Tutoriels</a>
|
| 59 |
+
<a href="#" class="footer-link">Exemples</a>
|
| 60 |
+
</div>
|
| 61 |
+
</div>
|
| 62 |
+
<div class="footer-section">
|
| 63 |
+
<h3>Communauté</h3>
|
| 64 |
+
<div class="footer-links">
|
| 65 |
+
<a href="#" class="footer-link">Forum</a>
|
| 66 |
+
<a href="#" class="footer-link">GitHub</a>
|
| 67 |
+
<a href="#" class="footer-link">Contribuer</a>
|
| 68 |
+
</div>
|
| 69 |
+
</div>
|
| 70 |
+
<div class="footer-section">
|
| 71 |
+
<h3>À propos</h3>
|
| 72 |
+
<div class="footer-links">
|
| 73 |
+
<a href="#" class="footer-link">L'équipe</a>
|
| 74 |
+
<a href="#" class="footer-link">Contact</a>
|
| 75 |
+
<a href="#" class="footer-link">Licence</a>
|
| 76 |
+
</div>
|
| 77 |
+
</div>
|
| 78 |
+
</div>
|
| 79 |
+
<div class="copyright">
|
| 80 |
+
© ${new Date().getFullYear()} COBOL Structuré - Tous droits réservés
|
| 81 |
+
</div>
|
| 82 |
+
</footer>
|
| 83 |
+
`;
|
| 84 |
+
}
|
| 85 |
+
}
|
| 86 |
+
customElements.define('custom-footer', CustomFooter);
|
|
@@ -0,0 +1,65 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
class CustomNavbar extends HTMLElement {
|
| 2 |
+
connectedCallback() {
|
| 3 |
+
this.attachShadow({ mode: 'open' });
|
| 4 |
+
this.shadowRoot.innerHTML = `
|
| 5 |
+
<style>
|
| 6 |
+
nav {
|
| 7 |
+
background-color: white;
|
| 8 |
+
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
|
| 9 |
+
}
|
| 10 |
+
.nav-container {
|
| 11 |
+
max-width: 1200px;
|
| 12 |
+
margin: 0 auto;
|
| 13 |
+
padding: 1rem 2rem;
|
| 14 |
+
display: flex;
|
| 15 |
+
justify-content: space-between;
|
| 16 |
+
align-items: center;
|
| 17 |
+
}
|
| 18 |
+
.logo {
|
| 19 |
+
font-weight: bold;
|
| 20 |
+
color: #2563eb;
|
| 21 |
+
font-size: 1.5rem;
|
| 22 |
+
display: flex;
|
| 23 |
+
align-items: center;
|
| 24 |
+
gap: 0.5rem;
|
| 25 |
+
}
|
| 26 |
+
.nav-links {
|
| 27 |
+
display: flex;
|
| 28 |
+
gap: 1.5rem;
|
| 29 |
+
}
|
| 30 |
+
.nav-link {
|
| 31 |
+
color: #4b5563;
|
| 32 |
+
text-decoration: none;
|
| 33 |
+
font-weight: 500;
|
| 34 |
+
transition: color 0.2s;
|
| 35 |
+
}
|
| 36 |
+
.nav-link:hover {
|
| 37 |
+
color: #2563eb;
|
| 38 |
+
}
|
| 39 |
+
@media (max-width: 768px) {
|
| 40 |
+
.nav-container {
|
| 41 |
+
padding: 1rem;
|
| 42 |
+
}
|
| 43 |
+
.nav-links {
|
| 44 |
+
display: none;
|
| 45 |
+
}
|
| 46 |
+
}
|
| 47 |
+
</style>
|
| 48 |
+
<nav>
|
| 49 |
+
<div class="nav-container">
|
| 50 |
+
<a href="/" class="logo">
|
| 51 |
+
<i data-feather="code"></i>
|
| 52 |
+
COBOL Structuré
|
| 53 |
+
</a>
|
| 54 |
+
<div class="nav-links">
|
| 55 |
+
<a href="index.html" class="nav-link">Accueil</a>
|
| 56 |
+
<a href="statements.html" class="nav-link">Instructions</a>
|
| 57 |
+
<a href="#" class="nav-link">Exemples</a>
|
| 58 |
+
<a href="#" class="nav-link">À propos</a>
|
| 59 |
+
</div>
|
| 60 |
+
</div>
|
| 61 |
+
</nav>
|
| 62 |
+
`;
|
| 63 |
+
}
|
| 64 |
+
}
|
| 65 |
+
customElements.define('custom-navbar', CustomNavbar);
|
|
@@ -1,19 +1,189 @@
|
|
| 1 |
-
<!
|
| 2 |
-
<html>
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="fr">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>COBOL Structuré: Hiérarchie Animée</title>
|
| 7 |
+
<link rel="stylesheet" href="style.css">
|
| 8 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 9 |
+
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
|
| 10 |
+
<script src="https://unpkg.com/feather-icons"></script>
|
| 11 |
+
<script>
|
| 12 |
+
tailwind.config = {
|
| 13 |
+
theme: {
|
| 14 |
+
extend: {
|
| 15 |
+
colors: {
|
| 16 |
+
primary: {
|
| 17 |
+
500: '#2563eb',
|
| 18 |
+
},
|
| 19 |
+
secondary: {
|
| 20 |
+
500: '#7c3aed',
|
| 21 |
+
}
|
| 22 |
+
}
|
| 23 |
+
}
|
| 24 |
+
}
|
| 25 |
+
}
|
| 26 |
+
</script>
|
| 27 |
+
</head>
|
| 28 |
+
<body class="bg-gray-50 font-sans">
|
| 29 |
+
<custom-navbar></custom-navbar>
|
| 30 |
+
|
| 31 |
+
<main class="container mx-auto px-4 py-8 max-w-4xl">
|
| 32 |
+
<header class="text-center mb-12">
|
| 33 |
+
<h1 class="text-4xl font-bold text-primary-500 mb-4">📘 La structure d'un programme COBOL</h1>
|
| 34 |
+
<p class="text-xl text-gray-600">Divisions, Sections, Paragraphes, Phrases, Instructions, Chaînes</p>
|
| 35 |
+
</header>
|
| 36 |
+
|
| 37 |
+
<section class="bg-white rounded-xl shadow-lg p-6 mb-8">
|
| 38 |
+
<h2 class="text-2xl font-semibold text-secondary-500 mb-4">🧱 Vue d'ensemble de la hiérarchie COBOL</h2>
|
| 39 |
+
<p class="mb-6 text-gray-700">Le langage <strong>COBOL</strong> est un langage <strong>très structuré</strong>. On ne peut <strong>pas écrire n'importe quoi, n'importe où</strong>.</p>
|
| 40 |
+
|
| 41 |
+
<div class="flex justify-center mb-8">
|
| 42 |
+
<div id="hierarchy-animation" class="w-full max-w-md">
|
| 43 |
+
<!-- Animation will be inserted here by JavaScript -->
|
| 44 |
+
</div>
|
| 45 |
+
</div>
|
| 46 |
+
|
| 47 |
+
<blockquote class="border-l-4 border-primary-500 pl-4 py-2 bg-gray-50 italic text-gray-700">
|
| 48 |
+
<p><strong>Un programme COBOL est composé de divisions, qui contiennent des sections, formées de paragraphes, eux-mêmes composés de phrases, faites d'instructions et de chaînes de caractères.</strong></p>
|
| 49 |
+
</blockquote>
|
| 50 |
+
</section>
|
| 51 |
+
|
| 52 |
+
<section class="grid md:grid-cols-2 gap-6 mb-8">
|
| 53 |
+
<div class="bg-white rounded-xl shadow-lg p-6">
|
| 54 |
+
<h2 class="text-2xl font-semibold text-secondary-500 mb-4">1️⃣ Les Divisions (Divisions)</h2>
|
| 55 |
+
<p class="mb-4 text-gray-700">Les <strong>divisions</strong> sont les <strong>grandes parties obligatoires ou optionnelles</strong> d'un programme COBOL.</p>
|
| 56 |
+
|
| 57 |
+
<div class="overflow-x-auto">
|
| 58 |
+
<table class="min-w-full bg-gray-50">
|
| 59 |
+
<thead>
|
| 60 |
+
<tr class="bg-primary-500 text-white">
|
| 61 |
+
<th class="px-4 py-2">Division</th>
|
| 62 |
+
<th class="px-4 py-2">Rôle</th>
|
| 63 |
+
</tr>
|
| 64 |
+
</thead>
|
| 65 |
+
<tbody>
|
| 66 |
+
<tr class="border-b border-gray-200">
|
| 67 |
+
<td class="px-4 py-2 font-mono">IDENTIFICATION DIVISION</td>
|
| 68 |
+
<td class="px-4 py-2">Identité du programme</td>
|
| 69 |
+
</tr>
|
| 70 |
+
<tr class="border-b border-gray-200">
|
| 71 |
+
<td class="px-4 py-2 font-mono">ENVIRONMENT DIVISION</td>
|
| 72 |
+
<td class="px-4 py-2">Environnement (optionnelle)</td>
|
| 73 |
+
</tr>
|
| 74 |
+
<tr class="border-b border-gray-200">
|
| 75 |
+
<td class="px-4 py-2 font-mono">DATA DIVISION</td>
|
| 76 |
+
<td class="px-4 py-2">Déclaration des données</td>
|
| 77 |
+
</tr>
|
| 78 |
+
<tr>
|
| 79 |
+
<td class="px-4 py-2 font-mono">PROCEDURE DIVISION</td>
|
| 80 |
+
<td class="px-4 py-2">Logique du programme</td>
|
| 81 |
+
</tr>
|
| 82 |
+
</tbody>
|
| 83 |
+
</table>
|
| 84 |
+
</div>
|
| 85 |
+
</div>
|
| 86 |
+
|
| 87 |
+
<div class="bg-white rounded-xl shadow-lg p-6">
|
| 88 |
+
<h2 class="text-2xl font-semibold text-secondary-500 mb-4">🧠 Exemple minimal</h2>
|
| 89 |
+
<div class="bg-gray-800 rounded-lg p-4 overflow-x-auto">
|
| 90 |
+
<pre class="text-green-400 font-mono text-sm"><code>IDENTIFICATION DIVISION.
|
| 91 |
+
PROGRAM-ID. HELLO.
|
| 92 |
+
|
| 93 |
+
PROCEDURE DIVISION.
|
| 94 |
+
DISPLAY "Hello World".
|
| 95 |
+
STOP RUN.</code></pre>
|
| 96 |
+
</div>
|
| 97 |
+
<p class="mt-4 text-gray-700"><strong>Sans la <span class="font-mono">PROCEDURE DIVISION</span>, le programme ne fait rien.</strong></p>
|
| 98 |
+
</div>
|
| 99 |
+
</section>
|
| 100 |
+
|
| 101 |
+
<section class="bg-white rounded-xl shadow-lg p-6 mb-8">
|
| 102 |
+
<h2 class="text-2xl font-semibold text-secondary-500 mb-4">📐 Rappel important : Zone A / Zone B</h2>
|
| 103 |
+
|
| 104 |
+
<div class="overflow-x-auto mb-6">
|
| 105 |
+
<table class="min-w-full bg-gray-50">
|
| 106 |
+
<thead>
|
| 107 |
+
<tr class="bg-primary-500 text-white">
|
| 108 |
+
<th class="px-4 py-2">Zone</th>
|
| 109 |
+
<th class="px-4 py-2">Colonnes</th>
|
| 110 |
+
<th class="px-4 py-2">Contenu</th>
|
| 111 |
+
</tr>
|
| 112 |
+
</thead>
|
| 113 |
+
<tbody>
|
| 114 |
+
<tr class="border-b border-gray-200">
|
| 115 |
+
<td class="px-4 py-2">Zone A</td>
|
| 116 |
+
<td class="px-4 py-2">8 à 11</td>
|
| 117 |
+
<td class="px-4 py-2">Divisions, Sections, Paragraphes</td>
|
| 118 |
+
</tr>
|
| 119 |
+
<tr>
|
| 120 |
+
<td class="px-4 py-2">Zone B</td>
|
| 121 |
+
<td class="px-4 py-2">12 à 72</td>
|
| 122 |
+
<td class="px-4 py-2">Instructions COBOL</td>
|
| 123 |
+
</tr>
|
| 124 |
+
</tbody>
|
| 125 |
+
</table>
|
| 126 |
+
</div>
|
| 127 |
+
|
| 128 |
+
<div class="bg-gray-800 rounded-lg p-4 overflow-x-auto">
|
| 129 |
+
<pre class="text-green-400 font-mono text-sm"><code> IDENTIFICATION DIVISION. ← Zone A
|
| 130 |
+
PROGRAM-ID. DEMO. ← Zone A
|
| 131 |
+
|
| 132 |
+
PROCEDURE DIVISION. ← Zone A
|
| 133 |
+
DISPLAY "Hello". ← Zone B
|
| 134 |
+
STOP RUN. ← Zone B</code></pre>
|
| 135 |
+
</div>
|
| 136 |
+
</section>
|
| 137 |
+
|
| 138 |
+
<section class="bg-white rounded-xl shadow-lg p-6">
|
| 139 |
+
<h2 class="text-2xl font-semibold text-secondary-500 mb-4">🧠 Analogie simple</h2>
|
| 140 |
+
<p class="mb-4 text-gray-700">Comparaison avec un document écrit pour mieux comprendre la structure COBOL :</p>
|
| 141 |
+
|
| 142 |
+
<div class="overflow-x-auto">
|
| 143 |
+
<table class="min-w-full bg-gray-50">
|
| 144 |
+
<thead>
|
| 145 |
+
<tr class="bg-primary-500 text-white">
|
| 146 |
+
<th class="px-4 py-2">Français</th>
|
| 147 |
+
<th class="px-4 py-2">COBOL</th>
|
| 148 |
+
</tr>
|
| 149 |
+
</thead>
|
| 150 |
+
<tbody>
|
| 151 |
+
<tr class="border-b border-gray-200">
|
| 152 |
+
<td class="px-4 py-2">Livre</td>
|
| 153 |
+
<td class="px-4 py-2">Programme</td>
|
| 154 |
+
</tr>
|
| 155 |
+
<tr class="border-b border-gray-200">
|
| 156 |
+
<td class="px-4 py-2">Chapitre</td>
|
| 157 |
+
<td class="px-4 py-2">Division</td>
|
| 158 |
+
</tr>
|
| 159 |
+
<tr class="border-b border-gray-200">
|
| 160 |
+
<td class="px-4 py-2">Sous-chapitre</td>
|
| 161 |
+
<td class="px-4 py-2">Section</td>
|
| 162 |
+
</tr>
|
| 163 |
+
<tr class="border-b border-gray-200">
|
| 164 |
+
<td class="px-4 py-2">Paragraphe</td>
|
| 165 |
+
<td class="px-4 py-2">Paragraphe</td>
|
| 166 |
+
</tr>
|
| 167 |
+
<tr class="border-b border-gray-200">
|
| 168 |
+
<td class="px-4 py-2">Phrase</td>
|
| 169 |
+
<td class="px-4 py-2">Phrase</td>
|
| 170 |
+
</tr>
|
| 171 |
+
<tr>
|
| 172 |
+
<td class="px-4 py-2">Verbe</td>
|
| 173 |
+
<td class="px-4 py-2">Instruction</td>
|
| 174 |
+
</tr>
|
| 175 |
+
</tbody>
|
| 176 |
+
</table>
|
| 177 |
+
</div>
|
| 178 |
+
</section>
|
| 179 |
+
</main>
|
| 180 |
+
|
| 181 |
+
<custom-footer></custom-footer>
|
| 182 |
+
|
| 183 |
+
<script src="components/navbar.js"></script>
|
| 184 |
+
<script src="components/footer.js"></script>
|
| 185 |
+
<script src="script.js"></script>
|
| 186 |
+
<script>feather.replace();</script>
|
| 187 |
+
<script src="https://huggingface.co/deepsite/deepsite-badge.js"></script>
|
| 188 |
+
</body>
|
| 189 |
+
</html>
|
|
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
document.addEventListener('DOMContentLoaded', function() {
|
| 2 |
+
// Create the animated hierarchy visualization
|
| 3 |
+
const hierarchyContainer = document.getElementById('hierarchy-animation');
|
| 4 |
+
|
| 5 |
+
const hierarchyData = [
|
| 6 |
+
{ name: "Programme COBOL", color: "bg-primary-500" },
|
| 7 |
+
{ name: "Division", color: "bg-primary-400" },
|
| 8 |
+
{ name: "Section", color: "bg-primary-300" },
|
| 9 |
+
{ name: "Paragraphe", color: "bg-secondary-500" },
|
| 10 |
+
{ name: "Phrase", color: "bg-secondary-400" },
|
| 11 |
+
{ name: "Instruction", color: "bg-secondary-300" },
|
| 12 |
+
{ name: "Chaîne de caractères", color: "bg-gray-300" }
|
| 13 |
+
];
|
| 14 |
+
|
| 15 |
+
// Build the hierarchy visualization
|
| 16 |
+
let delay = 0;
|
| 17 |
+
hierarchyData.forEach((item, index) => {
|
| 18 |
+
setTimeout(() => {
|
| 19 |
+
const element = document.createElement('div');
|
| 20 |
+
element.className = `hierarchy-item ${item.color} text-white animate-fade-in`;
|
| 21 |
+
element.style.animationDelay = `${delay}s`;
|
| 22 |
+
|
| 23 |
+
// Add indentation
|
| 24 |
+
element.style.marginLeft = `${index * 1}rem`;
|
| 25 |
+
|
| 26 |
+
// Add arrow for parent items
|
| 27 |
+
if (index < hierarchyData.length - 1) {
|
| 28 |
+
element.innerHTML = `${item.name} <i data-feather="chevron-down" class="inline ml-2"></i>`;
|
| 29 |
+
} else {
|
| 30 |
+
element.textContent = item.name;
|
| 31 |
+
}
|
| 32 |
+
|
| 33 |
+
hierarchyContainer.appendChild(element);
|
| 34 |
+
feather.replace();
|
| 35 |
+
}, delay * 300);
|
| 36 |
+
|
| 37 |
+
delay += 0.3;
|
| 38 |
+
});
|
| 39 |
+
|
| 40 |
+
// Add interactive code examples
|
| 41 |
+
const codeExamples = document.querySelectorAll('pre code');
|
| 42 |
+
codeExamples.forEach((example) => {
|
| 43 |
+
example.addEventListener('click', function() {
|
| 44 |
+
this.classList.toggle('bg-gray-900');
|
| 45 |
+
this.classList.toggle('bg-gray-800');
|
| 46 |
+
});
|
| 47 |
+
});
|
| 48 |
+
});
|
|
@@ -0,0 +1,208 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="fr">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>Les Statements en COBOL</title>
|
| 7 |
+
<link rel="stylesheet" href="style.css">
|
| 8 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 9 |
+
<script src="https://unpkg.com/feather-icons"></script>
|
| 10 |
+
</head>
|
| 11 |
+
<body class="bg-gray-50 font-sans">
|
| 12 |
+
<custom-navbar></custom-navbar>
|
| 13 |
+
|
| 14 |
+
<main class="container mx-auto px-4 py-8 max-w-4xl">
|
| 15 |
+
<header class="text-center mb-12">
|
| 16 |
+
<h1 class="text-4xl font-bold text-primary-500 mb-4">📘 Les <em>Statements</em> en COBOL</h1>
|
| 17 |
+
<p class="text-xl text-gray-600">Instructions COBOL - Le cœur de votre programme</p>
|
| 18 |
+
</header>
|
| 19 |
+
|
| 20 |
+
<section class="bg-white rounded-xl shadow-lg p-6 mb-8 animate-fade-in">
|
| 21 |
+
<h2 class="text-2xl font-semibold text-secondary-500 mb-4">🔤 Traduction du terme</h2>
|
| 22 |
+
<div class="flex items-center bg-blue-50 p-4 rounded-lg mb-4">
|
| 23 |
+
<div class="text-4xl mr-4">🇬🇧→🇫🇷</div>
|
| 24 |
+
<div>
|
| 25 |
+
<p class="font-bold text-lg">Statement (anglais) → Instruction (français)</p>
|
| 26 |
+
<p class="text-gray-700">En COBOL, on parle donc d'<strong>instructions COBOL</strong>.</p>
|
| 27 |
+
</div>
|
| 28 |
+
</div>
|
| 29 |
+
</section>
|
| 30 |
+
|
| 31 |
+
<section class="grid md:grid-cols-2 gap-6 mb-8">
|
| 32 |
+
<div class="bg-white rounded-xl shadow-lg p-6 animate-fade-in">
|
| 33 |
+
<h2 class="text-2xl font-semibold text-secondary-500 mb-4">1️⃣ Qu'est-ce qu'une instruction ?</h2>
|
| 34 |
+
<p class="mb-4 text-gray-700">Une <strong>instruction COBOL</strong> est une <strong>combinaison de mots-clés COBOL et d'opérandes</strong>.</p>
|
| 35 |
+
|
| 36 |
+
<div class="bg-yellow-50 border-l-4 border-yellow-400 p-4 mb-4">
|
| 37 |
+
<p class="font-bold">Règle fondamentale :</p>
|
| 38 |
+
<p>Une instruction doit toujours contenir au moins <strong>un mot-clé COBOL</strong>.</p>
|
| 39 |
+
</div>
|
| 40 |
+
|
| 41 |
+
<div class="bg-green-50 p-4 rounded-lg">
|
| 42 |
+
<h3 class="font-bold mb-2">🧠 Exemples de mots-clés COBOL</h3>
|
| 43 |
+
<div class="grid grid-cols-2 gap-2">
|
| 44 |
+
<span class="bg-green-100 px-3 py-1 rounded-full text-sm font-mono">DISPLAY</span>
|
| 45 |
+
<span class="bg-green-100 px-3 py-1 rounded-full text-sm font-mono">MOVE</span>
|
| 46 |
+
<span class="bg-green-100 px-3 py-1 rounded-full text-sm font-mono">ADD</span>
|
| 47 |
+
<span class="bg-green-100 px-3 py-1 rounded-full text-sm font-mono">IF</span>
|
| 48 |
+
<span class="bg-green-100 px-3 py-1 rounded-full text-sm font-mono">PERFORM</span>
|
| 49 |
+
<span class="bg-green-100 px-3 py-1 rounded-full text-sm font-mono">STOP RUN</span>
|
| 50 |
+
</div>
|
| 51 |
+
</div>
|
| 52 |
+
</div>
|
| 53 |
+
|
| 54 |
+
<div class="bg-white rounded-xl shadow-lg p-6 animate-fade-in">
|
| 55 |
+
<h2 class="text-2xl font-semibold text-secondary-500 mb-4">🧠 Exemple simple</h2>
|
| 56 |
+
<div class="bg-gray-800 rounded-lg p-4 overflow-x-auto mb-4">
|
| 57 |
+
<pre class="text-green-400 font-mono text-sm"><code>DISPLAY "Hello World".</code></pre>
|
| 58 |
+
</div>
|
| 59 |
+
<div class="bg-gray-100 p-3 rounded-lg">
|
| 60 |
+
<p class="text-sm"><span class="font-bold">DISPLAY</span> → mot-clé COBOL</p>
|
| 61 |
+
<p class="text-sm"><span class="font-bold">"Hello World"</span> → opérande (chaîne)</p>
|
| 62 |
+
<p class="text-sm"><span class="font-bold">.</span> → fin de l'instruction</p>
|
| 63 |
+
</div>
|
| 64 |
+
</div>
|
| 65 |
+
</section>
|
| 66 |
+
|
| 67 |
+
<section class="bg-white rounded-xl shadow-lg p-6 mb-8 animate-fade-in">
|
| 68 |
+
<h2 class="text-2xl font-semibold text-secondary-500 mb-4">2️⃣ À quoi servent les instructions ?</h2>
|
| 69 |
+
|
| 70 |
+
<div class="grid md:grid-cols-2 gap-4">
|
| 71 |
+
<div class="bg-blue-50 p-4 rounded-lg flex items-start">
|
| 72 |
+
<div class="text-blue-500 mr-3 text-2xl">🧭</div>
|
| 73 |
+
<div>
|
| 74 |
+
<h3 class="font-bold">Contrôler le flux</h3>
|
| 75 |
+
<p class="text-sm">Gérer l'exécution du programme</p>
|
| 76 |
+
</div>
|
| 77 |
+
</div>
|
| 78 |
+
<div class="bg-purple-50 p-4 rounded-lg flex items-start">
|
| 79 |
+
<div class="text-purple-500 mr-3 text-2xl">🔢</div>
|
| 80 |
+
<div>
|
| 81 |
+
<h3 class="font-bold">Manipuler les données</h3>
|
| 82 |
+
<p class="text-sm">Calculs, transferts, conversions</p>
|
| 83 |
+
</div>
|
| 84 |
+
</div>
|
| 85 |
+
<div class="bg-green-50 p-4 rounded-lg flex items-start">
|
| 86 |
+
<div class="text-green-500 mr-3 text-2xl">⌨️</div>
|
| 87 |
+
<div>
|
| 88 |
+
<h3 class="font-bold">Entrées/Sorties</h3>
|
| 89 |
+
<p class="text-sm">Lire/écrire des fichiers, afficher</p>
|
| 90 |
+
</div>
|
| 91 |
+
</div>
|
| 92 |
+
<div class="bg-yellow-50 p-4 rounded-lg flex items-start">
|
| 93 |
+
<div class="text-yellow-500 mr-3 text-2xl">🔁</div>
|
| 94 |
+
<div>
|
| 95 |
+
<h3 class="font-bold">Boucles</h3>
|
| 96 |
+
<p class="text-sm">Répéter des opérations</p>
|
| 97 |
+
</div>
|
| 98 |
+
</div>
|
| 99 |
+
</div>
|
| 100 |
+
|
| 101 |
+
<div class="bg-red-50 border-l-4 border-red-400 p-4 mt-4">
|
| 102 |
+
<p class="font-bold">⚠️ Sans instructions, un programme COBOL ne fait rien.</p>
|
| 103 |
+
</div>
|
| 104 |
+
</section>
|
| 105 |
+
|
| 106 |
+
<section class="bg-white rounded-xl shadow-lg p-6 mb-8 animate-fade-in">
|
| 107 |
+
<h2 class="text-2xl font-semibold text-secondary-500 mb-4">3️⃣ Où écrire les instructions ?</h2>
|
| 108 |
+
|
| 109 |
+
<div class="bg-blue-50 p-4 rounded-lg mb-4">
|
| 110 |
+
<p class="font-bold">📍 Règle de positionnement</p>
|
| 111 |
+
<p>Toutes les instructions doivent être écrites :</p>
|
| 112 |
+
<ul class="list-disc pl-5 mt-2">
|
| 113 |
+
<li>Dans la <strong>PROCEDURE DIVISION</strong></li>
|
| 114 |
+
<li>En <strong>Zone B</strong> (colonnes 12 à 72)</li>
|
| 115 |
+
</ul>
|
| 116 |
+
</div>
|
| 117 |
+
|
| 118 |
+
<div class="bg-gray-800 rounded-lg p-4 overflow-x-auto">
|
| 119 |
+
<pre class="text-green-400 font-mono text-sm"><code> PROCEDURE DIVISION. ← Zone A
|
| 120 |
+
DISPLAY "Hello". ← Zone B</code></pre>
|
| 121 |
+
</div>
|
| 122 |
+
<div class="mt-3 flex items-center">
|
| 123 |
+
<div class="w-4 h-4 bg-blue-500 mr-2"></div>
|
| 124 |
+
<span class="text-sm">Zone A → structure</span>
|
| 125 |
+
<div class="w-4 h-4 bg-green-500 ml-4 mr-2"></div>
|
| 126 |
+
<span class="text-sm">Zone B → actions (instructions)</span>
|
| 127 |
+
</div>
|
| 128 |
+
</section>
|
| 129 |
+
|
| 130 |
+
<section class="bg-white rounded-xl shadow-lg p-6 mb-8 animate-fade-in">
|
| 131 |
+
<h2 class="text-2xl font-semibold text-secondary-500 mb-4">4️⃣ Les 4 grandes catégories</h2>
|
| 132 |
+
|
| 133 |
+
<div class="space-y-4">
|
| 134 |
+
<div class="border-l-4 border-blue-500 pl-4">
|
| 135 |
+
<h3 class="font-bold">① Instructions impératives</h3>
|
| 136 |
+
<p class="text-sm">Elles ordonnent une action directe</p>
|
| 137 |
+
<div class="bg-gray-100 p-2 mt-2 rounded">
|
| 138 |
+
<pre class="text-sm font-mono">DISPLAY "Hello".<br>MOVE 10 TO TOTAL.</pre>
|
| 139 |
+
</div>
|
| 140 |
+
</div>
|
| 141 |
+
|
| 142 |
+
<div class="border-l-4 border-purple-500 pl-4">
|
| 143 |
+
<h3 class="font-bold">② Instructions conditionnelles</h3>
|
| 144 |
+
<p class="text-sm">Exécutent une action si une condition est vraie</p>
|
| 145 |
+
<div class="bg-gray-100 p-2 mt-2 rounded">
|
| 146 |
+
<pre class="text-sm font-mono">IF I > 5<br> DISPLAY "Fin"<br>END-IF</pre>
|
| 147 |
+
</div>
|
| 148 |
+
</div>
|
| 149 |
+
|
| 150 |
+
<div class="border-l-4 border-green-500 pl-4">
|
| 151 |
+
<h3 class="font-bold">③ Instructions à portée délimitée</h3>
|
| 152 |
+
<p class="text-sm">Définissent un bloc logique clair</p>
|
| 153 |
+
<div class="bg-gray-100 p-2 mt-2 rounded">
|
| 154 |
+
<pre class="text-sm font-mono">PERFORM VARYING I FROM 1 BY 1<br> UNTIL I > 5<br> DISPLAY I<br>END-PERFORM</pre>
|
| 155 |
+
</div>
|
| 156 |
+
</div>
|
| 157 |
+
|
| 158 |
+
<div class="border-l-4 border-yellow-500 pl-4">
|
| 159 |
+
<h3 class="font-bold">④ Instructions de directives</h3>
|
| 160 |
+
<p class="text-sm">Donnent des instructions au compilateur</p>
|
| 161 |
+
<div class="bg-gray-100 p-2 mt-2 rounded">
|
| 162 |
+
<pre class="text-sm font-mono">COPY MY-COPYBOOK.<br>REPLACE ==:OLD:== BY ==:NEW:==.</pre>
|
| 163 |
+
</div>
|
| 164 |
+
</div>
|
| 165 |
+
</div>
|
| 166 |
+
</section>
|
| 167 |
+
|
| 168 |
+
<section class="bg-white rounded-xl shadow-lg p-6 animate-fade-in">
|
| 169 |
+
<h2 class="text-2xl font-semibold text-secondary-500 mb-4">🧠 Exemple complet commenté</h2>
|
| 170 |
+
|
| 171 |
+
<div class="bg-gray-800 rounded-lg p-4 overflow-x-auto">
|
| 172 |
+
<pre class="text-green-400 font-mono text-sm"><code> IDENTIFICATION DIVISION.
|
| 173 |
+
PROGRAM-ID. PROGSTRU.
|
| 174 |
+
AUTHOR. MTH.
|
| 175 |
+
|
| 176 |
+
PROCEDURE DIVISION.
|
| 177 |
+
1000-SEC1 SECTION.
|
| 178 |
+
1000-PARA.
|
| 179 |
+
DISPLAY "Hello World". *> Instruction 1
|
| 180 |
+
DISPLAY "Welcome to MTH". *> Instruction 2
|
| 181 |
+
STOP RUN.</code></pre>
|
| 182 |
+
</div>
|
| 183 |
+
|
| 184 |
+
<div class="mt-4 space-y-2">
|
| 185 |
+
<div class="flex items-start">
|
| 186 |
+
<div class="bg-blue-100 text-blue-800 px-2 py-1 rounded-full text-xs mr-2">1</div>
|
| 187 |
+
<p class="text-sm"><code>DISPLAY "Hello World".</code> → instruction impérative</p>
|
| 188 |
+
</div>
|
| 189 |
+
<div class="flex items-start">
|
| 190 |
+
<div class="bg-blue-100 text-blue-800 px-2 py-1 rounded-full text-xs mr-2">2</div>
|
| 191 |
+
<p class="text-sm"><code>DISPLAY "Welcome to MTH".</code> → instruction impérative</p>
|
| 192 |
+
</div>
|
| 193 |
+
<div class="flex items-start">
|
| 194 |
+
<div class="bg-blue-100 text-blue-800 px-2 py-1 rounded-full text-xs mr-2">3</div>
|
| 195 |
+
<p class="text-sm"><code>STOP RUN.</code> → instruction de fin de programme</p>
|
| 196 |
+
</div>
|
| 197 |
+
</div>
|
| 198 |
+
</section>
|
| 199 |
+
</main>
|
| 200 |
+
|
| 201 |
+
<custom-footer></custom-footer>
|
| 202 |
+
|
| 203 |
+
<script src="components/navbar.js"></script>
|
| 204 |
+
<script src="components/footer.js"></script>
|
| 205 |
+
<script src="script.js"></script>
|
| 206 |
+
<script>feather.replace();</script>
|
| 207 |
+
</body>
|
| 208 |
+
</html>
|
|
@@ -1,28 +1,82 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
}
|
| 5 |
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
margin-top: 0;
|
| 9 |
}
|
| 10 |
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
}
|
| 17 |
|
| 18 |
-
.
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
padding: 16px;
|
| 22 |
-
border: 1px solid lightgray;
|
| 23 |
-
border-radius: 16px;
|
| 24 |
}
|
| 25 |
|
| 26 |
-
.
|
| 27 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 28 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
/* Animation styles */
|
| 3 |
+
@keyframes fadeIn {
|
| 4 |
+
from { opacity: 0; transform: translateY(20px); }
|
| 5 |
+
to { opacity: 1; transform: translateY(0); }
|
| 6 |
+
}
|
| 7 |
+
|
| 8 |
+
@keyframes pulse {
|
| 9 |
+
0%, 100% { transform: scale(1); }
|
| 10 |
+
50% { transform: scale(1.05); }
|
| 11 |
+
}
|
| 12 |
+
|
| 13 |
+
.animate-fade-in {
|
| 14 |
+
animation: fadeIn 0.5s ease-out forwards;
|
| 15 |
+
}
|
| 16 |
+
|
| 17 |
+
.animate-pulse {
|
| 18 |
+
animation: pulse 2s infinite;
|
| 19 |
}
|
| 20 |
|
| 21 |
+
.highlight-box {
|
| 22 |
+
transition: all 0.3s ease;
|
|
|
|
| 23 |
}
|
| 24 |
|
| 25 |
+
.highlight-box:hover {
|
| 26 |
+
box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
|
| 27 |
+
transform: translateY(-2px);
|
| 28 |
+
}
|
| 29 |
+
/* Hierarchy tree styles */
|
| 30 |
+
.hierarchy-item {
|
| 31 |
+
position: relative;
|
| 32 |
+
padding: 0.75rem 1rem;
|
| 33 |
+
margin: 0.5rem 0;
|
| 34 |
+
border-radius: 0.375rem;
|
| 35 |
+
background-color: #f8fafc;
|
| 36 |
+
border: 1px solid #e2e8f0;
|
| 37 |
+
transition: all 0.3s ease;
|
| 38 |
}
|
| 39 |
|
| 40 |
+
.hierarchy-item:hover {
|
| 41 |
+
background-color: #e2e8f0;
|
| 42 |
+
transform: translateX(5px);
|
|
|
|
|
|
|
|
|
|
| 43 |
}
|
| 44 |
|
| 45 |
+
.hierarchy-item::before {
|
| 46 |
+
content: '';
|
| 47 |
+
position: absolute;
|
| 48 |
+
left: -1rem;
|
| 49 |
+
top: 50%;
|
| 50 |
+
width: 1rem;
|
| 51 |
+
height: 1px;
|
| 52 |
+
background-color: #cbd5e1;
|
| 53 |
}
|
| 54 |
+
|
| 55 |
+
.hierarchy-item:first-child::before {
|
| 56 |
+
display: none;
|
| 57 |
+
}
|
| 58 |
+
|
| 59 |
+
/* Code block styles */
|
| 60 |
+
pre {
|
| 61 |
+
position: relative;
|
| 62 |
+
}
|
| 63 |
+
|
| 64 |
+
pre code::before {
|
| 65 |
+
content: 'COBOL';
|
| 66 |
+
position: absolute;
|
| 67 |
+
top: 0;
|
| 68 |
+
right: 0;
|
| 69 |
+
padding: 0.25rem 0.5rem;
|
| 70 |
+
background-color: rgba(255, 255, 255, 0.1);
|
| 71 |
+
color: #94a3b8;
|
| 72 |
+
font-size: 0.75rem;
|
| 73 |
+
border-bottom-left-radius: 0.25rem;
|
| 74 |
+
}
|
| 75 |
+
|
| 76 |
+
/* Responsive adjustments */
|
| 77 |
+
@media (max-width: 768px) {
|
| 78 |
+
.hierarchy-item {
|
| 79 |
+
padding: 0.5rem;
|
| 80 |
+
font-size: 0.875rem;
|
| 81 |
+
}
|
| 82 |
+
}
|