posted
Lets post as many different variations of the 'hello world' program in as many different coding languages as we can. Just to give that little used 'code' button some exercise
I'll go first: C++ (of course!)
code:
#include <iostream.h>
int main() { cout << "Hello world!\n"; return 0; }
Sub Main() Console.WriteLine("Hello World!") End Sub
End Module
Windows App
code:
Public Class Form1 Inherits System.Windows.Forms.Form
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load MessageBox.Show("Hello World!") End Sub End Class
posted
Can any other languages do infinite precision integer arithmetic? That's what's so cool about Lisp. It's great for doing number theory stuff, finding prime numbers and printing out every digit of 10,000 factorial or the first million digits of pi or things like that.
I'm about 10 years out of date in programming skillz, though, so likely there's something else way better now. But I just don't know what.
I bet I'm the only one here who's written code in IBM 370 JCL, or DEC PDP-11 machine language. Or how about PL/1? <laughs> A dubious distinction, at best.
My aunt helped write one of the first assemblers at Rand Corporation in the 50s before there were computer science majors (she majored in Math).
When I started my first programming job in 1982 I worked with a guy who had started out soldering boards in order to write his programs. They actually did that at one point, used a solder gun and little wires to write their code, then plugged the board into the slot to run the program. <boggles>
Posts: 6246 | Registered: Aug 2004
| IP: Logged |
procedure Hello is begin Ada.Text_IO.Put_Line("Hello, world!"); end Hello;
Ahhh... Ada. Barf. It's what we used in my into CS class. Good ol Dr. Atkins. I guess WVU had some kind of deal with the military to teach ada. Dr. Atkins was a great teacher. Hard as heck tests. But after his class every other CS class was a review.
Posts: 2845 | Registered: Oct 2003
| IP: Logged |
posted
Many modern languages allow arbitrary precision arithmetic. Python, Ruby, Perl, all do it effortlessly (actually, never tried in Perl, but I'm pretty sure it can). Java can do it without much trouble.
Posts: 15770 | Registered: Dec 2001
| IP: Logged |
title Hello World Program (helloworld.asm) dosseg .model small .stack 100h .data hello_message db 'Hello, World!',0dh,0ah,'$' .code main proc mov ax,@data mov ds,ax mov ah,9 mov dx,offset hello_message int 21h mov ax,4C00h int 21h main endp end main
posted
Well, yes, pretty much any computer language we're discussing is Turing complete, and can thus calculate in arbitrary precision arithmetic in some way/shape/form. The ones I listed make it easy, though .
Posts: 15770 | Registered: Dec 2001
| IP: Logged |