Hello, The World 是任何编程语言的启蒙课、必修课和基础课,10年前在某个综合编程网站上,各种语言设擂台,要求是不用外部控件,只用你熟悉的语言,用不同的方式(命令、函数等)打印或显示出:Hello World 字符,胜者的评判标准是用最多的方式显示,最后是 Foxer(s) 的 50+种不同的方法显示出:Hello World 字符,遥遥领先其他语言,下面列出前20+种方式:
1.\Hello World && uses set textmerge on, not the same as text..endtext ;-)
2.? "Hello world"
3.Error "Hello World!"
4.@ x, y SAY "Hello world"
5.input "Hello World" to x
6.Wait Window "Hello World"
7.MessageBox ("Hello World")
8.SET MESSAGE TO "Hello world"
9._screen.Print("Hello World")
10.ACCEPT "Hello World" TO lcVar
11._screen.Caption="Hello world"
12._vfp.StatusBar = "Hello World"
13.InputBox("?","Hello World","")
14.KEYBOARD "{Ctrl+F2}Hello world!"
15.Assert .F. Message "Hello World" && Debugging, not allowed in interactive mode
16.DEFINE PAD HelloWorld OF _MSYSMENU PROMPT "Hello World"
17.MODIFY FILE "Hello World." && -- Geoff Franklin - wishing he hadn't started this.
18.WAIT "Hello World" TO lcVar && -- And before you ask: No, it's not the same as WAIT WINDOW Mike Lewis
19.@ x, y GET HelloWorld DEFAULT "Hello World"
20.? CHRTRAN(CHRTRAN('67882 3258D', '6789', 'HELP()'), '12345','POWER()')
21.select '' as Helloworld from (_foxcode) where .f.
22.oResponse.Write([Hello World]) && (to web browser from VFP/IIS)
23.SELECT "HelloWord" AS HelloWorld FROM (SYS(2005)) WHERE RECNO() = 1