123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129 |
- { %VERSION=1.1 }
- program testv6;
- uses variants,varutils;
- Procedure TestLongInt(B : Boolean);
- Var
- V : Variant;
- I : LongInt;
- begin
- Write('Longint assignment : ',B,' -> ');
- V:=B;
- I:=V;
- Writeln(I);
- end;
- Procedure Testsmallint(B : Boolean);
- Var
- V : Variant;
- I : smallint;
- begin
- Write('smallint assignment : ',B,' -> ');
- V:=B;
- I:=V;
- Writeln(I);
- end;
- Procedure TestShortInt(B : Boolean);
- Var
- V : Variant;
- I : ShortInt;
- begin
- Write('ShortInt assignment : ',B,' -> ');
- V:=B;
- I:=V;
- Writeln(I);
- end;
- Procedure TestCardinal(B : Boolean);
- Var
- V : Variant;
- I : Cardinal;
- begin
- Write('Cardinal assignment : ',B,' -> ');
- V:=B;
- I:=V;
- Writeln(I);
- end;
- Procedure TestWord(B : Boolean);
- Var
- V : Variant;
- I : Word;
- begin
- Write('Word assignment : ',B,' -> ');
- V:=B;
- I:=V;
- Writeln(I);
- end;
- Procedure TestByte(B : Boolean);
- Var
- V : Variant;
- I : Byte;
- begin
- Write('Byte assignment : ',B,' -> ');
- V:=B;
- I:=V;
- Writeln(I);
- end;
- Procedure TestInt64(B : Boolean);
- Var
- V : Variant;
- I : Int64;
- begin
- Write('Int64 assignment : ',B,' -> ');
- V:=B;
- I:=V;
- Writeln(I);
- end;
- Procedure TestQWord(B : Boolean);
- Var
- V : Variant;
- I : QWord;
- begin
- Write('QWord assignment : ',B,' -> ');
- V:=B;
- I:=V;
- Writeln(I);
- end;
- begin
- TestLongint(True);
- TestSmallInt(True);
- TestShortInt(True);
- TestCardinal(True);
- TestWord(True);
- TestByte(True);
- TestInt64(True);
- TestQWord(True);
- TestLongint(False);
- TestSmallInt(False);
- TestShortInt(False);
- TestCardinal(False);
- TestWord(False);
- TestByte(False);
- TestInt64(False);
- TestQWord(False);
- end.
|