The stop
expression does nothing.
Execution of stop
immediately halts silently.
stop
has type Bot
.
{- Print three numbers in sequence, and then halt without publishing a signal from Println. -} Println("1") >> Println("2") >> Println("3") >> stop {- OUTPUT: 1 2 3 -}
{- Define a square root function which halts silently if its argument is negative. -} def squareroot(n) = if (n <: 0) then stop else (n ** 0.5) squareroot(-1) {- OUTPUT: -}
Related Reference Topics
Related Tutorial Sections