6.3.1 Single location, syntactic scoping

The handler functions can access the variables in the uplevel function frames.

function one   () { R_one=$X;   }
function two   () { R_two=$Y;   }
function three () { R_three=$Z; }

{
  local R_one R_two R_three
  local X=1 Y=2 Z=3

  mbfl_location_enter
  {
    mbfl_location_handler one
    mbfl_location_handler two
    mbfl_location_handler three
  }
  mbfl_location_leave

  $R_one          ⇒ 1
  $R_two          ⇒ 2
  $R_three        ⇒ 3
}

This document describes version 3.0.0-devel.9 of Marcos Bash Functions Library.