[prev in list] [next in list] [prev in thread] [next in thread]
List: fedora-devel-list
Subject: Re: /*MerryChristmas.c*/
From: Gérard Milmeister <gemi () bluewin ! ch>
Date: 2008-12-29 21:31:55
Message-ID: 1230586315.4566.2.camel () localhost ! localdomain
[Download RAW message or body]
On Sun, 2008-12-28 at 21:50 -0500, Casey Dahlin wrote:
> Arthur Pemberton wrote:
> > On Wed, Dec 24, 2008 at 3:11 PM, Rodrigo Padula de Oliveira
> > <rodrigopadula@projetofedora.org> wrote:
> >
> >> /*MerryChristmas.c*/
> >> void main (int argc, char* argv[])
> >> {
> >> printf("\n Merry Christmas! \n");
> >> if (strcmp(argv[1],"girl") == 0) /*general idea*/
> >> printf("Kisses! \n");
> >> else
> >> printf("Hugs! \n");
> >> }
> >>
> >
> >
> > #i!/bin/env python
> > import sys
> > print 'Kisses!' if len(sys.argv) == 2 and sys.argv[1].lower() ==
> > 'girl' else 'Hugs!'
> >
> >
> #! /usr/bin/env ruby
>
> class Object
> def response
> "Hugs!"
> end
> end
>
> class String
> def response
> return "Kisses!" if self.downcase == "girl"
> super
> end
> end
>
> puts "Merry Christmas!\n#{ARGV[0].response}"
#!/usr/bin/sbcl --script
(princ #\newline)
(princ "Merry Christmas!")
(princ #\newline)
(let ((argv sb-ext:*posix-argv*))
(if (> (length argv) 1)
(let ((type (string-downcase (cadr argv))))
(if (equal type "girl")
(princ "Kisses!")
(princ "Hugs!")))))
(princ #\newline)
--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic