Just another update
This commit is contained in:
parent
a25938f123
commit
00a190b0a6
6591 changed files with 94363 additions and 23227 deletions
|
|
@ -1,7 +1,15 @@
|
|||
function foo(j k) {
|
||||
# j 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(j)
|
||||
print j "contains " k " characters"
|
||||
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