diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2016-01-15 04:59:15 +0200 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2016-01-15 04:59:15 +0200 |
commit | b829b49b0c0db89d86ed9f73caf224d78f384f9b (patch) | |
tree | b1c4d11c74c5a9a6f2e940e08f605a8461a288dc /doc/gawktexi.in | |
parent | 025970d8638911457947f32a77997a84def214c5 (diff) | |
parent | f8445dd6243fd158794d6d26c0373b5cdf45f18a (diff) | |
download | egawk-b829b49b0c0db89d86ed9f73caf224d78f384f9b.tar.gz egawk-b829b49b0c0db89d86ed9f73caf224d78f384f9b.tar.bz2 egawk-b829b49b0c0db89d86ed9f73caf224d78f384f9b.zip |
Merge branch 'master' into feature/cmake
Diffstat (limited to 'doc/gawktexi.in')
-rw-r--r-- | doc/gawktexi.in | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/doc/gawktexi.in b/doc/gawktexi.in index 699079f3..dde24353 100644 --- a/doc/gawktexi.in +++ b/doc/gawktexi.in @@ -26660,10 +26660,9 @@ is true because locale-based comparison occurs only when in POSIX-compatibility mode, and because @code{asort()} and @code{asorti()} are @command{gawk} extensions, they are not available in that case.} -The following example demonstrates the use of a comparison function -with @code{asort()}. The comparison function, -@code{case_fold_compare()}, does a string comparison ignoring case -(by mapping both values to lowercase). +The following example demonstrates the use of a comparison function with +@code{asort()}. The comparison function, @code{case_fold_compare()}, maps +both values to lowercase in order to compare them ignoring case. @example # case_fold_compare --- compare as strings, ignoring case @@ -26694,9 +26693,10 @@ BEGIN @{ asort(data, result, "case_fold_compare") - for (i = 1; i <= 52; i++) @{ + j = length(result) + for (i = 1; i <= j; i++) @{ printf("%s", result[i]) - if (i % 26 == 0) + if (i % (j/2) == 0) printf("\n") else printf(" ") |