Oz (programming language): Difference between revisions

Content deleted Content added
Citation bot (talk | contribs)
Add: title. Changed bare reference to CS1/2. | Use this bot. Report bugs. | Suggested by BrownHairedGirl | Linked from User:BrownHairedGirl/Articles_with_bare_links | #UCB_webform_linked 671/2195
Line 57:
[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.
 
===Functions===
Line 130:
end
</syntaxhighlight>
But Oz also provides a facility in case a function must not return values. Such functions are called procedures.<ref>{{Cite web|url=https://mozart.github.io/mozart-v1/doc-1.4.0/tutorial/node5.html#control.procedure|title = 5 Basic Control Structures}}</ref> Procedures are defined using the construct "proc" as follows
<syntaxhighlight lang="erlang">
declare