You can dynamically allocate some space and use it to store a new variable. Depending on what you mean by “scope of the current function” it may not be what you want.
But here is how it looks like, when you have function func() that takes a pointer to an output parameter:
set $foo = malloc(sizeof(struct funcOutStruct))
call func($foo)
p *$foo
call (void) free($foo)