The Hello World version of the program in Zonnon (another Pascal/Oberon inspired language) is here.
By the way, you can see my previous post here: http://carlosqt.blogspot.com/2010/06/oo-hello-world.html
where I give some details on WHY these "OO Hello World series" samples.
By the way, you can see my previous post here: http://carlosqt.blogspot.com/2010/06/oo-hello-world.html
where I give some details on WHY these "OO Hello World series" samples.
Version 1 (Minimal):
The minimum you need to type to get your program compiled and running.
module Main; type {ref} Greet = object var name : string; procedure {public} Salute(name: string); begin self.name := name.Substring(0, 1).ToUpper() + name.Substring(1, name.Length - 1); writeln("Hello " + name + "!"); end Salute; begin name := ""; end Greet; var g: Greet; begin g := new Greet(); g.Salute("world"); end Main.
Version 2 (Verbose):
Explicitly adding instructions and keywords that are optional to the compiler.
module Main; import System; type {public, ref} Greet = object var {private} name : string; procedure {public} Salute(name: string); begin self.name := name.Substring(0, 1).ToUpper() + name.Substring(1, name.Length - 1); writeln("Hello " + self.name + "!"); end Salute; begin self.name := ""; end Greet; var g: Greet; begin g := new Greet(); g.Salute("world"); end Main.
The Program Output:
Zonnon Info:
“Zonnon is a general purpose programming language in the Pascal, Modula-2 and Oberon family. Its conceptual model is based on objects, definitions, implementations and modules. Its computing model is concurrent, based on active objects which interact via syntax controlled dialogs.” Taken from: (http://en.wikipedia.org/wiki/Zonnon)
Appeared:
|
2003
|
Current Version:
| |
Developed by:
|
Jürg Gutknecht
|
Creator:
|
Jürg Gutknecht
|
Influenced by:
|
Pascal, Oberon, Modula (Niklaus Wirth)
|
Predecessor Language
| |
Predecessor Appeared
| |
Predecessor Creator
| |
Runtime Target:
|
CLR
|
Latest Framework Target:
|
2.0
|
Mono Target:
|
Yes
|
Allows Unmanaged Code:
|
No
|
Source Code Extension:
|
“.znn”
|
Keywords:
|
59
|
Case Sensitive:
|
Yes
|
Free Version Available:
|
Yes
|
Open Source:
|
No
|
Standard:
|
No
|
Latest IDE Support:
|
Visual Studio 2008 (shell, pro)
Zonnon Builder
|
Language Reference:
| |
Extra Info:
|
No comments:
Post a Comment