I don't understand what you are trying to do.
If you know your data is going to be long or integer, then I guess you should
declare it as long (since if you declare it as integer and it is outside range
-32,768 to 32,767 then you will get an error message).
Now, if you want to pass this data as a parameter to a function then, pass it
as it is
You stated that your function accepts data of type long...
long requires 4 bytes of memory and variant 16 bytes....