diff options
-rw-r--r-- | TODO | 4 | ||||
-rw-r--r-- | doc/ChangeLog | 7 | ||||
-rw-r--r-- | doc/gawk.info | 571 | ||||
-rw-r--r-- | doc/gawk.texi | 13 | ||||
-rw-r--r-- | doc/gawktexi.in | 13 |
5 files changed, 328 insertions, 280 deletions
@@ -80,6 +80,10 @@ Major New Features DBM storage of awk arrays. Try to allow multiple dbm packages. + ?? Some way to make regexp constants first class citizens + - Assign to variables + - Pass to functions + ?? A RECLEN variable for fixed-length record input. PROCINFO["RS"] would be "RS" or "RECLEN" depending upon what's in use. *** Could be done as an extension? diff --git a/doc/ChangeLog b/doc/ChangeLog index 45444315..3385ba09 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,6 +1,11 @@ +2013-06-22 Arnold D. Robbins <arnold@skeeve.com> + + * gawktexi.in (Type Functions): Add more explanation to isarray(), + including that it makes no sense to call it at the global level. + 2013-06-03 Arnold D. Robbins <arnold@skeeve.com> - * gawktexi.in: Make it crystal clear not to delete with FUNCTAB + * gawktexi.in: Make it crystal clear not to use delete with FUNCTAB, or attempt to assign to it. 2013-05-29 Arnold D. Robbins <arnold@skeeve.com> diff --git a/doc/gawk.info b/doc/gawk.info index f1fc615e..9072bf06 100644 --- a/doc/gawk.info +++ b/doc/gawk.info @@ -12557,6 +12557,19 @@ of Arrays::). `isarray(X)' Return a true value if X is an array. Otherwise return false. + `isarray()' is meant for use in two circumstances. The first is when +traversing a multidimensional array: you can test if an element is +itself an array or not. The second is inside the body of a +user-defined function (not discussed yet; *note User-defined::), to +test if a paramater is an array or not. + + Note, however, that using `isarray()' at the global level to test +variables makes no sense. Since you are the one writing the program, you +are supposed to know if your variables are arrays or not. And in fact, +due to the way `gawk' works, if you pass the name of a variable that +has not been previously used to `isarray()', `gawk' will end up turning +it into a scalar. + File: gawk.info, Node: I18N Functions, Prev: Type Functions, Up: Built-in @@ -32310,284 +32323,284 @@ Node: Bitwise Functions524391 Ref: table-bitwise-ops524949 Ref: Bitwise Functions-Footnote-1529170 Node: Type Functions529354 -Node: I18N Functions529824 -Node: User-defined531451 -Node: Definition Syntax532255 -Ref: Definition Syntax-Footnote-1537165 -Node: Function Example537234 -Node: Function Caveats539828 -Node: Calling A Function540249 -Node: Variable Scope541364 -Node: Pass By Value/Reference544327 -Node: Return Statement547835 -Node: Dynamic Typing550816 -Node: Indirect Calls551747 -Node: Library Functions561432 -Ref: Library Functions-Footnote-1564945 -Ref: Library Functions-Footnote-2565088 -Node: Library Names565259 -Ref: Library Names-Footnote-1568730 -Ref: Library Names-Footnote-2568950 -Node: General Functions569036 -Node: Strtonum Function569989 -Node: Assert Function572919 -Node: Round Function576245 -Node: Cliff Random Function577788 -Node: Ordinal Functions578804 -Ref: Ordinal Functions-Footnote-1581874 -Ref: Ordinal Functions-Footnote-2582126 -Node: Join Function582335 -Ref: Join Function-Footnote-1584106 -Node: Getlocaltime Function584306 -Node: Data File Management588021 -Node: Filetrans Function588653 -Node: Rewind Function592722 -Node: File Checking594109 -Node: Empty Files595203 -Node: Ignoring Assigns597433 -Node: Getopt Function598986 -Ref: Getopt Function-Footnote-1610290 -Node: Passwd Functions610493 -Ref: Passwd Functions-Footnote-1619468 -Node: Group Functions619556 -Node: Walking Arrays627640 -Node: Sample Programs629777 -Node: Running Examples630451 -Node: Clones631179 -Node: Cut Program632403 -Node: Egrep Program642248 -Ref: Egrep Program-Footnote-1650021 -Node: Id Program650131 -Node: Split Program653747 -Ref: Split Program-Footnote-1657266 -Node: Tee Program657394 -Node: Uniq Program660197 -Node: Wc Program667626 -Ref: Wc Program-Footnote-1671892 -Ref: Wc Program-Footnote-2672092 -Node: Miscellaneous Programs672184 -Node: Dupword Program673372 -Node: Alarm Program675403 -Node: Translate Program680152 -Ref: Translate Program-Footnote-1684539 -Ref: Translate Program-Footnote-2684767 -Node: Labels Program684901 -Ref: Labels Program-Footnote-1688272 -Node: Word Sorting688356 -Node: History Sorting692240 -Node: Extract Program694079 -Ref: Extract Program-Footnote-1701580 -Node: Simple Sed701708 -Node: Igawk Program704770 -Ref: Igawk Program-Footnote-1719927 -Ref: Igawk Program-Footnote-2720128 -Node: Anagram Program720266 -Node: Signature Program723334 -Node: Advanced Features724434 -Node: Nondecimal Data726316 -Node: Array Sorting727899 -Node: Controlling Array Traversal728596 -Node: Array Sorting Functions736834 -Ref: Array Sorting Functions-Footnote-1740508 -Ref: Array Sorting Functions-Footnote-2740601 -Node: Two-way I/O740795 -Ref: Two-way I/O-Footnote-1746227 -Node: TCP/IP Networking746297 -Node: Profiling749141 -Node: Internationalization756638 -Node: I18N and L10N758063 -Node: Explaining gettext758749 -Ref: Explaining gettext-Footnote-1763817 -Ref: Explaining gettext-Footnote-2764001 -Node: Programmer i18n764166 -Node: Translator i18n768368 -Node: String Extraction769161 -Ref: String Extraction-Footnote-1770122 -Node: Printf Ordering770208 -Ref: Printf Ordering-Footnote-1772992 -Node: I18N Portability773056 -Ref: I18N Portability-Footnote-1775505 -Node: I18N Example775568 -Ref: I18N Example-Footnote-1778206 -Node: Gawk I18N778278 -Node: Debugger778899 -Node: Debugging779870 -Node: Debugging Concepts780303 -Node: Debugging Terms782159 -Node: Awk Debugging784756 -Node: Sample Debugging Session785648 -Node: Debugger Invocation786168 -Node: Finding The Bug787500 -Node: List of Debugger Commands793988 -Node: Breakpoint Control795322 -Node: Debugger Execution Control798986 -Node: Viewing And Changing Data802346 -Node: Execution Stack805702 -Node: Debugger Info807169 -Node: Miscellaneous Debugger Commands811151 -Node: Readline Support816327 -Node: Limitations817158 -Node: Arbitrary Precision Arithmetic819410 -Ref: Arbitrary Precision Arithmetic-Footnote-1821061 -Node: General Arithmetic821209 -Node: Floating Point Issues822929 -Node: String Conversion Precision823810 -Ref: String Conversion Precision-Footnote-1825516 -Node: Unexpected Results825625 -Node: POSIX Floating Point Problems827778 -Ref: POSIX Floating Point Problems-Footnote-1831603 -Node: Integer Programming831641 -Node: Floating-point Programming833380 -Ref: Floating-point Programming-Footnote-1839711 -Ref: Floating-point Programming-Footnote-2839981 -Node: Floating-point Representation840245 -Node: Floating-point Context841410 -Ref: table-ieee-formats842249 -Node: Rounding Mode843633 -Ref: table-rounding-modes844112 -Ref: Rounding Mode-Footnote-1847127 -Node: Gawk and MPFR847306 -Node: Arbitrary Precision Floats848561 -Ref: Arbitrary Precision Floats-Footnote-1851004 -Node: Setting Precision851320 -Ref: table-predefined-precision-strings852006 -Node: Setting Rounding Mode854151 -Ref: table-gawk-rounding-modes854555 -Node: Floating-point Constants855742 -Node: Changing Precision857171 -Ref: Changing Precision-Footnote-1858571 -Node: Exact Arithmetic858745 -Node: Arbitrary Precision Integers861883 -Ref: Arbitrary Precision Integers-Footnote-1864901 -Node: Dynamic Extensions865048 -Node: Extension Intro866506 -Node: Plugin License867771 -Node: Extension Mechanism Outline868456 -Ref: load-extension868873 -Ref: load-new-function870351 -Ref: call-new-function871346 -Node: Extension API Description873361 -Node: Extension API Functions Introduction874574 -Node: General Data Types879440 -Ref: General Data Types-Footnote-1885042 -Node: Requesting Values885341 -Ref: table-value-types-returned886072 -Node: Constructor Functions887026 -Node: Registration Functions890046 -Node: Extension Functions890731 -Node: Exit Callback Functions892956 -Node: Extension Version String894205 -Node: Input Parsers894855 -Node: Output Wrappers904612 -Node: Two-way processors909122 -Node: Printing Messages911330 -Ref: Printing Messages-Footnote-1912407 -Node: Updating `ERRNO'912559 -Node: Accessing Parameters913298 -Node: Symbol Table Access914528 -Node: Symbol table by name915040 -Node: Symbol table by cookie916787 -Ref: Symbol table by cookie-Footnote-1920917 -Node: Cached values920980 -Ref: Cached values-Footnote-1924429 -Node: Array Manipulation924520 -Ref: Array Manipulation-Footnote-1925618 -Node: Array Data Types925657 -Ref: Array Data Types-Footnote-1928360 -Node: Array Functions928452 -Node: Flattening Arrays932218 -Node: Creating Arrays939070 -Node: Extension API Variables943795 -Node: Extension Versioning944431 -Node: Extension API Informational Variables946332 -Node: Extension API Boilerplate947418 -Node: Finding Extensions951222 -Node: Extension Example951782 -Node: Internal File Description952513 -Node: Internal File Ops956604 -Ref: Internal File Ops-Footnote-1968112 -Node: Using Internal File Ops968252 -Ref: Using Internal File Ops-Footnote-1970605 -Node: Extension Samples970871 -Node: Extension Sample File Functions972395 -Node: Extension Sample Fnmatch980882 -Node: Extension Sample Fork982608 -Node: Extension Sample Inplace983826 -Node: Extension Sample Ord985604 -Node: Extension Sample Readdir986440 -Node: Extension Sample Revout987972 -Node: Extension Sample Rev2way988565 -Node: Extension Sample Read write array989255 -Node: Extension Sample Readfile991138 -Node: Extension Sample API Tests991956 -Node: Extension Sample Time992481 -Node: gawkextlib993845 -Node: Language History996605 -Node: V7/SVR3.1998127 -Node: SVR41000448 -Node: POSIX1001890 -Node: BTL1003276 -Node: POSIX/GNU1004010 -Node: Common Extensions1009545 -Node: Ranges and Locales1010851 -Ref: Ranges and Locales-Footnote-11015469 -Ref: Ranges and Locales-Footnote-21015496 -Ref: Ranges and Locales-Footnote-31015756 -Node: Contributors1015977 -Node: Installation1020856 -Node: Gawk Distribution1021750 -Node: Getting1022234 -Node: Extracting1023060 -Node: Distribution contents1024752 -Node: Unix Installation1030013 -Node: Quick Installation1030630 -Node: Additional Configuration Options1033074 -Node: Configuration Philosophy1034551 -Node: Non-Unix Installation1036905 -Node: PC Installation1037363 -Node: PC Binary Installation1038662 -Node: PC Compiling1040510 -Node: PC Testing1043454 -Node: PC Using1044630 -Node: Cygwin1048815 -Node: MSYS1049815 -Node: VMS Installation1050329 -Node: VMS Compilation1050932 -Ref: VMS Compilation-Footnote-11051939 -Node: VMS Installation Details1051997 -Node: VMS Running1053632 -Node: VMS Old Gawk1055239 -Node: Bugs1055713 -Node: Other Versions1059565 -Node: Notes1065166 -Node: Compatibility Mode1065966 -Node: Additions1066749 -Node: Accessing The Source1067676 -Node: Adding Code1069116 -Node: New Ports1075161 -Node: Derived Files1079296 -Ref: Derived Files-Footnote-11084617 -Ref: Derived Files-Footnote-21084651 -Ref: Derived Files-Footnote-31085251 -Node: Future Extensions1085349 -Node: Implementation Limitations1085930 -Node: Extension Design1087182 -Node: Old Extension Problems1088336 -Ref: Old Extension Problems-Footnote-11089844 -Node: Extension New Mechanism Goals1089901 -Ref: Extension New Mechanism Goals-Footnote-11093267 -Node: Extension Other Design Decisions1093453 -Node: Extension Future Growth1095559 -Node: Old Extension Mechanism1096395 -Node: Basic Concepts1098135 -Node: Basic High Level1098816 -Ref: figure-general-flow1099087 -Ref: figure-process-flow1099686 -Ref: Basic High Level-Footnote-11102915 -Node: Basic Data Typing1103100 -Node: Glossary1106455 -Node: Copying1131917 -Node: GNU Free Documentation License1169474 -Node: Index1194611 +Node: I18N Functions530505 +Node: User-defined532132 +Node: Definition Syntax532936 +Ref: Definition Syntax-Footnote-1537846 +Node: Function Example537915 +Node: Function Caveats540509 +Node: Calling A Function540930 +Node: Variable Scope542045 +Node: Pass By Value/Reference545008 +Node: Return Statement548516 +Node: Dynamic Typing551497 +Node: Indirect Calls552428 +Node: Library Functions562113 +Ref: Library Functions-Footnote-1565626 +Ref: Library Functions-Footnote-2565769 +Node: Library Names565940 +Ref: Library Names-Footnote-1569411 +Ref: Library Names-Footnote-2569631 +Node: General Functions569717 +Node: Strtonum Function570670 +Node: Assert Function573600 +Node: Round Function576926 +Node: Cliff Random Function578469 +Node: Ordinal Functions579485 +Ref: Ordinal Functions-Footnote-1582555 +Ref: Ordinal Functions-Footnote-2582807 +Node: Join Function583016 +Ref: Join Function-Footnote-1584787 +Node: Getlocaltime Function584987 +Node: Data File Management588702 +Node: Filetrans Function589334 +Node: Rewind Function593403 +Node: File Checking594790 +Node: Empty Files595884 +Node: Ignoring Assigns598114 +Node: Getopt Function599667 +Ref: Getopt Function-Footnote-1610971 +Node: Passwd Functions611174 +Ref: Passwd Functions-Footnote-1620149 +Node: Group Functions620237 +Node: Walking Arrays628321 +Node: Sample Programs630458 +Node: Running Examples631132 +Node: Clones631860 +Node: Cut Program633084 +Node: Egrep Program642929 +Ref: Egrep Program-Footnote-1650702 +Node: Id Program650812 +Node: Split Program654428 +Ref: Split Program-Footnote-1657947 +Node: Tee Program658075 +Node: Uniq Program660878 +Node: Wc Program668307 +Ref: Wc Program-Footnote-1672573 +Ref: Wc Program-Footnote-2672773 +Node: Miscellaneous Programs672865 +Node: Dupword Program674053 +Node: Alarm Program676084 +Node: Translate Program680833 +Ref: Translate Program-Footnote-1685220 +Ref: Translate Program-Footnote-2685448 +Node: Labels Program685582 +Ref: Labels Program-Footnote-1688953 +Node: Word Sorting689037 +Node: History Sorting692921 +Node: Extract Program694760 +Ref: Extract Program-Footnote-1702261 +Node: Simple Sed702389 +Node: Igawk Program705451 +Ref: Igawk Program-Footnote-1720608 +Ref: Igawk Program-Footnote-2720809 +Node: Anagram Program720947 +Node: Signature Program724015 +Node: Advanced Features725115 +Node: Nondecimal Data726997 +Node: Array Sorting728580 +Node: Controlling Array Traversal729277 +Node: Array Sorting Functions737515 +Ref: Array Sorting Functions-Footnote-1741189 +Ref: Array Sorting Functions-Footnote-2741282 +Node: Two-way I/O741476 +Ref: Two-way I/O-Footnote-1746908 +Node: TCP/IP Networking746978 +Node: Profiling749822 +Node: Internationalization757319 +Node: I18N and L10N758744 +Node: Explaining gettext759430 +Ref: Explaining gettext-Footnote-1764498 +Ref: Explaining gettext-Footnote-2764682 +Node: Programmer i18n764847 +Node: Translator i18n769049 +Node: String Extraction769842 +Ref: String Extraction-Footnote-1770803 +Node: Printf Ordering770889 +Ref: Printf Ordering-Footnote-1773673 +Node: I18N Portability773737 +Ref: I18N Portability-Footnote-1776186 +Node: I18N Example776249 +Ref: I18N Example-Footnote-1778887 +Node: Gawk I18N778959 +Node: Debugger779580 +Node: Debugging780551 +Node: Debugging Concepts780984 +Node: Debugging Terms782840 +Node: Awk Debugging785437 +Node: Sample Debugging Session786329 +Node: Debugger Invocation786849 +Node: Finding The Bug788181 +Node: List of Debugger Commands794669 +Node: Breakpoint Control796003 +Node: Debugger Execution Control799667 +Node: Viewing And Changing Data803027 +Node: Execution Stack806383 +Node: Debugger Info807850 +Node: Miscellaneous Debugger Commands811832 +Node: Readline Support817008 +Node: Limitations817839 +Node: Arbitrary Precision Arithmetic820091 +Ref: Arbitrary Precision Arithmetic-Footnote-1821742 +Node: General Arithmetic821890 +Node: Floating Point Issues823610 +Node: String Conversion Precision824491 +Ref: String Conversion Precision-Footnote-1826197 +Node: Unexpected Results826306 +Node: POSIX Floating Point Problems828459 +Ref: POSIX Floating Point Problems-Footnote-1832284 +Node: Integer Programming832322 +Node: Floating-point Programming834061 +Ref: Floating-point Programming-Footnote-1840392 +Ref: Floating-point Programming-Footnote-2840662 +Node: Floating-point Representation840926 +Node: Floating-point Context842091 +Ref: table-ieee-formats842930 +Node: Rounding Mode844314 +Ref: table-rounding-modes844793 +Ref: Rounding Mode-Footnote-1847808 +Node: Gawk and MPFR847987 +Node: Arbitrary Precision Floats849242 +Ref: Arbitrary Precision Floats-Footnote-1851685 +Node: Setting Precision852001 +Ref: table-predefined-precision-strings852687 +Node: Setting Rounding Mode854832 +Ref: table-gawk-rounding-modes855236 +Node: Floating-point Constants856423 +Node: Changing Precision857852 +Ref: Changing Precision-Footnote-1859252 +Node: Exact Arithmetic859426 +Node: Arbitrary Precision Integers862564 +Ref: Arbitrary Precision Integers-Footnote-1865582 +Node: Dynamic Extensions865729 +Node: Extension Intro867187 +Node: Plugin License868452 +Node: Extension Mechanism Outline869137 +Ref: load-extension869554 +Ref: load-new-function871032 +Ref: call-new-function872027 +Node: Extension API Description874042 +Node: Extension API Functions Introduction875255 +Node: General Data Types880121 +Ref: General Data Types-Footnote-1885723 +Node: Requesting Values886022 +Ref: table-value-types-returned886753 +Node: Constructor Functions887707 +Node: Registration Functions890727 +Node: Extension Functions891412 +Node: Exit Callback Functions893637 +Node: Extension Version String894886 +Node: Input Parsers895536 +Node: Output Wrappers905293 +Node: Two-way processors909803 +Node: Printing Messages912011 +Ref: Printing Messages-Footnote-1913088 +Node: Updating `ERRNO'913240 +Node: Accessing Parameters913979 +Node: Symbol Table Access915209 +Node: Symbol table by name915721 +Node: Symbol table by cookie917468 +Ref: Symbol table by cookie-Footnote-1921598 +Node: Cached values921661 +Ref: Cached values-Footnote-1925110 +Node: Array Manipulation925201 +Ref: Array Manipulation-Footnote-1926299 +Node: Array Data Types926338 +Ref: Array Data Types-Footnote-1929041 +Node: Array Functions929133 +Node: Flattening Arrays932899 +Node: Creating Arrays939751 +Node: Extension API Variables944476 +Node: Extension Versioning945112 +Node: Extension API Informational Variables947013 +Node: Extension API Boilerplate948099 +Node: Finding Extensions951903 +Node: Extension Example952463 +Node: Internal File Description953194 +Node: Internal File Ops957285 +Ref: Internal File Ops-Footnote-1968793 +Node: Using Internal File Ops968933 +Ref: Using Internal File Ops-Footnote-1971286 +Node: Extension Samples971552 +Node: Extension Sample File Functions973076 +Node: Extension Sample Fnmatch981563 +Node: Extension Sample Fork983289 +Node: Extension Sample Inplace984507 +Node: Extension Sample Ord986285 +Node: Extension Sample Readdir987121 +Node: Extension Sample Revout988653 +Node: Extension Sample Rev2way989246 +Node: Extension Sample Read write array989936 +Node: Extension Sample Readfile991819 +Node: Extension Sample API Tests992637 +Node: Extension Sample Time993162 +Node: gawkextlib994526 +Node: Language History997286 +Node: V7/SVR3.1998808 +Node: SVR41001129 +Node: POSIX1002571 +Node: BTL1003957 +Node: POSIX/GNU1004691 +Node: Common Extensions1010226 +Node: Ranges and Locales1011532 +Ref: Ranges and Locales-Footnote-11016150 +Ref: Ranges and Locales-Footnote-21016177 +Ref: Ranges and Locales-Footnote-31016437 +Node: Contributors1016658 +Node: Installation1021537 +Node: Gawk Distribution1022431 +Node: Getting1022915 +Node: Extracting1023741 +Node: Distribution contents1025433 +Node: Unix Installation1030694 +Node: Quick Installation1031311 +Node: Additional Configuration Options1033755 +Node: Configuration Philosophy1035232 +Node: Non-Unix Installation1037586 +Node: PC Installation1038044 +Node: PC Binary Installation1039343 +Node: PC Compiling1041191 +Node: PC Testing1044135 +Node: PC Using1045311 +Node: Cygwin1049496 +Node: MSYS1050496 +Node: VMS Installation1051010 +Node: VMS Compilation1051613 +Ref: VMS Compilation-Footnote-11052620 +Node: VMS Installation Details1052678 +Node: VMS Running1054313 +Node: VMS Old Gawk1055920 +Node: Bugs1056394 +Node: Other Versions1060246 +Node: Notes1065847 +Node: Compatibility Mode1066647 +Node: Additions1067430 +Node: Accessing The Source1068357 +Node: Adding Code1069797 +Node: New Ports1075842 +Node: Derived Files1079977 +Ref: Derived Files-Footnote-11085298 +Ref: Derived Files-Footnote-21085332 +Ref: Derived Files-Footnote-31085932 +Node: Future Extensions1086030 +Node: Implementation Limitations1086611 +Node: Extension Design1087863 +Node: Old Extension Problems1089017 +Ref: Old Extension Problems-Footnote-11090525 +Node: Extension New Mechanism Goals1090582 +Ref: Extension New Mechanism Goals-Footnote-11093948 +Node: Extension Other Design Decisions1094134 +Node: Extension Future Growth1096240 +Node: Old Extension Mechanism1097076 +Node: Basic Concepts1098816 +Node: Basic High Level1099497 +Ref: figure-general-flow1099768 +Ref: figure-process-flow1100367 +Ref: Basic High Level-Footnote-11103596 +Node: Basic Data Typing1103781 +Node: Glossary1107136 +Node: Copying1132598 +Node: GNU Free Documentation License1170155 +Node: Index1195292 End Tag Table diff --git a/doc/gawk.texi b/doc/gawk.texi index 0ab0d51d..c9211007 100644 --- a/doc/gawk.texi +++ b/doc/gawk.texi @@ -17743,6 +17743,19 @@ that traverses every element of a true multidimensional array Return a true value if @var{x} is an array. Otherwise return false. @end table +@code{isarray()} is meant for use in two circumstances. The first is when +traversing a multidimensional array: you can test if an element is itself +an array or not. The second is inside the body of a user-defined function +(not discussed yet; @pxref{User-defined}), to test if a paramater is an +array or not. + +Note, however, that using @code{isarray()} at the global level to test +variables makes no sense. Since you are the one writing the program, you +are supposed to know if your variables are arrays or not. And in fact, +due to the way @command{gawk} works, if you pass the name of a variable +that has not been previously used to @code{isarray()}, @command{gawk} +will end up turning it into a scalar. + @node I18N Functions @subsection String-Translation Functions @cindex @command{gawk}, string-translation functions diff --git a/doc/gawktexi.in b/doc/gawktexi.in index 1c3fb4b4..68316d1c 100644 --- a/doc/gawktexi.in +++ b/doc/gawktexi.in @@ -16921,6 +16921,19 @@ that traverses every element of a true multidimensional array Return a true value if @var{x} is an array. Otherwise return false. @end table +@code{isarray()} is meant for use in two circumstances. The first is when +traversing a multidimensional array: you can test if an element is itself +an array or not. The second is inside the body of a user-defined function +(not discussed yet; @pxref{User-defined}), to test if a paramater is an +array or not. + +Note, however, that using @code{isarray()} at the global level to test +variables makes no sense. Since you are the one writing the program, you +are supposed to know if your variables are arrays or not. And in fact, +due to the way @command{gawk} works, if you pass the name of a variable +that has not been previously used to @code{isarray()}, @command{gawk} +will end up turning it into a scalar. + @node I18N Functions @subsection String-Translation Functions @cindex @command{gawk}, string-translation functions |