diff options
| author | Pratik Karki <predatoramigo@gmail.com> | 2017-10-14 18:54:15 +0545 | 
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-10-14 18:54:15 +0545 | 
| commit | 8612e00b9f26feafcb531609f0ab0ec61ea06dd0 (patch) | |
| tree | cb0e2fe3cddfea5a6507639a05f9fde78d2c043e /awk.html.markdown | |
| parent | ec62935d72a618a11ea1cd5e194b515b95d34fbe (diff) | |
| parent | 894ddf5ec33eb2fdaf739850114f77fd9a0679dc (diff) | |
Merge pull request #2909 from prertik/master
[awk/en] fix for Local Variable in "arithmetic_functions"
Diffstat (limited to 'awk.html.markdown')
| -rw-r--r-- | awk.html.markdown | 4 | 
1 files changed, 2 insertions, 2 deletions
| diff --git a/awk.html.markdown b/awk.html.markdown index 0e27528d..e3ea6318 100644 --- a/awk.html.markdown +++ b/awk.html.markdown @@ -38,7 +38,7 @@ BEGIN {      a = count + 1      b = count - 1      c = count * 1 -    d = count / 1 +    d = count / 1 # integer division      e = count % 1 # modulus      f = count ^ 1 # exponentiation @@ -143,7 +143,7 @@ BEGIN {  }  # Here's how you define a function -function arithmetic_functions(a, b, c,     localvar) { +function arithmetic_functions(a, b, c,     d) {      # Probably the most annoying part of AWK is that there are no local      # variables. Everything is global. For short scripts, this is fine, even | 
