世界你好update大家的第一次

# 本文来自煎蛋(http://jandan.net/),作者为Sarah

如果你曾经是计算机系学生或者学习过任何一种编程语言的话,通常“Hello World”是第一个编写的程序。 这个程序第一次出现在1978年K&R编写的C语言一书中从那之后这个星球上几乎所有的程序语言都有它的实现。链接中是366种编程语言的实现以及58种人类语言的说法,总有一款适合你..

链接:Hello World

#Sarah: 这个应该是我的第一哈楼,你们的呢?

// Hello World in Java
class HelloWorld {
static public void main( String args[] ) {
System.out.println( "Hello World!" );
}
}

# Nice Comments 采集器
Programus 坐上沙发说:

一句
print "hello, world!"
不知道能覆盖多少种语言,呵呵……

azalea(blog) 的第一次是:

#!usr/bin/python
print "Hello world!"
以前学过BASIC,C,Java,Perl,都不记得了,只记得python..

李二嫂的猪(blog) 的第一次是:

WriteLn('Hello World!');

毫米卡尺 的第一次是:

#include
/* 打印"Hello World!";版本1 */
void main()
{
printf("Hello World!\n");
}

青龙 的疑似第一次是:

在C++里面的这段Hello World代码……
#include
void main()
{
std::cout << "Hello World" << std::endl;
}
不知道尖括号能不能识别出来。。。

blurblur 的C#第一次是:

//c#版的
using System;
namespace HelloWorld{
class Program {
Console.WriteLine("Hello,world");
}
}

青龙 :

前段时间也特意查过Hello World,最早的使用是这一行:
The first known instance of the usage of the words "hello" and "world" together in computer literature occurred earlier, in Kernighan's 1972 Tutorial Introduction to the Language B, with the following code:

main( ) {
extrn a, b, c;
putchar(a); putchar(b); putchar(c); putchar('!*n');
}
a 'hell';
b 'o, w';
c 'orld';
原文来自Wikipedia 在1972年……

ATi(blog) 爬上25楼说:

我不会代码
来个自创汉编:
显示 《世界,你好》
《宋体,5号字》
结束

sqybi(blog) 的第一次:

哈 我的第一次嘛 Pascal
begin
writeln('hello world!');
end.
其实作为我们OIer...a+b应该更流行一些...
var
a, b: longint;
begin
readln(a, b);
writeln(a+b);
end.

南 靖男 的第N次:

char *str = "Hello World!", *s;
unsigned short *vidmem = (unsigned short*) 0xb8000; /* 文本显存地址 */
unsigned i;
int cx = (int)*((unsigned char *)0×7BF0); /* boot 保存的光标位置 */
int cy = (unsigned char)*((unsigned char *)0×7BF1);
vidmem += cy * 80; /* 每行 80 个字符 */
vidmem += cx;
for (s = str, i = 0; *s; s++, i++)
vidmem[i] = (unsigned char) *s | 0×0C00; /* 低地址是字符的 ASCII 码,高地址是显示属性 */

Empty 的第N次

document.write("hello world!");

Aiuhx 这个超原始:

小学,一种绘图程序,很原始,控制一个叫做“海龟”的光标进行绘图。每一条线段的长度、角度及起点都需要一个命令。就是说需要像画画那样一笔一划的画出 HELLO WORLD

FD 100 //前进100
BK 50 //后退50
RT 90 //右转90度
FD 50 //前进50
LT 90 //左转90度
FD 50
BK 100 //完成H

RT 90
PU //抬起画笔,就是只是经过,不画出来
FD 20
PD //放下画笔
FD 50
BK 50
LT 90
FD 50
RT 90
FD 50
BK 50
LT 90
FD 50
RT 90
FD 50 /完成E。剩下的就不写了,太长了。

ALEX 的第N次:

10 LET S = "HELLO, WORLD"
20 PRINT S
90 END

LuoboTixS(blog) 的第N次:

扩展对象 窗口 继承自 窗口对象模板
对象事件 绘制时:
100 100 字串" 你好,世界!" 文本输出: 设备描述表
对象事件。
对象。
启动: 窗口

汉编

micro$ucks 的第N次:

用Unicode转义字符来表示的java "Hello world",与下面语句等效...
public
class Ugly
{public
static
void main(
String[]
args){
System.out
.println(
“Hello w”+
“orld”);}}
整理一下是这样~
public class Ugly {
public static void main(String[] args){
System.out.println("Hello w"+"orld");
}
}

leon 使用Ruby的第一次:

Ruby:
puts "hello world!"

垦一垦

 关于 “世界你好update大家的第一次”有 58 篇评论

  1. 1 Programus 说 : Reply to this comment
    2008-05-05 11:11 am

    一句
    print "hello, world!"
    不知道能覆盖多少种语言,呵呵……

  2. 2 oioi 说 : Reply to this comment
    2008-05-05 11:13 am

    wp 的开头是不是 hellow word?

  3. 3 小坏 说 : Reply to this comment
    2008-05-05 11:27 am

    哦耶~我不是~不过我当初写的第一个程序是啥呢?应该是basic的。。。但是不记得是啥内容了。。。

  4. 4 阿企 说 : Reply to this comment
    2008-05-05 12:17 pm
  5. 5 阿企 说 : Reply to this comment
    2008-05-05 12:18 pm

    为什么显示不了

  6. 6 xorms 说 : Reply to this comment
    2008-05-05 12:24 pm

    echo~

  7. 7 耗子小三 说 : Reply to this comment
    2008-05-05 12:26 pm

    #1 GRAPH
    #2 PRINT "HELLO WORLD"
    .......
    以前学GVBASIC的时候学的,现在忘得一干二净了(-_-#)

  8. 8 azalea 说 : Reply to this comment
    2008-05-05 12:44 pm

    #!usr/bin/python
    print "Hello world!"

    以前学过BASIC,C,Java,Perl,都不记得了,只记得python..

  9. 9 相片xiu 说 : Reply to this comment
    2008-05-05 12:45 pm

    echo 'hello world'
    :-)

  10. 10 李二嫂的猪 说 : Reply to this comment
    2008-05-05 12:51 pm

    WriteLn('Hello World!');

  11. 11 phoeagon 说 : Reply to this comment
    2008-05-05 12:59 pm

    //注:11楼的应该是pascal,应该这样写:
    begin
    WriteLn('Hello World!');
    end.

  12. 12 oioi 说 : Reply to this comment
    2008-05-05 1:38 pm

    我第一次是 c 应该是prinf 吧,具体忘了

  13. 13 6毫米卡尺 说 : Reply to this comment
    2008-05-05 1:45 pm

    你好,世界!

  14. 14 6毫米卡尺 说 : Reply to this comment
    2008-05-05 1:47 pm

    #include

    /* 打印"Hello World!";版本1 */

    void main()
    {
    printf("Hello World!\n");
    }

  15. 15 6毫米卡尺 说 : Reply to this comment
    2008-05-05 1:49 pm

    为什么尖括号里面的东西无法显示?
    好奇怪

  16. 16 oioi 说 : Reply to this comment
    2008-05-05 1:51 pm

    @6毫米卡尺 因为 < 被识别成 无效的html 标签了

  17. 17 青龙 说 : Reply to this comment
    2008-05-05 1:55 pm

    前段时间也特意查过Hello World,最早的使用是这一行:

    The first known instance of the usage of the words "hello" and "world" together in computer literature occurred earlier, in Kernighan's 1972 Tutorial Introduction to the Language B, with the following code:

    main( ) {
    extrn a, b, c;
    putchar(a); putchar(b); putchar(c); putchar('!*n');
    }
    a 'hell';
    b 'o, w';
    c 'orld';

    原文来自Wikipedia
    在1972年……

  18. 18 青龙 说 : Reply to this comment
    2008-05-05 1:59 pm

    在C++里面的这段Hello World代码……

    #include <iostream>

    void main()
    {
    std::cout << "Hello World" << std::endl;
    }

    不知道尖括号能不能识别出来。。。

  19. 19 6毫米卡尺 说 : Reply to this comment
    2008-05-05 2:14 pm

    青龙兄弟怎么把尖括号搞出来的?

  20. 20 湘湘麦 说 : Reply to this comment
    2008-05-05 2:23 pm

    ECHO是希腊神话里,一位山林女神的名字。ECHO容貌美丽,遭到天后妒嫉,被贬到下界。一天,ECHO在森林里,偶然遇到了美男子纳雪瑟斯,一见钟情。但是,天后惩罚ECHO,夺走她表白爱情的能力。ECHO不能正常说话,只能重复对方说话的最后三个字。ECHO怀着悲伤的爱情,跟在美男子的身后。

    纳雪瑟斯发觉了,便问身后的姑娘:

    “谁在这里?”

    “在这里。”ECHO回答。

    美男子又说:“不要这样,我宁死也不愿让你占有我。”

    “占有我。”ECHO答道。

    纳雪瑟斯听了,认定眼前这位女子,是轻薄的姑娘。于是,满脸不屑而去。ECHO难过极了。

    终于有一天,天帝明白了一切。他决定惩罚纳雪瑟斯。一天,纳雪瑟斯到湖边去,从湖水里看见自己的美貌,欣赏不已,恋恋不肯离去。天帝见了,便把他变成了一株水仙。ECHO不能忘记爱情,她成了一位深爱水仙的女神。

  21. 21 oioi 说 : Reply to this comment
    2008-05-05 3:04 pm

    楼上在说什么

  22. 22 blurblur 说 : Reply to this comment
    2008-05-05 3:18 pm

    //c#版的
    using System;
    namespace HelloWorld{
    class Program {
    Console.WriteLine("Hello,world");
    }
    }

  23. 23 湘湘麦 说 : Reply to this comment
    2008-05-05 3:44 pm

    我在回复六楼的。。。他说了个echo。
    我就讲了个echo的神话。
    因为我看不懂这篇文章,呵呵。

  24. 24 李二嫂的猪 说 : Reply to this comment
    2008-05-05 4:55 pm

    @phoeagon 关键语句~从Link里拿到标准写法:

    program HelloWorld(output);//在课堂上时,总是把input也加进去
    begin
    WriteLn('Hello World!');
    end.

  25. 25 ATi 说 : Reply to this comment
    2008-05-05 4:56 pm

    我不会代码
    来个自创汉编

    显示 《世界,你好》
    《宋体,5号字》
    结束

  26. 26 sqybi 说 : Reply to this comment
    2008-05-05 6:02 pm

    哈 我的第一次嘛 Pascal
    begin
    writeln('hello world!');
    end.

    其实作为我们OIer...a+b应该更流行一些...

    var
    a, b: longint;
    begin
    readln(a, b);
    writeln(a+b);
    end.

  27. 27 cugbig 说 : Reply to this comment
    2008-05-05 6:26 pm

    hello world
    很怀念啊

    什么程序第一个一定都是hello world

  28. 28 南 靖男 说 : Reply to this comment
    2008-05-05 6:27 pm

    char *str = "Hello World!", *s;
    unsigned short *vidmem = (unsigned short*) 0xb8000; /* 文本显存地址 */
    unsigned i;
    int cx = (int)*((unsigned char *)0×7BF0); /* boot 保存的光标位置 */
    int cy = (unsigned char)*((unsigned char *)0×7BF1);

    vidmem += cy * 80; /* 每行 80 个字符 */
    vidmem += cx;

    for (s = str, i = 0; *s; s++, i++)
    vidmem[i] = (unsigned char) *s | 0×0C00; /* 低地址是字符的 ASCII 码,高地址是显示属性 */

  29. 29 Empty 说 : Reply to this comment
    2008-05-05 7:08 pm

    document.write("hello world!");

  30. 30 Empty 说 : Reply to this comment
    2008-05-05 7:15 pm

    我再试试
    <script type="text/javascript">
    //<![CDATA[
    document.write("hello world!");
    //]]>
    </script>

  31. 31 Aiuhx 说 : Reply to this comment
    2008-05-05 7:20 pm

    小学,一种绘图程序,很原始,控制一个叫做“海龟”的光标进行绘图。每一条线段的长度、角度及起点都需要一个命令。就是说需要像画画那样一笔一划的画出 HELLO WORLD

    FD 100 //前进100
    BK 50 //后退50
    RT 90 //右转90度
    FD 50 //前进50
    LT 90 //左转90度
    FD 50
    BK 100 //完成H

    RT 90
    PU //抬起画笔,就是只是经过,不画出来
    FD 20
    PD //放下画笔
    FD 50
    BK 50
    LT 90
    FD 50
    RT 90
    FD 50
    BK 50
    LT 90
    FD 50
    RT 90
    FD 50 /完成E。剩下的就不写了,太长了。

  32. 32 Dickey 说 : Reply to this comment
    2008-05-05 8:35 pm

    @echo off

  33. 33 xrainfir 说 : Reply to this comment
    2008-05-05 8:54 pm

    批处理的

    @echo off
    echo Hello,world!

  34. 34 多尼多尼.乔巴 说 : Reply to this comment
    2008-05-05 10:02 pm

    foxpro算么 ==!

  35. 35 heroin 说 : Reply to this comment
    2008-05-05 10:56 pm

    你好
    请问你能不能显示一下“Hello,world!”呢
    谢谢

  36. 36 手气不错 说 : Reply to this comment
    2008-05-05 11:12 pm

    @Empty IE DOM 没有准备好的情况下 document.write 容易出问题

    //

  37. 37 手气不错 说 : Reply to this comment
    2008-05-05 11:12 pm

    我放弃....

  38. 38 scyang 说 : Reply to this comment
    2008-05-05 11:26 pm

    小学,一种绘图程序,很原始,控制一个叫做“海龟”的光标进行绘图。每一条线段的长度、角度及起点都需要一个命令。就是说需要像画画那样一笔一划的画出 HELLO WORLD

    FD 100 //前进100
    BK 50 //后退50
    RT 90 //右转90度
    FD 50 //前进50
    LT 90 //左转90度
    FD 50
    BK 100 //完成H

    RT 90
    PU //抬起画笔,就是只是经过,不画出来
    FD 20
    PD //放下画笔
    FD 50
    BK 50
    LT 90
    FD 50
    RT 90
    FD 50
    BK 50
    LT 90
    FD 50
    RT 90
    FD 50 /完成E。剩下的就不写了,太长了。
    ========================================

    我的第一次也是 "罗够" 语言……
    怀念中…………

  39. 39 Jinjiang 说 : Reply to this comment
    2008-05-05 11:45 pm

    第一次是在DOS下写:hello world~

  40. 40 ALEX 说 : Reply to this comment
    2008-05-06 12:15 pm

    10 LET S = "HELLO, WORLD"
    20 PRINT S
    90 END

  41. 41 Tata 说 : Reply to this comment
    2008-05-06 12:21 pm

    那个海龟作图是Logo语言。。。

  42. 42 LuoboTixS 说 : Reply to this comment
    2008-05-06 3:10 pm

    扩展对象 窗口 继承自 窗口对象模板
    对象事件 绘制时:
    100 100 字串" 你好,世界!" 文本输出: 设备描述表
    对象事件。
    对象。
    启动: 窗口

    汉编

  43. 43 micro$ucks 说 : Reply to this comment
    2008-05-06 4:37 pm

    \u0070\u0075\u0062\u006c\u0069\u0063\u0020\u0020\u0020\u0020
    \u0063\u006c\u0061\u0073\u0073\u0020\u0055\u0067\u006c\u0079
    \u007b\u0070\u0075\u0062\u006c\u0069\u0063\u0020\u0020\u0020
    \u0020\u0020\u0020\u0020\u0073\u0074\u0061\u0074\u0069\u0063
    \u0076\u006f\u0069\u0064\u0020\u006d\u0061\u0069\u006e\u0028
    \u0053\u0074\u0072\u0069\u006e\u0067\u005b\u005d\u0020\u0020
    \u0020\u0020\u0020\u0020\u0061\u0072\u0067\u0073\u0029\u007b
    \u0053\u0079\u0073\u0074\u0065\u006d\u002e\u006f\u0075\u0074
    \u002e\u0070\u0072\u0069\u006e\u0074\u006c\u006e\u0028\u0020
    \u0022\u0048\u0065\u006c\u006c\u006f\u0020\u0077\u0022\u002b
    \u0022\u006f\u0072\u006c\u0064\u0022\u0029\u003b\u007d\u007d

  44. 44 micro$ucks 说 : Reply to this comment
    2008-05-06 4:40 pm

    翻译成java是这样:
    public
    class Ugly
    {public
    static
    void main(
    String[]
    args){
    System.out
    .println(
    “Hello w”+
    “orld”);}}

  45. 45 oioi 说 : Reply to this comment
    2008-05-06 4:55 pm

    @micro$ucks 这是什么东东啊

  46. 46 micro$ucks 说 : Reply to this comment
    2008-05-06 6:12 pm

    @oioi
    用Unicode转义字符来表示的java "Hello world",与下面语句等效...

    public
    class Ugly
    {public
    static
    void main(
    String[]
    args){
    System.out
    .println(
    “Hello w”+
    “orld”);}}

    整理一下是这样~

    public class Ugly {
    public static void main(String[] args){
    System.out.println("Hello w"+"orld");
    }
    }

  47. 47 柳箫 说 : Reply to this comment
    2008-05-06 9:01 pm

    Hello World!

    Hello World!

  48. 48 柳箫 说 : Reply to this comment
    2008-05-06 9:02 pm

    <!--

    Hello World!

    Hello World!

    -->

  49. 49 柳箫 说 : Reply to this comment
    2008-05-06 9:03 pm

    晕。。怎么能这样。。。HTML怎么发呀。。。

  50. 50 柳箫 说 : Reply to this comment
    2008-05-06 9:04 pm

    //
    //
    // Hello World!
    //
    //
    // Hello World!
    //
    //

  51. 51 柳箫 说 : Reply to this comment
    2008-05-06 9:06 pm

    <!

    Hello World!

    Hello World!

    >

  52. 52 Toughlife 说 : Reply to this comment
    2008-05-06 9:52 pm

    看了31楼,我也怀念起小学学的LOGO了。。。。

  53. 53 leon 说 : Reply to this comment
    2008-05-06 10:05 pm

    Ruby:

    puts "hello world!"

  54. 54 oioi 说 : Reply to this comment
    2008-05-07 9:03 am

    @柳箫 你想发什么?
    @Toughlife 你们小学真幸福,我小学只在电视里见过这个

  55. 55 胡子 说 : Reply to this comment
    2008-05-08 10:57 am

    我们也用过海龟。都是画JJ的...

  56. 56 Eureka 说 : Reply to this comment
    2008-05-09 11:08 pm

    牛……

  57. 57 hadi 说 : Reply to this comment
    2008-05-10 10:36 am

    有意思

    shell
    #!/bin/sh
    echo "Hello World"

    AppleScript
    display dialog "Hello World!"

  58. 58 特例独行的猪 说 : Reply to this comment
    2008-06-12 4:12 pm

    tcl/tk

    puts stdout {hello,World!}

想说点什么吗?