Monday, December 10, 2007

How to work with CLRSCR

How to work with CLRSCR

To work with CLRSCR

Description:

Clears the screen and returns the cursor to the upper left corner.

Declaration:

procedure ClrScr;

Example:

program Welcome;

uses

Crt;

var

a:file;

begin

TextBackground(LightGray);

ClrScr;

end.

Edited By: Norasyikin Mahmud

© 2001 ISC

All rights reserved. All other product names and trademarks are registered properties of their respective owners.

211101


How to work with Close command

How to work with Close command

To work with Close command

Description:

Closes an open file.

Declaration:

procedure Close(var F);

Example:

program Welcome;

var

a:file;

begin

Assign(a,'\AUTOEXEC>BAT');

Reset(a,1);

Writeln('File size= ',FileSize(a));

Close(a);

end.

How to work with Assign command

How to work with Assign command

To work with Assign command

Description:

Assigns the name of an external file to a file variable.

Declaration:

procedure Assign(var F; Name);

Example:

program Welcome;

var

a:text;

begin

Assign(a,'');

Rewrite(a);

Writeln(a,'standard output...');

Close(a);

end.

How to work with Arc by example

How to work with Arc by example

To work with Arc by example

Example:

program Welcome;

uses

Graph;

var

a,b:integer;

radius:integer;

begin

a:=Detect;

initgraph(a,b,'')

if GrapResult<> grOK then Halt(1);

for Radius:=1 to 5 do

Arc(100,100,0,90,Radius*10);

Readln;

CloseGraph;

end.