Monday, December 10, 2007

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.

How to work with Arc

How to work with Arc

To work with Arc

Description:

The Arc function draws an elliptical arc.

Declaration:

Arc(DC: HDC; X1, Y1, X2, Y2, X3, Y3, X4, Y4: Integer): Bool;

How to work with Abs by example

How to work with Abs by example

To work with Abs by example

Example:

program Welcome;

uses

WinCrt;

var

r:integer;

t:real;

begin

r:=Abs(-100);

t:=Abs(-1.2);

Write(r,t);

end.

Output: