OPL
Code:PROC HelloUbuntu: LOCAL Name$(64) PRINT "Hi! What's your name?" INPUT Name$ PRINT "Hello+Name$+". Welcome to Ubuntu!" GET ENDP
OPL
Code:PROC HelloUbuntu: LOCAL Name$(64) PRINT "Hi! What's your name?" INPUT Name$ PRINT "Hello+Name$+". Welcome to Ubuntu!" GET ENDP
Last edited by Sera88; August 22nd, 2008 at 05:54 PM.
FLEX
Code:<?xml version="1.0"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"> <mx:HBox> <mx:Label text="Enter Your Name"/> <mx:TextInput id="textBox"/> </mx:HBox> <mx:Button click="mx.controls.Alert.show('Hello, ' + textBox.text, 'Alert Box')" label="Say Hello!"/> </mx:Application>
BeFunge
Code:v >v"Hello Ubuntu"0< ,: ^_25*,@
Ruby
Code:#!/usr/bin/ruby print 'Hi. What\'s your name? ' name = readline name.chomp! puts 'Hello, ' + name + '. Welcome to Ubuntu.'
QtRuby Qt 4
Code:#!/usr/bin/env ruby require 'Qt4' include Qt class Ubuntu < Qt::Widget slots 'mesg()' def initialize(parent = nil) super() @text = Qt::LineEdit.new(tr('Hi. What\'s your name'), self) connect(@text, SIGNAL('returnPressed()'), self, SLOT('mesg()')) layout = Qt::VBoxLayout.new() layout.addWidget(@text) setLayout(layout) end def mesg() name = @text.text() ret = MessageBox::warning(self, tr("Hi"), tr("Hi, "+name+". Welcome to Ubuntu!"), MessageBox::Ok | MessageBox::Cancel, MessageBox::Ok) $qApp::quit() end end app = Qt::Application.new(ARGV) widget = Ubuntu.new() widget.setWindowTitle("Hello Ubuntu") widget.show() app.exec()
I can't believe nobody has written one in INTERCAL yet! What better language is there? For, say, curing us of our sanity?
I'll leave this honor to somebody of more courage. Or more patience for long, difficult manuals that discuss error messages like 'PROGRAM HAS DISAPPEARED INTO THE BLACK LAGOON' (if that's not where they started).
A "hello, world" program will suffice until somebody with enough nerve figures out how to do it a better way.
I think this might technically violate the rule that the submitted programs be readable.Code:DO ,1 <- #13 PLEASE DO ,1SUB#1 <- #234 DO ,1SUB#2 <- #112 DO ,1SUB#3 <- #112 DO ,1SUB#4 <- #0 DO ,1SUB#5 <- #64 DO ,1SUB#6 <- #194 DO ,1SUB#7 <- #48 PLEASE DO ,1SUB#8 <- #22 DO ,1SUB#9 <- #248 DO ,1SUB#10 <- #168 DO ,1SUB#11 <- #24 DO ,1SUB#12 <- #16 DO ,1SUB#13 <- #214 PLEASE READ OUT ,1 PLEASE GIVE UP
Disagreement.
Note: Use of ClrHome is so that Output cooperates, and use of Output is so that the string can be on the same line. The second Output is because using Disp might've led to double-text/other-problems. Sloppy version:Code:ClrHome InpSt "Hi! What's your name?", A Disp "Hello," Output(8, 2, A) Output(1, 3, "Welcome to Ubuntu!"
[CODE]
InpSt "Hi! What's your name?", A
Disp "Hello,",A,"Welcome to Ubuntu!"
Last edited by fiddler616; August 30th, 2008 at 09:42 PM. Reason: More info...
AutoIt
JustBasicCode:$name = inputbox("Welcome", "Please enter your name :)") msgbox(0,"Hello","Welcome "&$name&" to Ubuntu");
Both windows languages but compilers work well under WINECode:input "Please enter your name"; nme$ print "Hello";nme$;"Welcome to ubuntu"
Last edited by ratmandall; September 6th, 2008 at 09:56 AM.
ABAP
Code:REPORT ZHB00001. WRITE: 'Hello world'.
Bookmarks