great work guys!!!
great work guys!!!
Front page index has been updated.
And I should put another one in shouldn't I?
Scala
Code:object HelloUbuntu { def main(args: Array[String]) { val name = readLine("Hi! What's your name?\n") println("Hello, " + name + "! Welcome to Ubuntu!") } }
Nice job
Just hand me my pitchfork and torch.
Harbour
Well, who would have thought that 3.5 years down the line there would still be new entries for this thread!
Here is the program in Harbour:
Harbour is a free software (true) compiler for the xBase superset language often referred to as Clipper (the language that was implemented by the compiler CA-Cl*pper). That may sound very old-fashioned but there is still a lot of Clipper code floating around in one form or another. There are a confusing number of free and commercial 'forks'.Code:function Main() LOCAL nme nme := __ACCEPT("Hi! What's your name? ") ? "Hello, " + nme + ". Welcome to Ubuntu!" return Nil
Harbour works with file based dbf/ntx on Windows but can work with mySQL and SQLite under Linux (and Windows). Harbour is moving (in several directions at once!) to a marriage with QT to provide a true Linux gui.
C (again) [as a oneliner]
Code:#include <stdio.h> int main( void ){char name[64];printf("What is your name?');scanf("%s", name);printf("Hello, %s, and welcome to Ubuntu!", name);return 0;}
Last edited by YAXU; August 10th, 2012 at 09:42 PM.
Haskell again, but this one is in point-free style:
Code:main = putStrLn "What is your name?" >> (putStrLn . ("Helllo " ++) =<< getLine)
I know not with what weapons World War III will be fought, but World War IV will be fought with sticks and stones.
Freedom is measured in Stallmans.
Projects: gEcrit
Code:
Result:Code:#!/usr/bin/perl use strict; use ExtUtils::MakeMaker qw/prompt/; my $name = prompt("Hi, What is your name?"); print "Hello \L\u$name\E, Welcome to Ubuntu!\n";
Code:[{bulldog}~]$./name.pl Hi, What is your name? bULlDoG Hello Bulldog, Welcome to Ubuntu! [{bulldog}~]$
Bookmarks