typeset will create a local variable (which does not "flow"). This is useful in functions, but I also saw that it is used at the top level of the shell script.
a=0 function x { typeset a=1 } x echo $a function y { a=2 } y echo $a
will print
0 2
You can also use typeset to create arrays and integers.
[EDIT] The function keyword has been added because it requires some shells. Remove it if it offends your shell, but it should work with most versions.
source share