Content-Length: 206125 | pFad | http://zh.wikipedia.org/wiki/Genie%E8%AA%9E%E8%A8%80

Genie語言 - 维基百科,自由的百科全书 跳转到内容

Genie語言

本页使用了标题或全文手工转换
维基百科,自由的百科全书
Genie
编程范型多範型指令式編程結構化編程物件導向
設計者Jamie McCracken
實作者GNOME Project
发行时间2008年,​16年前​(2008
型態系統staticstrong
操作系统Cross-platform(所有由GLib支援的平台)
許可證LGPL 2.1+
文件扩展名.gs
網站https://wiki.gnome.org/Projects/Genie
啟發語言
PythonBOOD語言Delphi

Genie,一種現代通用型的高級語言,最早在2008年被發表[1],由 GNOME 所推動,採用GNU宽通用公共许可证。它可以在某些应用场景中作为 Vala的语法替代。它與Vala共用相同的編譯器程式庫,兩種程式語言可以完全共用[2],唯一的差別在於語法的不同。

它的語法接近 Python,借助 GObject 來實現物件導向程式設計

程式範例

[编辑]

"Hello World"

[编辑]

这个例子显式的使用四个空格作为缩进。

[indent=4]

init
    print "Hello, world!"

对象

[编辑]

没有显式的缩进声明,缺省为tab。

class Sample

	def run()
		stdout.printf("Hello, world! \n ")

init
	var sample = new Sample()
	sample.run()

引用

[编辑]
  1. ^ Jamie McCracken. Introducing Genie - the smart programming language. 2008. (原始内容存档于2011-08-18). 
  2. ^ Using Genie and Vala together. [2022-08-30]. (原始内容存档于2022-08-30). 









ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://zh.wikipedia.org/wiki/Genie%E8%AA%9E%E8%A8%80

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy