Szukaj…


Nie ma takich rzeczy jak przestrzenie nazw

myfunc(){
    echo "I will never be executed."
}
another_func(){
    # this "redeclare" overwrites original function
    myfunc(){ echo "I am the one and only"; }
}
# myfunc will print "I will never be executed"
myfunc
# but if we call another_func first
another_func
# it gets overwritten and
myfunc
# no prints "I am the one and only"

Najnowsza deklaracja wygrywa. Nie ma takich rzeczy jak przestrzenie nazw! Funkcje mogą jednak zawierać inne funkcje.



Modified text is an extract of the original Stack Overflow Documentation
Licencjonowany na podstawie CC BY-SA 3.0
Nie związany z Stack Overflow