The main difference between refand outis intent. When used ref, it is expected that the value to be passed will be used by the function. And the function may or may not install it. You can even have const refit if you want, which would mean that the variable that was passed in will not be copied, but it also cannot be changed.
const out, , , out , . out - , , . ref , ref , , , out , .
, out , , . out , , . out , , , , , , , .
, out , , , , , out ( ). , out, (, "" ).