25.01.2015 Views

Tutoriel sur la programmation Batch - Kro gpg

Tutoriel sur la programmation Batch - Kro gpg

Tutoriel sur la programmation Batch - Kro gpg

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

:Debut<br />

…est un bon nom pour un <strong>la</strong>bel<br />

• Un "Goto" se présente sous <strong>la</strong> forme de cette commande suivie du nom du <strong>la</strong>bel,<br />

par exemple :<br />

Goto Debut<br />

… pour aller au <strong>la</strong>bel "Début".<br />

Allons – y pour une boucle infinie !<br />

Nous voulons afficher "Hello, World !" en boucle.<br />

Nous écrirons donc :<br />

@echo off<br />

:Start<br />

echo Hello, World !<br />

Goto Start<br />

Le nom du <strong>la</strong>bel est librement configurable, vous pouvez prendre un tout autre nom<br />

que "Start", l'essentiel étant que le nom du <strong>la</strong>bel et le nom qui suit le "Goto" soient<br />

identiques.<br />

Vous obtiendrez un résultat de ce type :

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!