Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Oz (programming language)
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Data structures=== Oz is based on a core language with very few datatypes that can be extended into more practical ones through [[syntactic sugar]]. Basic data structures: * Numbers: floating point or integer (real integer) * Records: for grouping data : <code> circle(x:0 y:1 radius:3 color:blue style:dots)</code>. Here the terms x,y, radius etc. are called features and the data associated with the features (in this case 0,1,3 etc.) are the values. * Tuples: Records with integer features in ascending order: <code> circle(1:0 2:1 3:3 4:blue 5:dots) </code>. * Lists: a simple linear structure <syntaxhighlight lang="erlang"> '|'(2 '|'(4 '|'(6 '|'(8 nil)))) % as a record. 2|(4|(6|(8|nil))) % with some syntactic sugar 2|4|6|8|nil % more syntactic sugar [2 4 6 8] % even more syntactic sugar </syntaxhighlight> Those data structures are values (constant), [[first-class object|first class]] and [[dynamic typing|dynamically type checked]]. Variable names in Oz start with an uppercase letter to distinguish them from [[Literal (computer programming)|literals]]<ref>{{Cite web|url=https://mozart.github.io/mozart-v1/doc-1.4.0/tutorial/node3.html#label18|title=3 Basics}}</ref> which always begin with a lowercase letter.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)