I have this code in Oz:
declare
fun {NewCounter}
C Bump Read in
C={NewCell 0}
fun {Bump}
C:=@C+1
@C
end
fun {Read}
@C
end
counter(bump:Bump read:Read)
end
I have two questions:
1) C, Bump and Read labels are declared after the NewCounter function. Are they global labels ?
2) The NewCounter function return the record counter. Why do I have to specify the name of the record (counter), considering that no other function will never explicitly invoke it?