Mouais, à ce compte là, autant l'écrire en lisp comme indiqué dans le poste juste au dessus : comme ça les balises sont fermées automatiquement :)
(loop for n from 100 downto 1 do
(format t "~A bottles of beer on the wall " n)
(format t "~A bottles of beer " n)
(format t "Take one down, and pass it around... ")
(format t "~A bottles of beer on the wall~%" (- n 1)))
Ou pour faire vraiment dans le même style quand XML:
(defun my-print (&rest args)
(format t "~{~A~}" args))
(loop for n from 100 downto 1 do
(my-print n " bottles of beer on the wall ")
(my-print n " bottles of beer ")
(my-print "Take one down, and pass it around... ")
(my-print (- n 1) " bottles of beer on the wall" #\Newline))
[^] # Re: XS : programmez en XML
Posté par hocwp (site web personnel) . En réponse au journal Commencer à programmer ?. Évalué à 1.
(loop for n from 100 downto 1 do
(format t "~A bottles of beer on the wall " n)
(format t "~A bottles of beer " n)
(format t "Take one down, and pass it around... ")
(format t "~A bottles of beer on the wall~%" (- n 1)))
Ou pour faire vraiment dans le même style quand XML:
(defun my-print (&rest args)
(format t "~{~A~}" args))
(loop for n from 100 downto 1 do
(my-print n " bottles of beer on the wall ")
(my-print n " bottles of beer ")
(my-print "Take one down, and pass it around... ")
(my-print (- n 1) " bottles of beer on the wall" #\Newline))