currentype varname;
Will returnĀ the current type of the variable.
var i: Int; var q:currentype i;
Will declare q to be an integer the same type as i.