Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
15
Task/Variables/AWK/variables-3.awk
Normal file
15
Task/Variables/AWK/variables-3.awk
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
function foo(s, k) {
|
||||
# s is an argument passed from caller
|
||||
# k is a dummy not passed by caller, but because it is
|
||||
# in the argument list, it will have a scope local to the function
|
||||
k = length(s)
|
||||
print "'" s "' contains", k, "characters"
|
||||
}
|
||||
BEGIN {
|
||||
k = 42
|
||||
s = "Test"
|
||||
foo("Demo")
|
||||
print "k is still", k
|
||||
foo(s,k)
|
||||
print "k still is", k
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue