(* ============================================================================== * File: WorkingExample1.p * Purpose: Working example for BrokenExample1.p. This program has no other use * but to the corection of basic syntax errors in a pascal program. * Author: Jordan Kidney ( kidney@cpsc.ucalgary.ca ) * Created on: Jan 31, 2006 ============================================================================== *) program WorkingExample1 (input,output); (* ========================== MAIN ============================================== *) begin var age : integer; (* Read in the age of the user *) write('Please enter your age : '); read(age); writeln('You entered: ',age); (* Now print out some extra information *) write('Result: '); if age < 11 then writeln('You are very young.') else if age < 21 then writeln('You are getting older.') else if age > 20 then writeln('You are still getting older'); end. (* ============================================================================== *)