Differences between version 22 and revision by previous author of Pascal.
Other diffs: Previous Major Revision, Previous Revision, or view the Annotated Edit History
Newer page: | version 22 | Last edited on Tuesday, February 2, 2010 2:42:07 am | by AristotlePagaltzis | Revert |
Older page: | version 21 | Last edited on Monday, February 1, 2010 7:03:21 pm | by LawrenceDoliveiro | Revert |
@@ -3,17 +3,12 @@
!!! A Sample
<verbatim>
function plural (noun : string) : string;
-<pre>
{ Returns the plural version of a noun. }
-</pre>
var
-<pre>
i : integer;
-</pre>
begin
-<pre>
case noun[[length(noun)] of
's': if noun[[length(noun)-1] = 'e' then
plural := noun
else
@@ -23,9 +18,8 @@
plural := noun + 'ies';
end;
else plural := noun + 's';
end;
-</pre>
end; {plural}
</verbatim>
(This is in the TurboPascal dialect of Pascal.)