99 bottles of beer: Difference between revisions
Content added Content deleted
(Added version w/ top-level declaration, string interpolation and Object Pascal syntax vs C# syntax) |
(Demonstrates uses of 'writeLn' vs 'Println' as well as string interpolation) |
||
Line 9,657: | Line 9,657: | ||
=={{header|PascalABC.NET}}== |
=={{header|PascalABC.NET}}== |
||
<syntaxhighlight lang=" |
<syntaxhighlight lang="pascal"> |
||
begin |
begin |
||
for var i:=99 to 1 step -1 do |
for var i:=99 to 1 step -1 do |
||
Line 9,667: | Line 9,667: | ||
Println |
Println |
||
end; |
end; |
||
end. |
|||
</syntaxhighlight> |
|||
This version demonstrates uses of 'writeLn' vs 'Println' as well as string interpolation: |
|||
<syntaxhighlight lang="pascal"> |
|||
begin |
|||
for var i:=99 to 1 step -1 do |
|||
begin |
|||
writeLn($'{i} bottles of beer on the wall'); |
|||
writeLn($'{i} bottles of beer'); |
|||
writeLn($'Take one down, pass it around'); |
|||
writeLn($'{i-1}bottles of beer on the wall'); |
|||
writeLn |
|||
end; |
|||
end. |
|||
</syntaxhighlight> |
|||
=={{header|Perl}}== |
=={{header|Perl}}== |