Sebagai bahan perbandingan saya akan menulis dengan beberapa pilihan gaya penulisan program. yang mungkin dapat anda terapkan di program lain.
Program 1
program Project1;
{$APPTYPE CONSOLE}
uses
SysUtils;
begin
write('Hallo world !');
readln;
end.
{$APPTYPE CONSOLE}
uses
SysUtils;
begin
write('Hallo world !');
readln;
end.
Program 2
program Project1;
{$APPTYPE CONSOLE}
uses
SysUtils;
var mystr:string;
begin
{$APPTYPE CONSOLE}
uses
SysUtils;
var mystr:string;
begin
mystr:='Hallo world !';
writeln(mystr);
readln;
end.
writeln(mystr);
readln;
end.
Program 3
program Project1;
{$APPTYPE CONSOLE}
uses
SysUtils;
const
{$APPTYPE CONSOLE}
uses
SysUtils;
const
mystr = 'hallo World!'
begin
writeln(mystr);
readln;
end.
begin
writeln(mystr);
readln;
end.
No comments:
Post a Comment