well as polymorphism which allows a procedure or function to have different parameters. The and procedures all have the same format: read[ln] [( [file ,] variable [, variable ...] )] ; write[ln] [( [file][, value [, value ...] )] ; where is an optional file variable, which if omitted, defaults to for and , or defaults to for and ; is a scalar such as a char (character), integer, or real (or for some compilers, certain record types or array types such as strings); and is a variable or a constant. Example: var f: text; ch: char; n,a,I,B: Integer; S: String; begin Write('Enter name of file to write results: '); readln(s); assign(f,S); rewrite(f); Write('What is your name? '); readln(Input,S); Write('Hello, ',S,'! Enter the number of calculations you want to do:'); writeln(output); Write('? '); readln(N); Write('For each of the ',n,' formulas, enter '); write('two integers separated by one or more spaces'); writeln; for i := 1 to N do begin Write('Enter pair #',i,'? '); read(a,b); READLN; WRITELN(Out,'A [',a,'] + B [',B,'] =',A+B); end; close(OUT); end. In the above example, as far as the compiler is concerned, lines 9 and 13 are identical, because if is the file variable being read into by a or statement, the file variable may be omitted. Also, the compiler considers lines 15 and 20 to be identical, because if the file variable being written to is , it can be omitted, which means (on line 20) since there are no arguments being passed to the procedure the parentheses listing arguments can be omitted. Line 26 shows the statement can have any number of arguments, and they can be a quoted string, a variable, or even a formula result. Object Pascal supports polymorphic procedures and functions, where different procedure(s) or function(s) can have the same name but are distinguished by the arguments supplied to them. Pascal also supports default arguments, where the value of an argument, if not provided, is given a default value. For the first example, polymorphism, consider the following: function add(a1,a2:integer):Integer; begin add := a1+a2 end; function add(r1,r2:real):real; begin add := a1+a2 end; function add(a1:integer;r2:real):real; begin add := real(a1)+a2 end; function add(r1:real,a2:integer):real; begin add := a1+real(a2) end; In the above example, if as called with two integer values, the function declared on line 1 would be called; if one of the arguments is an integer and one is real, either the function on line