If you are asking if a local variable can be passed to a function, yes it can.
Google pass by reference c++ arduino