testv6.pp 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. { %VERSION=1.1 }
  2. program testv6;
  3. uses variants,varutils;
  4. Procedure TestLongInt(B : Boolean);
  5. Var
  6. V : Variant;
  7. I : LongInt;
  8. begin
  9. Write('Longint assignment : ',B,' -> ');
  10. V:=B;
  11. I:=V;
  12. Writeln(I);
  13. end;
  14. Procedure Testsmallint(B : Boolean);
  15. Var
  16. V : Variant;
  17. I : smallint;
  18. begin
  19. Write('smallint assignment : ',B,' -> ');
  20. V:=B;
  21. I:=V;
  22. Writeln(I);
  23. end;
  24. Procedure TestShortInt(B : Boolean);
  25. Var
  26. V : Variant;
  27. I : ShortInt;
  28. begin
  29. Write('ShortInt assignment : ',B,' -> ');
  30. V:=B;
  31. I:=V;
  32. Writeln(I);
  33. end;
  34. Procedure TestCardinal(B : Boolean);
  35. Var
  36. V : Variant;
  37. I : Cardinal;
  38. begin
  39. Write('Cardinal assignment : ',B,' -> ');
  40. V:=B;
  41. I:=V;
  42. Writeln(I);
  43. end;
  44. Procedure TestWord(B : Boolean);
  45. Var
  46. V : Variant;
  47. I : Word;
  48. begin
  49. Write('Word assignment : ',B,' -> ');
  50. V:=B;
  51. I:=V;
  52. Writeln(I);
  53. end;
  54. Procedure TestByte(B : Boolean);
  55. Var
  56. V : Variant;
  57. I : Byte;
  58. begin
  59. Write('Byte assignment : ',B,' -> ');
  60. V:=B;
  61. I:=V;
  62. Writeln(I);
  63. end;
  64. Procedure TestInt64(B : Boolean);
  65. Var
  66. V : Variant;
  67. I : Int64;
  68. begin
  69. Write('Int64 assignment : ',B,' -> ');
  70. V:=B;
  71. I:=V;
  72. Writeln(I);
  73. end;
  74. Procedure TestQWord(B : Boolean);
  75. Var
  76. V : Variant;
  77. I : QWord;
  78. begin
  79. Write('QWord assignment : ',B,' -> ');
  80. V:=B;
  81. I:=V;
  82. Writeln(I);
  83. end;
  84. begin
  85. TestLongint(True);
  86. TestSmallInt(True);
  87. TestShortInt(True);
  88. TestCardinal(True);
  89. TestWord(True);
  90. TestByte(True);
  91. TestInt64(True);
  92. TestQWord(True);
  93. TestLongint(False);
  94. TestSmallInt(False);
  95. TestShortInt(False);
  96. TestCardinal(False);
  97. TestWord(False);
  98. TestByte(False);
  99. TestInt64(False);
  100. TestQWord(False);
  101. end.