Sleeping Beauty problem: Difference between revisions

→‎{{header|Oberon-07}}: The Oberonc fern example doesn't use java.util.Random afterall.
(→‎{{header|Oberon-07}}: The Oberonc fern example doesn't use java.util.Random afterall.)
Tag: Manual revert
Line 694:
{{Trans|Wren}}
{{works with|Oberonc_(Oberon-07_compiler_for_the_JVM)}}
For this task we need random numbers, we first define a DEFINITION module that will allow Oberon-07 code compiled with [[Oberonc_(Oberon-07_compiler_for_the_JVM)|oberonc]] to call methods in a [[Java]] class to obtain random integers (The oberonc repo includes a rather more capable RandomNumbers module in the ''fern'' example, but this one just defines what we need for the task):
<syntaxhighlight lang="modula2">
(* Random numbers interface between Oberon-07 and java.util.Random *)
3,048

edits