BAEL-3451: Fixed formatting
This commit is contained in:
parent
eb90d115f3
commit
135e9359bd
@ -64,14 +64,12 @@ function variable_scope(){
|
|||||||
|
|
||||||
# Subsection 3.2
|
# Subsection 3.2
|
||||||
subshell_sum=0
|
subshell_sum=0
|
||||||
function simple_subshell_sum()
|
function simple_subshell_sum() (
|
||||||
(
|
|
||||||
subshell_sum=$(($1+$2))
|
subshell_sum=$(($1+$2))
|
||||||
echo "Value of sum in function with global variables: [$subshell_sum]"
|
echo "Value of sum in function with global variables: [$subshell_sum]"
|
||||||
)
|
)
|
||||||
|
|
||||||
function simple_subshell_ref_sum()
|
function simple_subshell_ref_sum() (
|
||||||
(
|
|
||||||
declare -n sum_ref=$3
|
declare -n sum_ref=$3
|
||||||
sum_ref=$(($1+$2))
|
sum_ref=$(($1+$2))
|
||||||
echo "Value of sum in function with ref arguments: [$sum_ref]"
|
echo "Value of sum in function with ref arguments: [$sum_ref]"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user