Type casting????
Quote
>type casting is possible in Pascal
>program test;
> var
> r: real;
> a, b, c: integer;
>begin
> r := real(a div b);
>end.
>Rich Allen
>h...@alaska.net
First of all type casting does not CHANGE values!!!!
Type casting changes TYPEs only
I.E. byte to char
var
c:Char; b:byte;
B
c:=char(b);
E
Pointer to Longint to array
type
arr=array[0..3] of byte;
var
p:pointer; l:longint; a:Arr;
B
p:=nil;
l:=Longint(p); { l=0 }
A:=Arr(p);
E
Type casting tells the compiler to interpet the structure as a different
structure. It is not a conversiton. If you look up sizeof() you will see
more on structure sizes and formations. If you have any more questions
about type castings - write.
/::::::::::::::::::::::::::::::::::::::::/
/ Jason Pyeron :{) | Every thing in /
/ Radio Jammer :{) | life is free /
/ JPye...@HofLink.com | if you belive! /
/::::::::::::::::::::::::::::::::::::::::/