How do we call a sub? in libreoffice basic

If we have a sub:

sub a
v= x+c

end sub

how can we call a value we get in there, if we need it for sth?
/f.e. I need that v for some other computings…
/or does it have to be a function, f,e, and not a sub?
Many thanks!!!

To return values from the function assign it to variable named after the sub itself:

sub mysum a, b
  mysum = a + b
end sub

sum = mysum(4,5)
' Alerts 9

@karolus, thanks for correcting.