Penguin

Differences between version 21 and predecessor to the previous major change of Pascal.

Other diffs: Previous Revision, Previous Author, or view the Annotated Edit History

Newer page: version 21 Last edited on Monday, February 1, 2010 7:03:21 pm by LawrenceDoliveiro Revert
Older page: version 20 Last edited on Wednesday, July 4, 2007 1:26:03 pm by GlynWebster Revert
@@ -3,12 +3,17 @@
 !!! 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 
@@ -18,8 +23,9 @@
  plural := noun + 'ies'; 
  end; 
  else plural := noun + 's'; 
  end; 
+</pre>  
 end; {plural} 
 </verbatim> 
  
 (This is in the TurboPascal dialect of Pascal.) 
@@ -34,12 +40,12 @@
  
 The most successful Pascal dialect has been Borland's TurboPascal. There are two OpenSource Pascal compilers for [Linux]: 
  
 * [GNU Pascal | http://www.gnu-pascal.de/] 
-* [Free Pascal | http://www.freepascal.org/] 
+* [Free Pascal | http://www.freepascal.org/]. __Note__ this is written in Pascal, so you need an existing Free Pascal binary to build the source!  
  
 Free Pascal tends more towards TurboPascal compatibility. 
  
 The online book [Pascal Implementation: A Book and Sources | http://www.cwi.nl/~steven/pascal/] walks you through the source code to the original Pascal compiler (implemented in Pascal as a RecursiveDescentParser). It's educational to read just as an extended critique of a non-trivial program. 
  
 ----- 
 Part of CategoryProgrammingLanguages, CategoryImperativeProgrammingLanguages, CategoryMachineOrientedProgrammingLanguages