Hello,
I have 2 32 bits ints (hiword/loword) and i want to obtain a 64 bits int value : how can i do that ?
			
			
			
				Use a union - fill HI and LO, then read QUAD:
type LARGEINT
int64 quad[0]
int lo
uint hi
endtype
Or with multipliation (may be slower): int64=lo+hi*4294967296q.
With pointer:
int64 value
pointer p = &value
*<int>p[0] = lo
*<uint>p[1] = hi
With a subroutine:
some_sub(lo, hi)
sub some_sub(int lo, uint hi)
   pointer p = &lo
   int64 v = *<int64>p
			
			
			
				or just simple math will do it:
int hi=1
int lo=2
int64 i64 = int(hi * 2^32) | lo
print hex$(i64)
			
			
				Another way using shifts:
int hi=1
int lo=2
int64 i64 = hi
i64 = i64<<16<<16|lo
print hex$(i64)
			
			
				Thanx for responses.
Thats help me for my app...
			
			
			
				A cleaner way using shifts:
int hi=1
int lo=2
int64 i64
i64 = (hi+0q)<<16<<16|lo
print hex$(i64)
Which could be made into a very simple function:
sub makelong(int hi,int lo),int64
return (hi+0q)<<16<<16|lo
endsubf