how to call a value from another function?

for exmple i have test()
and i wanna call from it a value 'slot' for example is it possible?