diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2015-02-22 20:49:40 +0200 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2015-02-22 20:49:40 +0200 |
commit | 8d95c378d502d561a6be416a67b19b247a53f48a (patch) | |
tree | 97cb8843a5c7082f75a2f03af7989a87d514bf9a | |
parent | 4c4c0d3820bfc6ac3dce47a51e26ee2a9b593466 (diff) | |
download | egawk-8d95c378d502d561a6be416a67b19b247a53f48a.tar.gz egawk-8d95c378d502d561a6be416a67b19b247a53f48a.tar.bz2 egawk-8d95c378d502d561a6be416a67b19b247a53f48a.zip |
Doc: change div to divisor in some examples.
-rw-r--r-- | doc/ChangeLog | 12 | ||||
-rw-r--r-- | doc/gawk.info | 738 | ||||
-rw-r--r-- | doc/gawk.texi | 16 | ||||
-rw-r--r-- | doc/gawktexi.in | 16 |
4 files changed, 394 insertions, 388 deletions
diff --git a/doc/ChangeLog b/doc/ChangeLog index 619ceb06..9e1da9ae 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,9 @@ +2015-02-22 Arnold D. Robbins <arnold@skeeve.com> + + * gawktexi.in: Change 'div' to 'divisor' in some examples. + This future-proofs against a new function in master. + Thanks to Antonio Giovanni Colombo for the report. + 2015-02-20 Arnold D. Robbins <arnold@skeeve.com> * gawktexi.in: More O'Reilly fixes. I think it's done! @@ -73,7 +79,7 @@ 2015-01-23 Arnold D. Robbins <arnold@skeeve.com> * gawktexi.in: O'Reilly fixes. - (Glossary): Many new entries from Antonio Giovanni Columbo. + (Glossary): Many new entries from Antonio Giovanni Colombo. 2015-01-21 Arnold D. Robbins <arnold@skeeve.com> @@ -97,7 +103,7 @@ * gawktexi.in: Add one more paragraph to new foreword. * gawktexi.in: Fix exponentiation in TeX mode. Thanks to - Marco Curreli by way of Antonio Giovanni Columbo. + Marco Curreli by way of Antonio Giovanni Colombo. * texinfo.tex: Updated. @@ -156,7 +162,7 @@ 2014-10-17 Arnold D. Robbins <arnold@skeeve.com> * gawktexi.in: Fix date in docbook attribution for new Foreword; - thanks to Antonio Columbo for the catch. Update latest version + thanks to Antonio Colombo for the catch. Update latest version of gettext. 2014-10-15 Arnold D. Robbins <arnold@skeeve.com> diff --git a/doc/gawk.info b/doc/gawk.info index 50627888..bf85081c 100644 --- a/doc/gawk.info +++ b/doc/gawk.info @@ -9820,12 +9820,12 @@ divisor of any integer, and also identifies prime numbers: # find smallest divisor of num { num = $1 - for (div = 2; div * div <= num; div++) { - if (num % div == 0) + for (divisor = 2; divisor * divisor <= num; divisor++) { + if (num % divisor == 0) break } - if (num % div == 0) - printf "Smallest divisor of %d is %d\n", num, div + if (num % divisor == 0) + printf "Smallest divisor of %d is %d\n", num, divisor else printf "%d is prime\n", num } @@ -9843,12 +9843,12 @@ Statement::.) # find smallest divisor of num { num = $1 - for (div = 2; ; div++) { - if (num % div == 0) { - printf "Smallest divisor of %d is %d\n", num, div + for (divisor = 2; ; divisor++) { + if (num % divisor == 0) { + printf "Smallest divisor of %d is %d\n", num, divisor break } - if (div * div > num) { + if (divisor * divisor > num) { printf "%d is prime\n", num break } @@ -34681,366 +34681,366 @@ Node: Do Statement413824 Node: For Statement414972 Node: Switch Statement418130 Node: Break Statement420512 -Node: Continue Statement422553 -Node: Next Statement424380 -Node: Nextfile Statement426761 -Node: Exit Statement429389 -Node: Built-in Variables431800 -Node: User-modified432933 -Ref: User-modified-Footnote-1440567 -Node: Auto-set440629 -Ref: Auto-set-Footnote-1453681 -Ref: Auto-set-Footnote-2453886 -Node: ARGC and ARGV453942 -Node: Pattern Action Summary458160 -Node: Arrays460593 -Node: Array Basics461922 -Node: Array Intro462766 -Ref: figure-array-elements464700 -Ref: Array Intro-Footnote-1467320 -Node: Reference to Elements467448 -Node: Assigning Elements469910 -Node: Array Example470401 -Node: Scanning an Array472160 -Node: Controlling Scanning475180 -Ref: Controlling Scanning-Footnote-1480574 -Node: Numeric Array Subscripts480890 -Node: Uninitialized Subscripts483075 -Node: Delete484692 -Ref: Delete-Footnote-1487441 -Node: Multidimensional487498 -Node: Multiscanning490595 -Node: Arrays of Arrays492184 -Node: Arrays Summary496938 -Node: Functions499029 -Node: Built-in500068 -Node: Calling Built-in501146 -Node: Numeric Functions503141 -Ref: Numeric Functions-Footnote-1507157 -Ref: Numeric Functions-Footnote-2507514 -Ref: Numeric Functions-Footnote-3507562 -Node: String Functions507834 -Ref: String Functions-Footnote-1531335 -Ref: String Functions-Footnote-2531464 -Ref: String Functions-Footnote-3531712 -Node: Gory Details531799 -Ref: table-sub-escapes533580 -Ref: table-sub-proposed535095 -Ref: table-posix-sub536457 -Ref: table-gensub-escapes537994 -Ref: Gory Details-Footnote-1538827 -Node: I/O Functions538978 -Ref: I/O Functions-Footnote-1546214 -Node: Time Functions546361 -Ref: Time Functions-Footnote-1556870 -Ref: Time Functions-Footnote-2556938 -Ref: Time Functions-Footnote-3557096 -Ref: Time Functions-Footnote-4557207 -Ref: Time Functions-Footnote-5557319 -Ref: Time Functions-Footnote-6557546 -Node: Bitwise Functions557812 -Ref: table-bitwise-ops558374 -Ref: Bitwise Functions-Footnote-1562702 -Node: Type Functions562874 -Node: I18N Functions564026 -Node: User-defined565673 -Node: Definition Syntax566478 -Ref: Definition Syntax-Footnote-1572137 -Node: Function Example572208 -Ref: Function Example-Footnote-1575129 -Node: Function Caveats575151 -Node: Calling A Function575669 -Node: Variable Scope576627 -Node: Pass By Value/Reference579620 -Node: Return Statement583117 -Node: Dynamic Typing586096 -Node: Indirect Calls587025 -Ref: Indirect Calls-Footnote-1596890 -Node: Functions Summary597018 -Node: Library Functions599720 -Ref: Library Functions-Footnote-1603328 -Ref: Library Functions-Footnote-2603471 -Node: Library Names603642 -Ref: Library Names-Footnote-1607100 -Ref: Library Names-Footnote-2607323 -Node: General Functions607409 -Node: Strtonum Function608512 -Node: Assert Function611534 -Node: Round Function614858 -Node: Cliff Random Function616399 -Node: Ordinal Functions617415 -Ref: Ordinal Functions-Footnote-1620478 -Ref: Ordinal Functions-Footnote-2620730 -Node: Join Function620941 -Ref: Join Function-Footnote-1622711 -Node: Getlocaltime Function622911 -Node: Readfile Function626655 -Node: Shell Quoting628627 -Node: Data File Management630028 -Node: Filetrans Function630660 -Node: Rewind Function634756 -Node: File Checking636142 -Ref: File Checking-Footnote-1637475 -Node: Empty Files637676 -Node: Ignoring Assigns639655 -Node: Getopt Function641205 -Ref: Getopt Function-Footnote-1652669 -Node: Passwd Functions652869 -Ref: Passwd Functions-Footnote-1661709 -Node: Group Functions661797 -Ref: Group Functions-Footnote-1669694 -Node: Walking Arrays669899 -Node: Library Functions Summary672905 -Node: Library Exercises674307 -Node: Sample Programs675587 -Node: Running Examples676357 -Node: Clones677085 -Node: Cut Program678309 -Node: Egrep Program688029 -Ref: Egrep Program-Footnote-1695532 -Node: Id Program695642 -Node: Split Program699318 -Ref: Split Program-Footnote-1702772 -Node: Tee Program702900 -Node: Uniq Program705689 -Node: Wc Program713108 -Ref: Wc Program-Footnote-1717358 -Node: Miscellaneous Programs717452 -Node: Dupword Program718665 -Node: Alarm Program720696 -Node: Translate Program725501 -Ref: Translate Program-Footnote-1730064 -Node: Labels Program730334 -Ref: Labels Program-Footnote-1733685 -Node: Word Sorting733769 -Node: History Sorting737839 -Node: Extract Program739674 -Node: Simple Sed747198 -Node: Igawk Program750268 -Ref: Igawk Program-Footnote-1764594 -Ref: Igawk Program-Footnote-2764795 -Ref: Igawk Program-Footnote-3764917 -Node: Anagram Program765032 -Node: Signature Program768093 -Node: Programs Summary769340 -Node: Programs Exercises770561 -Ref: Programs Exercises-Footnote-1774692 -Node: Advanced Features774783 -Node: Nondecimal Data776765 -Node: Array Sorting778355 -Node: Controlling Array Traversal779055 -Ref: Controlling Array Traversal-Footnote-1787421 -Node: Array Sorting Functions787539 -Ref: Array Sorting Functions-Footnote-1791425 -Node: Two-way I/O791621 -Ref: Two-way I/O-Footnote-1796566 -Ref: Two-way I/O-Footnote-2796752 -Node: TCP/IP Networking796834 -Node: Profiling799706 -Node: Advanced Features Summary807247 -Node: Internationalization809180 -Node: I18N and L10N810660 -Node: Explaining gettext811346 -Ref: Explaining gettext-Footnote-1816371 -Ref: Explaining gettext-Footnote-2816555 -Node: Programmer i18n816720 -Ref: Programmer i18n-Footnote-1821596 -Node: Translator i18n821645 -Node: String Extraction822439 -Ref: String Extraction-Footnote-1823570 -Node: Printf Ordering823656 -Ref: Printf Ordering-Footnote-1826442 -Node: I18N Portability826506 -Ref: I18N Portability-Footnote-1828962 -Node: I18N Example829025 -Ref: I18N Example-Footnote-1831828 -Node: Gawk I18N831900 -Node: I18N Summary832544 -Node: Debugger833884 -Node: Debugging834906 -Node: Debugging Concepts835347 -Node: Debugging Terms837157 -Node: Awk Debugging839729 -Node: Sample Debugging Session840635 -Node: Debugger Invocation841169 -Node: Finding The Bug842554 -Node: List of Debugger Commands849033 -Node: Breakpoint Control850365 -Node: Debugger Execution Control854042 -Node: Viewing And Changing Data857401 -Node: Execution Stack860777 -Node: Debugger Info862412 -Node: Miscellaneous Debugger Commands866457 -Node: Readline Support871458 -Node: Limitations872352 -Node: Debugging Summary874467 -Node: Arbitrary Precision Arithmetic875641 -Node: Computer Arithmetic877057 -Ref: table-numeric-ranges880656 -Ref: Computer Arithmetic-Footnote-1881180 -Node: Math Definitions881237 -Ref: table-ieee-formats884532 -Ref: Math Definitions-Footnote-1885136 -Node: MPFR features885241 -Node: FP Math Caution886912 -Ref: FP Math Caution-Footnote-1887962 -Node: Inexactness of computations888331 -Node: Inexact representation889290 -Node: Comparing FP Values890648 -Node: Errors accumulate891730 -Node: Getting Accuracy893162 -Node: Try To Round895866 -Node: Setting precision896765 -Ref: table-predefined-precision-strings897449 -Node: Setting the rounding mode899278 -Ref: table-gawk-rounding-modes899642 -Ref: Setting the rounding mode-Footnote-1903094 -Node: Arbitrary Precision Integers903273 -Ref: Arbitrary Precision Integers-Footnote-1906257 -Node: POSIX Floating Point Problems906406 -Ref: POSIX Floating Point Problems-Footnote-1910285 -Node: Floating point summary910323 -Node: Dynamic Extensions912510 -Node: Extension Intro914062 -Node: Plugin License915327 -Node: Extension Mechanism Outline916124 -Ref: figure-load-extension916552 -Ref: figure-register-new-function918032 -Ref: figure-call-new-function919036 -Node: Extension API Description921023 -Node: Extension API Functions Introduction922473 -Node: General Data Types927294 -Ref: General Data Types-Footnote-1933194 -Node: Memory Allocation Functions933493 -Ref: Memory Allocation Functions-Footnote-1936332 -Node: Constructor Functions936431 -Node: Registration Functions938170 -Node: Extension Functions938855 -Node: Exit Callback Functions941152 -Node: Extension Version String942400 -Node: Input Parsers943063 -Node: Output Wrappers952938 -Node: Two-way processors957451 -Node: Printing Messages959714 -Ref: Printing Messages-Footnote-1960790 -Node: Updating `ERRNO'960942 -Node: Requesting Values961682 -Ref: table-value-types-returned962409 -Node: Accessing Parameters963366 -Node: Symbol Table Access964600 -Node: Symbol table by name965114 -Node: Symbol table by cookie967134 -Ref: Symbol table by cookie-Footnote-1971279 -Node: Cached values971342 -Ref: Cached values-Footnote-1974838 -Node: Array Manipulation974929 -Ref: Array Manipulation-Footnote-1976027 -Node: Array Data Types976064 -Ref: Array Data Types-Footnote-1978719 -Node: Array Functions978811 -Node: Flattening Arrays982670 -Node: Creating Arrays989572 -Node: Extension API Variables994343 -Node: Extension Versioning994979 -Node: Extension API Informational Variables996870 -Node: Extension API Boilerplate997935 -Node: Finding Extensions1001744 -Node: Extension Example1002304 -Node: Internal File Description1003076 -Node: Internal File Ops1007143 -Ref: Internal File Ops-Footnote-11018894 -Node: Using Internal File Ops1019034 -Ref: Using Internal File Ops-Footnote-11021417 -Node: Extension Samples1021690 -Node: Extension Sample File Functions1023218 -Node: Extension Sample Fnmatch1030899 -Node: Extension Sample Fork1032387 -Node: Extension Sample Inplace1033602 -Node: Extension Sample Ord1035278 -Node: Extension Sample Readdir1036114 -Ref: table-readdir-file-types1036991 -Node: Extension Sample Revout1037802 -Node: Extension Sample Rev2way1038391 -Node: Extension Sample Read write array1039131 -Node: Extension Sample Readfile1041071 -Node: Extension Sample Time1042166 -Node: Extension Sample API Tests1043514 -Node: gawkextlib1044005 -Node: Extension summary1046683 -Node: Extension Exercises1050372 -Node: Language History1051094 -Node: V7/SVR3.11052750 -Node: SVR41054903 -Node: POSIX1056337 -Node: BTL1057718 -Node: POSIX/GNU1058449 -Node: Feature History1063970 -Node: Common Extensions1077068 -Node: Ranges and Locales1078440 -Ref: Ranges and Locales-Footnote-11083059 -Ref: Ranges and Locales-Footnote-21083086 -Ref: Ranges and Locales-Footnote-31083321 -Node: Contributors1083542 -Node: History summary1089082 -Node: Installation1090461 -Node: Gawk Distribution1091407 -Node: Getting1091891 -Node: Extracting1092714 -Node: Distribution contents1094351 -Node: Unix Installation1100105 -Node: Quick Installation1100722 -Node: Additional Configuration Options1103146 -Node: Configuration Philosophy1104949 -Node: Non-Unix Installation1107318 -Node: PC Installation1107776 -Node: PC Binary Installation1109096 -Node: PC Compiling1110944 -Ref: PC Compiling-Footnote-11113965 -Node: PC Testing1114074 -Node: PC Using1115250 -Node: Cygwin1119365 -Node: MSYS1120135 -Node: VMS Installation1120636 -Node: VMS Compilation1121428 -Ref: VMS Compilation-Footnote-11122657 -Node: VMS Dynamic Extensions1122715 -Node: VMS Installation Details1124399 -Node: VMS Running1126650 -Node: VMS GNV1129490 -Node: VMS Old Gawk1130225 -Node: Bugs1130695 -Node: Other Versions1134584 -Node: Installation summary1141018 -Node: Notes1142077 -Node: Compatibility Mode1142942 -Node: Additions1143724 -Node: Accessing The Source1144649 -Node: Adding Code1146084 -Node: New Ports1152241 -Node: Derived Files1156723 -Ref: Derived Files-Footnote-11162198 -Ref: Derived Files-Footnote-21162232 -Ref: Derived Files-Footnote-31162828 -Node: Future Extensions1162942 -Node: Implementation Limitations1163548 -Node: Extension Design1164796 -Node: Old Extension Problems1165950 -Ref: Old Extension Problems-Footnote-11167467 -Node: Extension New Mechanism Goals1167524 -Ref: Extension New Mechanism Goals-Footnote-11170884 -Node: Extension Other Design Decisions1171073 -Node: Extension Future Growth1173181 -Node: Old Extension Mechanism1174017 -Node: Notes summary1175779 -Node: Basic Concepts1176965 -Node: Basic High Level1177646 -Ref: figure-general-flow1177918 -Ref: figure-process-flow1178517 -Ref: Basic High Level-Footnote-11181746 -Node: Basic Data Typing1181931 -Node: Glossary1185259 -Node: Copying1217188 -Node: GNU Free Documentation License1254744 -Node: Index1279880 +Node: Continue Statement422605 +Node: Next Statement424432 +Node: Nextfile Statement426813 +Node: Exit Statement429441 +Node: Built-in Variables431852 +Node: User-modified432985 +Ref: User-modified-Footnote-1440619 +Node: Auto-set440681 +Ref: Auto-set-Footnote-1453733 +Ref: Auto-set-Footnote-2453938 +Node: ARGC and ARGV453994 +Node: Pattern Action Summary458212 +Node: Arrays460645 +Node: Array Basics461974 +Node: Array Intro462818 +Ref: figure-array-elements464752 +Ref: Array Intro-Footnote-1467372 +Node: Reference to Elements467500 +Node: Assigning Elements469962 +Node: Array Example470453 +Node: Scanning an Array472212 +Node: Controlling Scanning475232 +Ref: Controlling Scanning-Footnote-1480626 +Node: Numeric Array Subscripts480942 +Node: Uninitialized Subscripts483127 +Node: Delete484744 +Ref: Delete-Footnote-1487493 +Node: Multidimensional487550 +Node: Multiscanning490647 +Node: Arrays of Arrays492236 +Node: Arrays Summary496990 +Node: Functions499081 +Node: Built-in500120 +Node: Calling Built-in501198 +Node: Numeric Functions503193 +Ref: Numeric Functions-Footnote-1507209 +Ref: Numeric Functions-Footnote-2507566 +Ref: Numeric Functions-Footnote-3507614 +Node: String Functions507886 +Ref: String Functions-Footnote-1531387 +Ref: String Functions-Footnote-2531516 +Ref: String Functions-Footnote-3531764 +Node: Gory Details531851 +Ref: table-sub-escapes533632 +Ref: table-sub-proposed535147 +Ref: table-posix-sub536509 +Ref: table-gensub-escapes538046 +Ref: Gory Details-Footnote-1538879 +Node: I/O Functions539030 +Ref: I/O Functions-Footnote-1546266 +Node: Time Functions546413 +Ref: Time Functions-Footnote-1556922 +Ref: Time Functions-Footnote-2556990 +Ref: Time Functions-Footnote-3557148 +Ref: Time Functions-Footnote-4557259 +Ref: Time Functions-Footnote-5557371 +Ref: Time Functions-Footnote-6557598 +Node: Bitwise Functions557864 +Ref: table-bitwise-ops558426 +Ref: Bitwise Functions-Footnote-1562754 +Node: Type Functions562926 +Node: I18N Functions564078 +Node: User-defined565725 +Node: Definition Syntax566530 +Ref: Definition Syntax-Footnote-1572189 +Node: Function Example572260 +Ref: Function Example-Footnote-1575181 +Node: Function Caveats575203 +Node: Calling A Function575721 +Node: Variable Scope576679 +Node: Pass By Value/Reference579672 +Node: Return Statement583169 +Node: Dynamic Typing586148 +Node: Indirect Calls587077 +Ref: Indirect Calls-Footnote-1596942 +Node: Functions Summary597070 +Node: Library Functions599772 +Ref: Library Functions-Footnote-1603380 +Ref: Library Functions-Footnote-2603523 +Node: Library Names603694 +Ref: Library Names-Footnote-1607152 +Ref: Library Names-Footnote-2607375 +Node: General Functions607461 +Node: Strtonum Function608564 +Node: Assert Function611586 +Node: Round Function614910 +Node: Cliff Random Function616451 +Node: Ordinal Functions617467 +Ref: Ordinal Functions-Footnote-1620530 +Ref: Ordinal Functions-Footnote-2620782 +Node: Join Function620993 +Ref: Join Function-Footnote-1622763 +Node: Getlocaltime Function622963 +Node: Readfile Function626707 +Node: Shell Quoting628679 +Node: Data File Management630080 +Node: Filetrans Function630712 +Node: Rewind Function634808 +Node: File Checking636194 +Ref: File Checking-Footnote-1637527 +Node: Empty Files637728 +Node: Ignoring Assigns639707 +Node: Getopt Function641257 +Ref: Getopt Function-Footnote-1652721 +Node: Passwd Functions652921 +Ref: Passwd Functions-Footnote-1661761 +Node: Group Functions661849 +Ref: Group Functions-Footnote-1669746 +Node: Walking Arrays669951 +Node: Library Functions Summary672957 +Node: Library Exercises674359 +Node: Sample Programs675639 +Node: Running Examples676409 +Node: Clones677137 +Node: Cut Program678361 +Node: Egrep Program688081 +Ref: Egrep Program-Footnote-1695584 +Node: Id Program695694 +Node: Split Program699370 +Ref: Split Program-Footnote-1702824 +Node: Tee Program702952 +Node: Uniq Program705741 +Node: Wc Program713160 +Ref: Wc Program-Footnote-1717410 +Node: Miscellaneous Programs717504 +Node: Dupword Program718717 +Node: Alarm Program720748 +Node: Translate Program725553 +Ref: Translate Program-Footnote-1730116 +Node: Labels Program730386 +Ref: Labels Program-Footnote-1733737 +Node: Word Sorting733821 +Node: History Sorting737891 +Node: Extract Program739726 +Node: Simple Sed747250 +Node: Igawk Program750320 +Ref: Igawk Program-Footnote-1764646 +Ref: Igawk Program-Footnote-2764847 +Ref: Igawk Program-Footnote-3764969 +Node: Anagram Program765084 +Node: Signature Program768145 +Node: Programs Summary769392 +Node: Programs Exercises770613 +Ref: Programs Exercises-Footnote-1774744 +Node: Advanced Features774835 +Node: Nondecimal Data776817 +Node: Array Sorting778407 +Node: Controlling Array Traversal779107 +Ref: Controlling Array Traversal-Footnote-1787473 +Node: Array Sorting Functions787591 +Ref: Array Sorting Functions-Footnote-1791477 +Node: Two-way I/O791673 +Ref: Two-way I/O-Footnote-1796618 +Ref: Two-way I/O-Footnote-2796804 +Node: TCP/IP Networking796886 +Node: Profiling799758 +Node: Advanced Features Summary807299 +Node: Internationalization809232 +Node: I18N and L10N810712 +Node: Explaining gettext811398 +Ref: Explaining gettext-Footnote-1816423 +Ref: Explaining gettext-Footnote-2816607 +Node: Programmer i18n816772 +Ref: Programmer i18n-Footnote-1821648 +Node: Translator i18n821697 +Node: String Extraction822491 +Ref: String Extraction-Footnote-1823622 +Node: Printf Ordering823708 +Ref: Printf Ordering-Footnote-1826494 +Node: I18N Portability826558 +Ref: I18N Portability-Footnote-1829014 +Node: I18N Example829077 +Ref: I18N Example-Footnote-1831880 +Node: Gawk I18N831952 +Node: I18N Summary832596 +Node: Debugger833936 +Node: Debugging834958 +Node: Debugging Concepts835399 +Node: Debugging Terms837209 +Node: Awk Debugging839781 +Node: Sample Debugging Session840687 +Node: Debugger Invocation841221 +Node: Finding The Bug842606 +Node: List of Debugger Commands849085 +Node: Breakpoint Control850417 +Node: Debugger Execution Control854094 +Node: Viewing And Changing Data857453 +Node: Execution Stack860829 +Node: Debugger Info862464 +Node: Miscellaneous Debugger Commands866509 +Node: Readline Support871510 +Node: Limitations872404 +Node: Debugging Summary874519 +Node: Arbitrary Precision Arithmetic875693 +Node: Computer Arithmetic877109 +Ref: table-numeric-ranges880708 +Ref: Computer Arithmetic-Footnote-1881232 +Node: Math Definitions881289 +Ref: table-ieee-formats884584 +Ref: Math Definitions-Footnote-1885188 +Node: MPFR features885293 +Node: FP Math Caution886964 +Ref: FP Math Caution-Footnote-1888014 +Node: Inexactness of computations888383 +Node: Inexact representation889342 +Node: Comparing FP Values890700 +Node: Errors accumulate891782 +Node: Getting Accuracy893214 +Node: Try To Round895918 +Node: Setting precision896817 +Ref: table-predefined-precision-strings897501 +Node: Setting the rounding mode899330 +Ref: table-gawk-rounding-modes899694 +Ref: Setting the rounding mode-Footnote-1903146 +Node: Arbitrary Precision Integers903325 +Ref: Arbitrary Precision Integers-Footnote-1906309 +Node: POSIX Floating Point Problems906458 +Ref: POSIX Floating Point Problems-Footnote-1910337 +Node: Floating point summary910375 +Node: Dynamic Extensions912562 +Node: Extension Intro914114 +Node: Plugin License915379 +Node: Extension Mechanism Outline916176 +Ref: figure-load-extension916604 +Ref: figure-register-new-function918084 +Ref: figure-call-new-function919088 +Node: Extension API Description921075 +Node: Extension API Functions Introduction922525 +Node: General Data Types927346 +Ref: General Data Types-Footnote-1933246 +Node: Memory Allocation Functions933545 +Ref: Memory Allocation Functions-Footnote-1936384 +Node: Constructor Functions936483 +Node: Registration Functions938222 +Node: Extension Functions938907 +Node: Exit Callback Functions941204 +Node: Extension Version String942452 +Node: Input Parsers943115 +Node: Output Wrappers952990 +Node: Two-way processors957503 +Node: Printing Messages959766 +Ref: Printing Messages-Footnote-1960842 +Node: Updating `ERRNO'960994 +Node: Requesting Values961734 +Ref: table-value-types-returned962461 +Node: Accessing Parameters963418 +Node: Symbol Table Access964652 +Node: Symbol table by name965166 +Node: Symbol table by cookie967186 +Ref: Symbol table by cookie-Footnote-1971331 +Node: Cached values971394 +Ref: Cached values-Footnote-1974890 +Node: Array Manipulation974981 +Ref: Array Manipulation-Footnote-1976079 +Node: Array Data Types976116 +Ref: Array Data Types-Footnote-1978771 +Node: Array Functions978863 +Node: Flattening Arrays982722 +Node: Creating Arrays989624 +Node: Extension API Variables994395 +Node: Extension Versioning995031 +Node: Extension API Informational Variables996922 +Node: Extension API Boilerplate997987 +Node: Finding Extensions1001796 +Node: Extension Example1002356 +Node: Internal File Description1003128 +Node: Internal File Ops1007195 +Ref: Internal File Ops-Footnote-11018946 +Node: Using Internal File Ops1019086 +Ref: Using Internal File Ops-Footnote-11021469 +Node: Extension Samples1021742 +Node: Extension Sample File Functions1023270 +Node: Extension Sample Fnmatch1030951 +Node: Extension Sample Fork1032439 +Node: Extension Sample Inplace1033654 +Node: Extension Sample Ord1035330 +Node: Extension Sample Readdir1036166 +Ref: table-readdir-file-types1037043 +Node: Extension Sample Revout1037854 +Node: Extension Sample Rev2way1038443 +Node: Extension Sample Read write array1039183 +Node: Extension Sample Readfile1041123 +Node: Extension Sample Time1042218 +Node: Extension Sample API Tests1043566 +Node: gawkextlib1044057 +Node: Extension summary1046735 +Node: Extension Exercises1050424 +Node: Language History1051146 +Node: V7/SVR3.11052802 +Node: SVR41054955 +Node: POSIX1056389 +Node: BTL1057770 +Node: POSIX/GNU1058501 +Node: Feature History1064022 +Node: Common Extensions1077120 +Node: Ranges and Locales1078492 +Ref: Ranges and Locales-Footnote-11083111 +Ref: Ranges and Locales-Footnote-21083138 +Ref: Ranges and Locales-Footnote-31083373 +Node: Contributors1083594 +Node: History summary1089134 +Node: Installation1090513 +Node: Gawk Distribution1091459 +Node: Getting1091943 +Node: Extracting1092766 +Node: Distribution contents1094403 +Node: Unix Installation1100157 +Node: Quick Installation1100774 +Node: Additional Configuration Options1103198 +Node: Configuration Philosophy1105001 +Node: Non-Unix Installation1107370 +Node: PC Installation1107828 +Node: PC Binary Installation1109148 +Node: PC Compiling1110996 +Ref: PC Compiling-Footnote-11114017 +Node: PC Testing1114126 +Node: PC Using1115302 +Node: Cygwin1119417 +Node: MSYS1120187 +Node: VMS Installation1120688 +Node: VMS Compilation1121480 +Ref: VMS Compilation-Footnote-11122709 +Node: VMS Dynamic Extensions1122767 +Node: VMS Installation Details1124451 +Node: VMS Running1126702 +Node: VMS GNV1129542 +Node: VMS Old Gawk1130277 +Node: Bugs1130747 +Node: Other Versions1134636 +Node: Installation summary1141070 +Node: Notes1142129 +Node: Compatibility Mode1142994 +Node: Additions1143776 +Node: Accessing The Source1144701 +Node: Adding Code1146136 +Node: New Ports1152293 +Node: Derived Files1156775 +Ref: Derived Files-Footnote-11162250 +Ref: Derived Files-Footnote-21162284 +Ref: Derived Files-Footnote-31162880 +Node: Future Extensions1162994 +Node: Implementation Limitations1163600 +Node: Extension Design1164848 +Node: Old Extension Problems1166002 +Ref: Old Extension Problems-Footnote-11167519 +Node: Extension New Mechanism Goals1167576 +Ref: Extension New Mechanism Goals-Footnote-11170936 +Node: Extension Other Design Decisions1171125 +Node: Extension Future Growth1173233 +Node: Old Extension Mechanism1174069 +Node: Notes summary1175831 +Node: Basic Concepts1177017 +Node: Basic High Level1177698 +Ref: figure-general-flow1177970 +Ref: figure-process-flow1178569 +Ref: Basic High Level-Footnote-11181798 +Node: Basic Data Typing1181983 +Node: Glossary1185311 +Node: Copying1217240 +Node: GNU Free Documentation License1254796 +Node: Index1279932 End Tag Table diff --git a/doc/gawk.texi b/doc/gawk.texi index b21324e9..e951db1a 100644 --- a/doc/gawk.texi +++ b/doc/gawk.texi @@ -14124,12 +14124,12 @@ numbers: # find smallest divisor of num @{ num = $1 - for (div = 2; div * div <= num; div++) @{ - if (num % div == 0) + for (divisor = 2; divisor * divisor <= num; divisor++) @{ + if (num % divisor == 0) break @} - if (num % div == 0) - printf "Smallest divisor of %d is %d\n", num, div + if (num % divisor == 0) + printf "Smallest divisor of %d is %d\n", num, divisor else printf "%d is prime\n", num @} @@ -14150,12 +14150,12 @@ an @code{if}: # find smallest divisor of num @{ num = $1 - for (div = 2; ; div++) @{ - if (num % div == 0) @{ - printf "Smallest divisor of %d is %d\n", num, div + for (divisor = 2; ; divisor++) @{ + if (num % divisor == 0) @{ + printf "Smallest divisor of %d is %d\n", num, divisor break @} - if (div * div > num) @{ + if (divisor * divisor > num) @{ printf "%d is prime\n", num break @} diff --git a/doc/gawktexi.in b/doc/gawktexi.in index 383b5aff..3319bf35 100644 --- a/doc/gawktexi.in +++ b/doc/gawktexi.in @@ -13452,12 +13452,12 @@ numbers: # find smallest divisor of num @{ num = $1 - for (div = 2; div * div <= num; div++) @{ - if (num % div == 0) + for (divisor = 2; divisor * divisor <= num; divisor++) @{ + if (num % divisor == 0) break @} - if (num % div == 0) - printf "Smallest divisor of %d is %d\n", num, div + if (num % divisor == 0) + printf "Smallest divisor of %d is %d\n", num, divisor else printf "%d is prime\n", num @} @@ -13478,12 +13478,12 @@ an @code{if}: # find smallest divisor of num @{ num = $1 - for (div = 2; ; div++) @{ - if (num % div == 0) @{ - printf "Smallest divisor of %d is %d\n", num, div + for (divisor = 2; ; divisor++) @{ + if (num % divisor == 0) @{ + printf "Smallest divisor of %d is %d\n", num, divisor break @} - if (div * div > num) @{ + if (divisor * divisor > num) @{ printf "%d is prime\n", num break @} |