[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [linux-team] Humour :"Hello World"
On Wed, 6 Oct 1999, Pascal Bleser wrote:
> On Wed, Oct 06, 1999 at 09:59:04AM +0200, Pascal A. Dupuis wrote:
> > On Tue, 5 Oct 1999, Damien Cornet wrote:
> > > Enoncé : Le but de la manipulation est d'écrire un programme qui
> > > affichera "HELLO WORLD" à l'écran.
> > Dinosaure atypique :
> > echo | awk '{print "HELLO WORLD";}'
> Sans "echo" quand même :)
>
Ah, ben si, justement. awk attends un nom de programme, et par défaut lit
stdin. Donc, sans echo, on a :
awk '{print "HELLO WORLD";}' ""
[taper sur Enter]
HELLO WORLD
[^D]
> (programme terminé)
> > Il manque dans la liste :
> > -programme sous Win32
> alors là, tu n'espères quand même pas que je vais vendre mon âme
> juste pour faire un hello world ;-)
>
Je trouve amusant le point d'entrée d'un programme sous Win32. Si je me
souviens bien, cela ressemble à:
int far Pascal winmain(hInstance PreviousInstance, hInstance Instance)
ou quelque chose comme cela. Que les puristes me corrigent.
> > -python
> #!/usr/bin/python
> print "Hello World\n"
> > -perl
> #!/usr/bin/perl
> print "Hello World\n";
> 1;
>
> bah, trop facile ;-)
Et en 'one-liner?'
>
> A part ça...
> qqn sait faire du LISP ? :-))
Yen a déjà :
(defun HELLO(print (cons 'HELLO (list 'WORLD))))
Tiens, et en Fortran 77 ? [Me souviens plus bien]
10 WRITE(6,20)
20 FORMAT("HELLO WORLD")
Pascal Dupuis
--
«J'ai installe le package contenant m4 afin de configurer mon
sendmail.cf.. et depuis, lorsque je demarre, je me retrouve avec un:
Kernel Panic: VFS: unable to mount root fs on 08:01 !!! kesaco?!»
-+- LA in Guide du linuxien pervers : "Alors ça c'est pas de chance !" -+-
---------
Visit the Linux Supertore Online: http://www.redcorp.com !
If you want to be deleted from the list, send a mail to
majordomo@rtfm.be with "unsubscribe linux-team" in the body.