Hi Peter,
You have to pass the typecode to the function as well as the variable. My first example demonstrates this.
You can use a macro to do this for you, so you only have to specify the variable once when calling.
def FlexiFunc FlexifuncA %1,typecodeof %1
FlexiFunc v
expands to:
FlexiFuncA v, typecodeof v
Charles