Nautical bell: Difference between revisions
m
→{{header|Wren}}: Minor tidy
Thundergnat (talk | contribs) m (syntax highlighting fixup automation) |
m (→{{header|Wren}}: Minor tidy) |
||
(One intermediate revision by one other user not shown) | |||
Line 584:
End If
Next n
Sleep</syntaxhighlight>
=={{header|FreeBASIC}}==
{{trans|Ring}}
<syntaxhighlight lang="vb">Dim As Byte m = 0
For n As Byte = 0 To 23
If n = 23 Then
Print " 23" + ":30" + " = " + "7 bells"
Else
m += 1
Print ""; n Mod 23; ":30"; " ="; m; " bells"
End If
If n = 23 Then
Print " 00" + ":00" + " = " + "8 bells"
Else
m += 1
Print ""; (n Mod 23+1); ":00"; " ="; m; " bells"
If m = 8 Then m = 0
End If
Next n
Sleep</syntaxhighlight>
Line 2,125 ⟶ 2,146:
On my system (Ubuntu 20.04), the bell only rings once no matter how many \a's are concatenated togther, though it may be different on other systems.
<syntaxhighlight lang="
import "timer" for Timer
import "./date" for Date
import "./fmt" for Fmt
var watches = ["First", "Middle", "Morning", "Forenoon", "Afternoon", "Dog", "First"]
|