How to return value in shell script

im using bourne shell

In file scriptA i add a new function, test_return()

test_return()
{
a=1
return $a
}

when i try execute ,

a='/''/scriptA test_return
echo $a

its give me error..
scriptA: cannot return when not in function

ist any solution for this problem..
How i can assign the return value into a variable.

return value is stored in $?
#!/bin/sh

test_return()
{
a=10
return $a
}

test_return
echo $?