Documentation Help Nits

samintz

Scott Mintz
May 20, 2008
1,503
16
Solon, OH, USA
The examples for @ARRAYINFO are incorrect. This is what it currently says:

@ARRAYINFO will return -1 if the array doesn't exist.

Examples:

setarray array[5,10]
echo %@arrayinfo[0]
2

echo %@arraninfo[2]
10

The echo statements are missing the array name. Plus the typo on the second echo.
 
May 20, 2008
11,432
99
Syracuse, NY, USA
Hmmm! What version/OS? It seems right here (Win7/32).
Code:
v:\> setarray array[5,10]
 
v:\> echo %@arraninfo[0]
TCC: (Sys) Incorrect function.
"%@arraninfo[0]"
 
v:\> echo %@arrayinfo[0]
-1
 
v:\> ver
 
TCC  14.02.44  Windows 7 [Version 6.1.7601]
 
v:\>
 

samintz

Scott Mintz
May 20, 2008
1,503
16
Solon, OH, USA
Vince,

The correct syntax includes the array name in the function.
Code:
[C:\] setarray array[5,10]
 
[C:\] echo %@arrayinfo[array,0]
2
 
[C:\] echo %@arrayinfo[array,1]
5
 
[C:\] echo %@arrayinfo[array,2]
10
 
[C:\] echo %@arrayinfo[array,5]
50

Your code snippet proves my point. The help file's examples are incorrect.
-Scott
 
May 20, 2008
11,432
99
Syracuse, NY, USA
OK, I missed your point. I thought you were saying that you were getting results without naming the array. I agree, the examples are flawed.
 
Similar threads
Thread starter Title Forum Replies Date
Charles Dye More help nits Support 0
Charles Dye Documentation Help nits: @ZIPFILECRC Support 0
R Documentation A couple of Help nits Support 0
Charles Dye Documentation Help Nits Forever: Checksum functions Support 0
samintz Documentation Help nits Support 5
Charles Dye Revenge of the Help Nits Support 0
JohnQSmith Ye olde Help Nits Support 4
Charles Dye Doc nits: HELP BATCHDETECT Support 2
S Fixed Help nits Support 7
Charles Dye The eternal Help Nits thread Support 0
C web help nits Support 1
S More HELP nits Support 5
S HELP nits Support 9
S SET /A question; HELP nits Support 8
S HELP nits Support 1
S HELP nits Support 0
dcantor 12.1 help nits Support 0
S HELP nits Support 3
samintz V12 Help Nits Support 5
S HELP nits Support 3
C Add link to ewriter help to program group... Support 3
samintz How to? Search for %(command) in Help? Support 1
Joe Caverly Favorites in eWriter Help Support 6
Joe Caverly Quick Search in eWriter Help Support 1
vefatica Online help? Support 2
fishman@panix.com HELP!! I just updated to Version 28 and as usual I cannot make extended directory search work. Support 2
JohnQSmith New online help file wrong logo Support 7
Jay Sage Documentation Function @DRIVE Missing in Help Lists Support 0
D Documentation Typo in COPY help Support 0
FreezerBurnt Help making a CMD and TCC compatible batch file Support 7
Joe Caverly Documentation COMMANDS in Version 27 help Support 8
K_Meinhard How to? Help window position Support 7
U Command help on file names Support 5
D Documentation Help "Startup" page does not describe global lists Support 0
vefatica Help disappears? Support 6
rchapmanitt Help Purchasing Support 2
C version help Support 3
C Documentation Help Nit. REN / RENAME Support 0
Dmitry L. Kobyakov Documentation Error in the Help: the WINDOW command Support 0
vefatica Help for @PID Support 2
vefatica Need help with XML Support 3
Alpengreis Documentation Minor issue in help file for view /E Support 1
R Documentation Advanced Directives Help Support 0
R Documentation Help Nit with SETP Support 0
R wmic command help Support 9
R Documentation Help Nit > bdebugger View Menu Support 0
R Documentation Help typo Support 1
MikeBaas How to? I need help with RD Support 5
R Documentation v25 Help Comments Support 1
Joe Caverly DIRectory Colorization in v25 Help File Support 0

Similar threads