Link to home
Start Free TrialLog in
Avatar of liyuncheng
liyuncheng

asked on

How to change an Variant to Int64 or vice versa

Tell me please! How to change a Variant to Int64 or vice versa
Avatar of xiaomin8184
xiaomin8184

change??
if you mean convert:
var
  a:variant;
  i:integer;
  b:int64;
begin
  a:=123;
  i:=a;
  b:=i;
end;
Avatar of liyuncheng

ASKER

>>xiaomin8184

if a int64 is larger than max_int, your code above may result in data loss!
ASKER CERTIFIED SOLUTION
Avatar of geobul
geobul

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
sorry,my mistake