[ver]
	4
[sty]
	
[files]
[charset]
	82
	ANSI (Windows, IBM CP 1252)
[revisions]
	0
[sequence]
	32
	0
	0
	0
	12
	0
	Numbered List
	206
	bullet
	206
	indent bullet
	206
	Note
	206
	indent Note
	206
	tip
	206
	Caution
	206
	indentCaution
	206
	find
	0
	Footnote
	206
	indent Tip
	206
	indent Find
[prn]
	QMS-PS 2200
[port]
	LPT3:
[lang]
	1
[fldnames]
	Field1
	Field2
	Field3
	Field4
	Field5
	Field6
	Field7
	Field8
[desc]
	File ch02.rtf was converted from Rich Text Format on 4/6/94
	
	
	
	
	802475715
	66
	765647028
	283
	10
	0
	0
	0
	0
	
	
	
	
	
	
	1
[fopts]
	0
	1
	0
	0
	
	
[lnopts]
	2
	Body Text
	1
[docopts]
	5
	2
[GramStyle]
	
[ParaNum]
	1
[tag]
	Body Text
	2
	[fnt]
		Palatino
		200
		0
		49152
	[algn]
		1
		3
		720
		0
		0
	[spc]
		24
		200
		4
		120
		120
		4
		100
	[brk]
		36
	[line]
		8
		0
		1
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		0
		
		0
		1
		1
		0
		0
		0
		0
	[nfmt]
		280
		1
		2
		.
		,
		$
	1Body Text
	3
	1
	600
	1
	1200
	1
	3720
	0
[tag]
	Ahead
	3
	[fnt]
		Helvetica
		280
		0
		16385
	[algn]
		1
		1
		0
		0
		0
	[spc]
		40
		300
		4
		360
		120
		4
		100
	[brk]
		80
	[line]
		9
		0
		4
		0
		1
		1
		1
		110
		10
		1
	[spec]
		0
		2
		
		0
		1
		1
		0
		0
		0
		0
	[nfmt]
		272
		1
		2
		.
		,
		$
	Body Text
	0
	0
[tag]
	Bhead
	4
	[fnt]
		Helvetica
		240
		0
		16385
	[algn]
		1
		3
		0
		0
		0
	[spc]
		40
		280
		4
		100
		90
		4
		100
	[brk]
		80
	[line]
		8
		0
		1
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		2
		
		0
		1
		1
		0
		0
		0
		0
	[nfmt]
		272
		1
		2
		.
		,
		$
	Body Text
	0
	0
[tag]
	Chead
	5
	[fnt]
		Helvetica
		200
		0
		16385
	[algn]
		1
		3
		720
		0
		0
	[spc]
		40
		240
		4
		80
		0
		4
		100
	[brk]
		80
	[line]
		8
		0
		1
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		2
		
		0
		1
		1
		0
		0
		0
		0
	[nfmt]
		272
		1
		2
		.
		,
		$
	Body Text
	0
	0
[tag]
	Numbered List
	6
	[fnt]
		Palatino
		200
		0
		49152
	[algn]
		1
		3
		744
		336
		336
	[spc]
		40
		240
		4
		0
		80
		4
		100
	[brk]
		0
	[line]
		8
		0
		1
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		3
		<*:>.
		0
		3
		1
		1
		2
		0
		0
	[nfmt]
		272
		1
		2
		.
		,
		$
	Numbered List
	0
	0
[tag]
	bullet
	7
	[fnt]
		Palatino
		200
		0
		49152
	[algn]
		1
		3
		720
		300
		300
	[spc]
		40
		240
		4
		80
		80
		4
		100
	[brk]
		0
	[line]
		8
		0
		1
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		4
		<*1>
		0
		3
		1
		1
		0
		0
		0
	[nfmt]
		272
		1
		2
		.
		,
		$
	bulleted list
	0
	0
[tag]
	1st lev para
	8
	[fnt]
		Palatino
		200
		0
		49152
	[algn]
		1
		3
		1080
		0
		0
	[spc]
		40
		240
		4
		0
		80
		4
		100
	[brk]
		4
	[line]
		8
		0
		1
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		4
		
		0
		1
		1
		1
		0
		0
		0
	[nfmt]
		272
		1
		2
		.
		,
		$
	1st lev para
	0
	0
[tag]
	mono
	9
	[fnt]
		Courier
		180
		0
		32769
	[algn]
		1
		3
		720
		0
		0
	[spc]
		24
		220
		4
		120
		120
		4
		100
	[brk]
		36
	[line]
		8
		0
		1
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		4
		
		0
		1
		1
		0
		0
		0
		0
	[nfmt]
		280
		1
		2
		.
		,
		$
	mono
	22
	1
	864
	1
	1209
	1
	1555
	1
	1900
	1
	2246
	1
	2592
	1
	2937
	1
	3283
	1
	3628
	1
	3974
	1
	4320
	1
	4665
	1
	5011
	1
	5356
	1
	5702
	1
	6048
	1
	6393
	1
	6739
	1
	7084
	1
	7430
	1
	7776
	1
	8121
	0
[tag]
	indent bullet
	11
	[fnt]
		Palatino
		200
		0
		49152
	[algn]
		1
		3
		1104
		216
		216
	[spc]
		40
		240
		4
		0
		80
		4
		100
	[brk]
		0
	[line]
		8
		0
		1
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		4
		<*1>
		0
		3
		1
		1
		0
		0
		0
	[nfmt]
		272
		1
		2
		.
		,
		$
	indent bullet
	0
	0
[tag]
	Note
	12
	[fnt]
		Helvetica
		200
		0
		16384
	[algn]
		1
		3
		720
		600
		0
	[spc]
		40
		240
		4
		0
		80
		4
		100
	[brk]
		0
	[line]
		8
		0
		1
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		4
		Note
		0
		3
		1
		1
		0
		0
		0
	[nfmt]
		272
		1
		2
		.
		,
		$
	Note
	0
	0
[tag]
	2nd lev para
	0
	[fnt]
		Palatino
		200
		0
		49152
	[algn]
		1
		3
		1320
		0
		0
	[spc]
		40
		240
		4
		0
		80
		4
		100
	[brk]
		4
	[line]
		8
		0
		1
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		4
		
		0
		1
		1
		1
		2
		0
		0
	[nfmt]
		272
		1
		2
		.
		,
		$
	2nd lev para
	0
	0
[tag]
	Table Text
	0
	[fnt]
		Palatino
		180
		0
		49152
	[algn]
		1
		1
		0
		0
		0
	[spc]
		40
		200
		4
		79
		0
		3
		100
	[brk]
		4
	[line]
		8
		0
		1
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		0
		
		0
		1
		1
		0
		0
		0
		0
	[nfmt]
		272
		1
		2
		.
		,
		$
	Table Text
	0
	0
[tag]
	Body Text1
	0
	[fnt]
		Palatino
		200
		0
		49152
	[algn]
		1
		3
		720
		0
		0
	[spc]
		40
		240
		4
		20
		40
		4
		100
	[brk]
		36
	[line]
		8
		0
		1
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		1
		
		18944
		1
		1
		0
		2
		0
		0
	[nfmt]
		280
		1
		2
		.
		,
		$
	Body Text1
	4
	1
	2390
	1
	2869
	1
	3347
	1
	3826
	0
[tag]
	indent Note
	0
	[fnt]
		Helvetica
		200
		0
		16384
	[algn]
		1
		3
		1080
		600
		0
	[spc]
		40
		240
		4
		0
		80
		4
		100
	[brk]
		0
	[line]
		8
		0
		1
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		4
		Note
		0
		3
		1
		1
		0
		0
		0
	[nfmt]
		272
		1
		2
		.
		,
		$
	indent Note
	0
	0
[tag]
	tip
	0
	[fnt]
		Helvetica
		200
		0
		16384
	[algn]
		1
		3
		720
		480
		0
	[spc]
		40
		240
		4
		0
		80
		4
		100
	[brk]
		4
	[line]
		8
		0
		1
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		4
		Tip
		0
		3
		1
		1
		0
		0
		0
	[nfmt]
		272
		1
		2
		.
		,
		$
	tip
	0
	0
[tag]
	Caution
	0
	[fnt]
		Helvetica
		200
		0
		16384
	[algn]
		1
		3
		720
		900
		0
	[spc]
		40
		240
		4
		0
		80
		4
		100
	[brk]
		4
	[line]
		8
		0
		1
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		4
		Caution
		0
		3
		1
		1
		0
		0
		0
	[nfmt]
		272
		1
		2
		.
		,
		$
	Caution
	0
	0
[tag]
	indentCaution
	0
	[fnt]
		Helvetica
		200
		0
		16384
	[algn]
		1
		3
		1080
		900
		0
	[spc]
		40
		240
		4
		0
		80
		4
		100
	[brk]
		4
	[line]
		8
		0
		1
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		4
		Caution
		0
		3
		1
		1
		0
		0
		0
	[nfmt]
		272
		1
		2
		.
		,
		$
	indentCaution
	0
	0
[tag]
	Term
	0
	[fnt]
		Palatino
		200
		0
		49153
	[algn]
		1
		3
		720
		0
		0
	[spc]
		24
		240
		4
		0
		0
		4
		100
	[brk]
		80
	[line]
		8
		0
		1
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		2
		
		0
		1
		1
		0
		0
		0
		0
	[nfmt]
		280
		1
		2
		.
		,
		$
	Body Text
	0
	0
[tag]
	indent Term
	0
	[fnt]
		Palatino
		200
		0
		49153
	[algn]
		1
		3
		1080
		0
		0
	[spc]
		24
		240
		4
		0
		0
		4
		100
	[brk]
		16
	[line]
		8
		0
		1
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		2
		
		0
		1
		1
		0
		0
		0
		0
	[nfmt]
		280
		1
		2
		.
		,
		$
	indent Term
	0
	0
[tag]
	find
	0
	[fnt]
		Helvetica
		200
		0
		16384
	[algn]
		1
		3
		720
		1800
		0
	[spc]
		40
		240
		4
		0
		80
		4
		100
	[brk]
		4
	[line]
		8
		0
		1
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		4
		Finding Out More
		0
		3
		1
		1
		0
		0
		0
	[nfmt]
		272
		1
		2
		.
		,
		$
	find
	0
	0
[tag]
	procdure Bhd
	0
	[fnt]
		Helvetica
		220
		0
		16385
	[algn]
		1
		3
		0
		0
		0
	[spc]
		40
		260
		4
		100
		90
		4
		100
	[brk]
		80
	[line]
		8
		0
		1
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		2
		
		0
		1
		1
		0
		0
		0
		0
	[nfmt]
		272
		1
		2
		.
		,
		$
	Numbered List
	0
	0
[tag]
	procdure Chd
	0
	[fnt]
		Helvetica
		200
		0
		16385
	[algn]
		1
		3
		720
		0
		0
	[spc]
		40
		240
		4
		80
		80
		4
		100
	[brk]
		80
	[line]
		8
		0
		1
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		2
		
		0
		1
		1
		0
		0
		0
		0
	[nfmt]
		272
		1
		2
		.
		,
		$
	Numbered List
	0
	0
[tag]
	formula
	0
	[fnt]
		Helvetica
		180
		0
		16384
	[algn]
		1
		3
		1080
		0
		0
	[spc]
		40
		220
		4
		0
		80
		4
		100
	[brk]
		4
	[line]
		8
		0
		1
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		4
		
		0
		1
		1
		1
		0
		0
		0
	[nfmt]
		272
		1
		2
		.
		,
		$
	formula
	0
	0
[tag]
	Table Title
	0
	[fnt]
		Helvetica
		180
		0
		16385
	[algn]
		1
		3
		720
		0
		0
	[spc]
		40
		220
		4
		40
		80
		4
		100
	[brk]
		16
	[line]
		8
		0
		1
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		4
		
		0
		1
		1
		0
		0
		0
		0
	[nfmt]
		272
		1
		2
		.
		,
		$
	Table Title
	0
	0
[tag]
	Column Head
	0
	[fnt]
		Palatino
		180
		0
		49154
	[algn]
		1
		3
		0
		0
		0
	[spc]
		40
		220
		4
		0
		0
		3
		100
	[brk]
		4
	[line]
		11
		0
		1
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		4
		
		0
		1
		1
		0
		0
		0
		0
	[nfmt]
		272
		1
		2
		.
		,
		$
	Column Head
	0
	0
[tag]
	call-out
	0
	[fnt]
		Helvetica
		160
		0
		16384
	[algn]
		1
		3
		0
		0
		0
	[spc]
		40
		180
		4
		0
		0
		1
		100
	[brk]
		0
	[line]
		8
		0
		1
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		4
		
		0
		1
		1
		0
		0
		0
		0
	[nfmt]
		272
		1
		2
		.
		,
		$
	call-out
	0
	0
[tag]
	chap number
	0
	[fnt]
		Helvetica
		720
		0
		16385
	[algn]
		1
		3
		0
		0
		0
	[spc]
		40
		520
		4
		0
		0
		4
		100
	[brk]
		0
	[line]
		17
		1680
		4
		0
		1
		1
		1
		420
		10
		1
	[spec]
		0
		2
		
		0
		1
		1
		0
		0
		0
		0
	[nfmt]
		272
		1
		2
		.
		,
		$
	chap number
	0
	0
[tag]
	Chapter Title
	0
	[fnt]
		Helvetica
		320
		0
		16385
	[algn]
		1
		3
		720
		0
		0
	[spc]
		40
		360
		4
		0
		480
		3
		100
	[brk]
		81
	[line]
		17
		8520
		3
		0
		1
		3
		1
		644
		10
		1
	[spec]
		0
		2
		
		0
		1
		1
		0
		0
		0
		0
	[nfmt]
		272
		1
		2
		.
		,
		$
	Body Text
	0
	0
[tag]
	1st Pg Footer
	0
	[fnt]
		Palatino
		180
		0
		49153
	[algn]
		2
		3
		0
		0
		0
	[spc]
		33
		273
		1
		0
		0
		1
		100
	[brk]
		0
	[line]
		8
		0
		1
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		4
		
		0
		1
		1
		0
		0
		0
		0
	[nfmt]
		272
		1
		2
		.
		,
		$
	1st Pg Footer
	0
	0
[tag]
	right footer
	0
	[fnt]
		Palatino
		180
		0
		49153
	[algn]
		4
		1
		0
		0
		0
	[spc]
		33
		216
		1
		60
		0
		3
		100
	[brk]
		32
	[line]
		8
		0
		1
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		4
		
		0
		1
		1
		0
		0
		0
		0
	[nfmt]
		272
		1
		2
		.
		,
		$
	right footer
	1
	3
	8640
	0
[tag]
	left footer
	0
	[fnt]
		Palatino
		180
		0
		49153
	[algn]
		4
		1
		0
		0
		5212
	[spc]
		33
		216
		1
		60
		0
		3
		100
	[brk]
		32
	[line]
		8
		0
		1
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		4
		
		0
		1
		1
		0
		0
		0
		0
	[nfmt]
		272
		1
		2
		.
		,
		$
	left footer
	1
	3
	8640
	0
[tag]
	Footnote
	0
	[fnt]
		Times New Roman
		180
		0
		49152
	[algn]
		1
		3
		0
		244
		0
	[spc]
		40
		2400
		3
		0
		0
		1
		100
	[brk]
		4
	[line]
		8
		0
		1
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		0
		<*:>
		0
		1
		1
		256
		0
		0
		0
	[nfmt]
		280
		1
		2
		.
		,
		$
	Footnote
	0
	0
[tag]
	Figure Title
	0
	[fnt]
		Helvetica
		180
		0
		16385
	[algn]
		1
		3
		720
		0
		0
	[spc]
		40
		220
		4
		40
		80
		4
		100
	[brk]
		80
	[line]
		8
		0
		1
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		4
		
		0
		1
		1
		0
		0
		0
		0
	[nfmt]
		272
		1
		2
		.
		,
		$
	Body Text
	0
	0
[tag]
	indent Tip
	0
	[fnt]
		Helvetica
		200
		0
		16384
	[algn]
		1
		3
		1080
		480
		0
	[spc]
		40
		240
		4
		0
		80
		4
		100
	[brk]
		4
	[line]
		8
		0
		1
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		4
		Tip
		18944
		3
		1
		1
		0
		0
		0
	[nfmt]
		272
		1
		2
		.
		,
		$
	indent tip
	0
	0
[tag]
	indent Find
	0
	[fnt]
		Helvetica
		200
		0
		16384
	[algn]
		1
		3
		1080
		1800
		0
	[spc]
		40
		240
		4
		0
		80
		4
		100
	[brk]
		4
	[line]
		8
		0
		1
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		4
		Finding Out More
		18944
		3
		1
		1
		0
		0
		0
	[nfmt]
		272
		1
		2
		.
		,
		$
	indent find
	0
	0
[tag]
	copyrt
	0
	[fnt]
		Palatino
		180
		0
		49152
	[algn]
		1
		3
		0
		0
		0
	[spc]
		24
		220
		4
		0
		60
		4
		100
	[brk]
		36
	[line]
		8
		0
		1
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		1
		
		18944
		1
		1
		0
		2
		0
		0
	[nfmt]
		280
		1
		2
		.
		,
		$
	copyrt
	4
	1
	2390
	1
	2869
	1
	3347
	1
	3826
	1200
[tag]
	seealso
	0
	[fnt]
		Helvetica
		200
		0
		16385
	[algn]
		1
		3
		720
		0
		0
	[spc]
		40
		240
		4
		80
		0
		4
		100
	[brk]
		16
	[line]
		8
		0
		1
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		2
		
		0
		1
		1
		0
		0
		0
		0
	[nfmt]
		272
		1
		2
		.
		,
		$
	seealso
	0
	0
[tag]
	crossref
	0
	[fnt]
		Palatino
		200
		0
		49152
	[algn]
		1
		3
		720
		0
		0
	[spc]
		40
		240
		4
		0
		0
		4
		100
	[brk]
		36
	[line]
		8
		0
		1
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		1
		
		18944
		1
		1
		0
		2
		0
		0
	[nfmt]
		280
		1
		2
		.
		,
		$
	crossref
	4
	1
	2390
	1
	2869
	1
	3347
	1
	3826
	0
[tag]
	popref
	0
	[fnt]
		Palatino
		200
		0
		49152
	[algn]
		513
		3
		720
		0
		720
	[spc]
		40
		240
		4
		0
		0
		4
		100
	[brk]
		36
	[line]
		8
		0
		1
		0
		1
		1
		1
		10
		10
		1
	[spec]
		0
		1
		
		18944
		1
		1
		0
		2
		0
		0
	[nfmt]
		280
		1
		2
		.
		,
		$
	popref
	4
	1
	2390
	1
	2869
	1
	3347
	1
	3826
	0
[lay]
	Standard
	3079
	[rght]
		12960
		10166
		1
		960
		1200
		3
		960
		720
		0
		1
		0
		1
		0
		2
		1
		960
		9446
		5
		1
		720
		1
		1440
		1
		2880
		1
		4320
		1
		5760
	[lft]
		12960
		10166
		1
		720
		1200
		3
		960
		960
		0
		1
		0
		1
		0
		2
		1
		720
		9206
		5
		1
		720
		1
		1440
		1
		2880
		1
		4320
		1
		5760
	[hlft]
	[lyfrm]
		1
		3008
		0
		0
		10166
		960
		0
		1
		3
		1 0 0 0 0 0 0
		0
		0
		1
	[frmlay]
		960
		10166
		1
		720
		180
		3
		480
		960
		0
		1
		0
		1
		1
		0
		1
		720
		9206
		0
	[txt]
@right footer@LotusScript Language Reference	<:X3,0;EditDate %Da>10/03/94<:X~3,0;EditDate %Da>

>
	[hrght]
	[lyfrm]
		1
		11200
		0
		0
		10166
		960
		0
		1
		3
		1 0 0 0 0 0 0
		0
		0
		2
	[frmlay]
		960
		10166
		1
		960
		180
		3
		480
		720
		0
		1
		0
		1
		1
		0
		1
		960
		9446
		0
	[txt]
@right footer@10/03/94<:f>	LotusScript Language Reference

>
	[flft]
	[lyfrm]
		1
		5056
		0
		11760
		10166
		12960
		0
		1
		3
		1 0 0 0 0 0 0
		0
		0
		3
	[frmlay]
		12960
		10166
		1
		720
		480
		3
		11940
		960
		0
		1
		0
		1
		1
		0
		1
		720
		9206
		0
	[txt]
@left footer@page <:P10,0,>	Lotus Strictly Private

>
	[frght]
	[lyfrm]
		1
		13248
		0
		11760
		10166
		12960
		0
		1
		3
		1 0 0 0 0 0 0
		0
		0
		4
	[frmlay]
		12960
		10166
		1
		960
		480
		3
		11940
		720
		0
		1
		0
		1
		1
		0
		1
		960
		9446
		0
	[txt]
@right footer@Lotus Strictly Private	page <:P10,0,>

>
[elay]
[l1]
	0
[pg]
	6
	12 185 21 0 0 0 0 200 65535 Standard	65535 0 0	0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
	27 432 81 0 0 0 0 200 65535 Standard	65535 0 0	0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
	38 431 52 32 0 0 0 200 65535 Standard	65535 0 0	0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
	55 0 24 0 1 0 0 220 65535 Standard	65535 0 0	0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
	73 83 31 32 0 0 0 240 65535 Standard	65535 0 0	0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
	89 76 25 0 0 0 0 240 65535 Standard	65535 0 0	0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
[edoc]
@Chapter Title@<:#1364,8486><:f>Chapter 2  <**>Arrays and Lists

@Ahead@<:#410,8486><:f>Arrays<:X8,1;Index "Arrays" #><:X8,1;Index "Variables" # "collection"><:X8,1;Index "Fixed arrays" #><:X8,1;Index "Dynamic arrays" #><:X8,1;Index "DIM" #><:X8,1;Index "REDIM" #><:X8,1;Index "Arrays" # "fixed"><:X8,1;Index "Arrays" # "dynamic"><:X8,1;Index "Arrays" # "dimensions of">
<:X8,1;Index "Declaring arrays" #><:X8,1;Index "Arrays" # "changing dimensions of"><:X8,1;Index "Changing array dimensions" #>

@Bhead@<:#280,8486><:f><:f>Declaring Arrays

@1st Paragraph@<:#800,8486><:f>An array is a variable that can store multiple values at the same time. If a variable can be thought of as a single location containing a value, an array can be thought of as a table of locations, each with a different value and each accessible individu
ally. All of the values in the array are of the same type. 

<:#1000,8486><:f>The locations of an array are organized into one or several dimensions. An array can have as many as eight dimensions. A dimension in a two-dimensional array can be thought of as a row or a column in the table. Arrays with more than two dimensions can b
e thought of as tables of tables, tables of tables of tables, etc. The size of the array dimensions is defined by a bounds list in the array declaration.

<:#200,8486>An array is declared like any other variable, using a Dim statement:

@mono@<:#220,8486>DIM Vols(1 TO 3, 1 TO 2)

<:#1000,8486><:f>This declaration says that Vols is an array. Each dimension of an array has a lower bound and an upper bound. The Dim statement above declares that the first dimension has a lower bound of 1 and an upper bound of 3. The lower and upper bounds of the sec
ond dimension are 1 and 2. Vols has been declared as a two-dimensional, 3-by-2 (3x2) array.

<:#400,8486>The Dim statement above declared a fixed array. Vols could alternatively be declared as a dynamic array as follows:

@mono@<:#220,8486>DIM Vols()

<:#600,8486><:f>This declaration omits any specification of the dimensions of Vols and their size. (For details about the difference between these definitions of Vols, see 
</S>Fixed arrays and dynamic arrays</T>.)

<:#600,8486><:f>The fixed array Vols declared as above has six elements. They are designated by Vols(<+">n<-">,<+">m<-">), where 
<+">n<-"> is between 1 and 3 inclusive, and <+">m<-"> iss between 1 and 2 inclusive. The six elements are:

@mono@<:#220,8486>Vols(1,1), Vols(1,2), Vols(2,1), Vols(2,2), Vols(3,1), Vols(3,2)

<:#600,8486><:f>That is, each element of an array has the form of a subscripted array name, such as Vols(2,1). Here the subscripts are 2 and 1. The parenthesized unit (2,1) is also called a subscript list.

<:#400,8486><:f>Each element of Vols holds a separate value. Each is like an ordinary (non-array) variable. For example, this statement assigns a number to one element of Vols:

@mono@<:#220,8486>Vols(2,2) = 27.7

@Bhead@<:#280,8486><:f>Assigning Arrays and Array Elements to Variables

<:#200,8486>This statement assigns the current value of Vols(3,1) to the variable X:

@mono@<:#220,8486>X = Vols(3,1)

<:#600,8486>You can assign a defined array to a Variant variable. The following example assigns the array Vols to the Variant variable Y. After the assignment, Vols and Y contain the same array data.

@mono@<:#660,8486><**>Vols(2,2) = 27.7<**>Y = Vols<**>Print Y(2,2)		'Prints 27.7

<:#400,8486><:f>A Variant cannot be assigned to an array, even if the Variant contains an array. For example, the last statement below generates an error:

@mono@<:#1100,8486>Dim firstArray(3)<**>Dim secondArray(3)<**>Dim var As Variant<**>var = firstArray<**>secondArray = var			'An error

<:#400,8486>One array cannot be assigned to another. Continuing the example above, the following statement generates an error:

@mono@<:#220,8486>firstArray = secondArray	'An error

@Bhead@<:#280,8486>Defining the Data Type of an Array

<:#1200,8486>Like any variable, an array variable has a data type. The data type is established in the same way as for an ordinary variable. The type can be a user-defined type or class, as well as one of the built-in types. It is Variant if no type (either a data type 
name, or a data type suffix character) is included in the array declaration and no Def<+">type<-"> statement applies to the array name. Thus Vols as declared by the Dim statement above is Variant. This Dim statement declares Vols to be a Double array variab
le:

@mono@<:#220,8486>DIM Vols(1 TO 3, 1 TO 2) AS DOUBLE

<:#600,8486><:f>Each element of an array has the same data type as the array. That is, Vols(1,1), Vols(1,2), and so on, hold Double values. When Vols is declared, the elements are initialized to 0 like any variable of Double data type.

<:#400,8486><:f>In summary, this array declaration above declares the basic information about an array:  

@bullet@<:#240,8486>It declares that the name Vols is the name of an array.

@bullet@<:#480,8486>Vols is two-dimensional. The length of the first dimension is 3, and the length of the second dimension is 2.

@bullet@<:#480,8486>The elements of Vols are Vols(<+">n<-">,<+">m<-">), with <+">n<-"> ranging from 1 to 3 and 
<+">m<-"> ranging from 1 to 2.

@bullet@<:#240,8486>Vols is a Double variable. The elements of Vols hold Double values.

@Chead@<:#240,8486><:f>Example

@mono@<:#2860,8486>DIM SampleArray(0 TO 3, 0 TO 3) AS DOUBLE<**>DIM X AS DOUBLE, Y AS DOUBLE, Z AS DOUBLE<**><**>SampleArray(0,0) = 1.0	'Assign values to array elements<**>SampleArray(1,0) = 2.0<**>SampleArray(2,0) = 3.0<**><**>X = SampleArray(0,0)		'Retrieve values from arra
y elements<**>Y = SampleArray(1,0)<**>Z = SampleArray(2,0)<**><**>SampleArray(3, 3) = X + Y + Z + SampleArray(3, 0)<**>PRINT SampleArray(3, 3)	'Prints 6

@mono@<:#660,8486>DIM var AS VARIANT<**>var = SampleArray<**>PRINT var(3, 3)			'Prints 6

<:#1200,8486><:f>A two-dimensional array SampleArray is declared. This array is 4x4. The Dim statement for the array initializes all elements to 0.0. Values are assigned to three array elements, and then retrieved into three variables. The sum of these plus the initial 
value 0.0 of SampleArray(3,0) is assigned to SampleArray(3,3), and this is printed.  In the final group of statements, the SampleArray is assigned to var, a Variant variable. The SampleArray and var contain the same array data.

@Bhead@<:#280,8486><:f>Array Dimension Bounds

@1st Paragraph@<:#400,8486><:f>The lower and upper bounds of an array dimension can be any numeric constant between -32768 and 32767 inclusive. For example

@mono@<:#220,8486>DIM Vols(-1 TO 1, 0 TO 3)

<:#600,8486><:f>The subscripts for the first dimension of Vols range from -1 to 1 (three values), and for the second dimension from 0 to 3 (four values). Vols is an array of 12 elements (3x4). Its elements are designated:

@mono@<:#880,8486>Vols(-1,0), Vols(0,0), Vols(1,0),<**>Vols(-1,1), Vols(0,1), Vols(1,1),<**>Vols(-1,2), Vols(0,2), Vols(1,2),<**>Vols(-1,3), Vols(0,3), Vols(1,3)

<:#600,8486><:f>LotusScript maintains a default value for the lower bound of array dimensions. This means that you can declare an array without specifying a lower bound for any dimension:

@mono@<:#220,8486>DIM Vols(3, 2)

<:#400,8486><:f>The default lower bound is either 0 or 1. So the Dim statement just shown has the same effect as one or the other of these statements:

@mono@<:#440,8486>DIM Vols(0 TO 3, 0 TO 2)<**>DIM Vols(1 TO 3, 1 TO 2)

<:#200,8486><:f>You use the Option Base<+!> <-!>statement to set the default, as follows:

@bullet@<:#480,8486>If your script contains the statement Option Base 0, the default lower bound for an array dimension is 0

@bullet@<:#240,8486>If your script contains the statement Option Base 1, the default is 1

<:#200,8486><:f>The default is 0 if the script contains no Option Base statement at all.

<:#800,8486><:f>The default applies to any dimension where the lower bound is not specified. For example, suppose that the default in your script is 0. This declaration of a four-dimensional array uses the default of 0 for the second and third dimensions, and specifies
 an explicit lower bound for the first and fourth dimensions:

@mono@<:#220,8486>DIM Vols(2 TO 4, 2, 5, 0 TO 4)

<:#600,8486><:f>The lower bound of an array dimension must be less than (or equal to) the upper bound. So the specification of the first dimension in this declaration is wrong; it will generate an error:

@mono@<:#220,8486>DIM Vols(3 TO 1, 1 TO 2)

@Bhead@<:#280,8486><:f>Number of Array Dimensions

@1st Paragraph@<:#200,8486><:f>An array can have from one to eight dimensions.

<:#600,8486><:f>The dimensions of any array are determined by the first statement with a subscript list, whether that is the declaration, a ReDim statement, or a reference to an array element.

<:#200,8486><:f>See </S>Fixed arrays and dynamic arrays</T>.

@Bhead@<:#280,8486><:f>Array Size and Storage Requirements

@1st Paragraph@<:#400,8486><:f>LotusScript imposes a limit of 64K bytes on storage for an array. You should not attempt to create an array that requires more memory.

<:#600,8486><:f>The memory needed for an array depends on the size of the array, and the storage needed for an element of the array. The size of an array is the total size of the elements in it. It is the product of the sizes of all the dimensions. For example:

@mono@<:#220,8486>DIM Vols(4,9,1) AS SINGLE

<:#200,8486><:f>Suppose that the default lower bound for array dimensions is 0. Then:

@bullet@<:#480,8486>The subscripts range from 0 to 4, from 0 to 9, and from 0 to 1, respectively, for the three dimensions of Vols

@bullet@<:#240,8486>The dimensional lengths are 5, 10, and 2

@bullet@<:#240,8486>Vols is an array of 5x10x2 or 100 elements

<:#600,8486><:f>The actual storage needed for all the elements of Vols is 4x100 bytes, since one value of Single data type needs 4 bytes. To assign values to the elements of the array Twine (declared as follows), LotusScript needs storage for 12x100 characters:

@mono@<:#220,8486>DIM Twine(4,9,1) AS STRING * 12

<:#600,8486><:f>Each element of Twine is declared to hold a 12-character string. The actual number of bytes needed for this depends on the amount of storage needed for a single character (usually two bytes).

@Bhead@<:#280,8486><:f>Fixed Arrays and Dynamic Arrays

@1st Paragraph@<:#200,8486><:f>Every array is either a fixed array or a dynamic array. 

@bullet@<:#480,8486>A fixed array is declared once. The size of a fixed array is set when the array is declared. It cannot be changed.

@bullet@<:#720,8486>A dynamic array is declared once, but its size can be modified many times. The values of the elements of the array can be reinitialized or preserved each time it is resized.

<:#200,8486><:f>A fixed array is declared differently from a dynamic array.

@bullet@<:#720,8486><:f>To declare a fixed array, use a Dim statement as shown in the examples above, or one of the variations on Dim that begins with Private, Public, or Static. All of the arrays previously illustrated are fixed arrays.

@bullet@<:#480,8486><:f>To declare a dynamic array, use a Dim statement with an empty subscript list (empty parentheses). For example: 

@mono@<:#220,8486><:f,QCourier,>		DIM Vols() AS INTEGER

@1st lev para@<:#960,8486><:f>Since this Dim statement has no information about the array dimensions, the only effect of the statement is to reserve the name Vols as the name of a dynamic array (with data type Integer). To declare that a dynamic array should be Private, Public, or S
tatic, use the appropriate alternative form. For example:

@mono@<:#220,8486><:f,QCourier,>		STATIC Vols() AS INTEGER

@1st lev para@<:#1200,8486><:f>A dynamic array declared by Dim (or Private, etc.) has no dimensions or elements, and no storage is allocated for it. The array is unusable until it appears in a later ReDim statement. The first ReDim statement enables LotusScript to define the array ty
pe and dimensions, and allocate storage for the elements and initialize them:

@mono@<:#220,8486><:f,QCourier,>		REDIM Vols(4,2,300)

@1st lev para@<:#720,8486><:f>Now Vols is usable. Vols is now also permanently defined to be 3-dimensional. At any later time, another ReDim statement can change the array bounds of each dimension, but not the dimensionality:

@mono@<:#220,8486><:f,QCourier,>		REDIM Vols(5,2,100)

@1st lev para@<:#240,8486><:f>LotusScript reallocates storage for Vols when this statement is encountered.

@1st lev para@<:#960,8486><:f>You can also use a ReDim statement as the first declaration of a dynamic array. However, this is not recommended. A ReDim statement is executable, and it should typically not be used at the module level, since it will be discarded during compilation.

<:#400,8486><:f>The data type of any array cannot be changed. It is established when the array is first declared.

<:#200,8486>To use an array in your script:

@bullet@<:#480,8486>Use a fixed array if you can pre-determine its number of dimensions and the bounds of each dimension.

@1st lev para@<:#480,8486>The fixed array is convenient when an array of a constant size is needed throughout the script.

@bullet@<:#720,8486><:f>Use a dynamic array if you want to defer declaring the number of dimensions until runtime, or want to vary the array size at one or more points during execution of the script.

@1st lev para@<:#720,8486><:f>The dynamic array is convenient when an array needs to shrink or grow at runtime. If the amount of array storage needed will shrink, the dynamic array is a way to recover storage that might be reallocated for other purposes.

<:#600,8486><:f>You can use the Erase statement to recover all of the storage currently allocated to a dynamic array. Applied to a fixed array, the Erase statement reinitializes only the array elements.

@Chead@<:#240,8486><:f>Related topics

@popref@<:#240,8486><:f>Variables

@popref@<:#240,8486><:f>Limits on Array Variables

@popref@<:#240,8486><:f>Dim, Private, Public, and Static Statements: to declare a variable

@popref@<:#240,8486>Erase Statement: to erase an array, a list, or a list element

@popref@<:#240,8486>IsArray Function: to determine whether a Variant variable contains an array

@popref@<:#240,8486>Option Base Statement: to set the default lower bound for array dimensions

@popref@ReDim Statement: to set or change the size of a dynamic array<:p<* >>

@Ahead@<:#410,8486><:f>Lists<:X8,8;Index "Lists" #><:X8,8;Index "Variables" # "collection"><:X8,8;Index "List tags" #>

@1st Paragraph@<:#800,8486><:f>A list is a one-dimensional collection of data. It is similar to a one-dimensional array. However, each element is accessed by a unique name, a list tag, rather than by a subscript value as in a one-dimensional array. Also unlike an array, a list grows 
as elements are added to it, and shrinks as elements are deleted from it.

@bullet@<:#240,8486><:f>A list initially contains no elements.

@bullet@<:#480,8486>A list grows as needed to accommodate the values you assign to it. That is, assigning a value to a non-existent list element adds that element to the list.

@bullet@<:#720,8486>Referencing a non-existent list element as a value generates an error. You can use the IsElement function to test whether there is an element with a particular list tag in a particular list.

@bullet@<:#480,8486>A list tag is a string name for a list element. It is specified when the element is placed in the list.

@bullet@<:#480,8486>Each element of a list has a list tag that is unique in the set of list tags for the list. Each element is accessed by its list tag.

@bullet@<:#720,8486>List tags are case-sensitive or case-insensitive, depending on case sensitivity of string comparison in the module where the list is declared. Case sensitivity is established by the Option Compare statement.

@bullet@<:#480,8486>A number can be used as a list tag, but it will be automatically converted to a string when it is used.

@bullet@<:#480,8486>A data type can be specified in the declaration of a list. The default data type is Variant. Each element of a list has the same data type as the list.

@Chead@<:#240,8486><:f>Example

<:#200,8486><:f>The following statement declares a list named Address:

@mono@<:#220,8486>DIM Address LIST AS STRING

<:#400,8486><:f><:f><:f>According to the declaration, every element in the list Address will have the data type String.

<:#200,8486>Initially, the list is empty. To put addresses in the list, we assign to the list as follows:

@mono@<:#440,8486>Address("Jacob") = "39 Derry St"	'Adds an element, with list tag<**>											'"Jacob"

@mono@<:#440,8486>Address("Vera") = "455 Dean St" 	'Adds an element, with list tag<**>											'"Vera"

<:#200,8486><:f><:f>Values are retrieved from the list using the list tags to refer to the elements:

@mono@<:#220,8486>PRINT Address("Jacob")	'Prints the string "39 Derry St"

<:#400,8486><:f>It is an error to refer to a non-existing list element as a value (that is, to use a list tag that has not been defined for the list):

@mono@<:#220,8486>PRINT Address("Bill")	'Error

<:#600,8486><:f>A list can contain instances of classes and user-defined types, as well as the built-in types. For example, suppose that Description is a class. Then the following DIM statement declares Desc as a list of instances of Description:

@mono@<:#660,8486>DIM Desc LIST AS Description	'Every element added to Desc will be<**>								'an instance of the class<**>								'Description or NOTHING

<:#600,8486><:f><:f>An assignment statement adds an element to the list. Because an element of Desc is an object, the assignment of a value to a list element uses the Set statement. The following statement creates a description for John, with red hair and brown eyes; a
nd assigns it.

@mono@<:#440,8486>SET Desc("John") = NEW Description("Red", "Brown")<**>PRINT Desc("John").HairColor	 'Print John's haircolor, "Red"

<:#600,8486>You can assign a list to a Variant variable. This following example assigns the array Desc to the Variant variable Y. After the assignment, Desc and Y contain the same list data

@mono@<:#440,8486>Y = Desc<**>Print Y("John").HairColor		'Print John's haircolor, "Red"

<:#400,8486><:f>A Variant cannot be assigned to an list, even if the Variant contains a list. For example, the last statement below generates an error:

@mono@<:#1100,8486>Dim firstList List<**>Dim secondList List<**>Dim var As Variant<**>var = firstList<**>secondList = var			'Error

<:#400,8486>One list cannot be assigned to another. Continuing the example above, the following statement generates an error:

@mono@<:#220,8486>firstList = secondList	'Error

@Chead@<:#240,8486>Related topics

@popref@<:#240,8486><:f>Arrays

@popref@<:#240,8486>Dim, Private, Public, and Static Statements: to declare a variable

@popref@<:#240,8486>Erase Statement: to erase an array, a list, or a list element

@popref@<:#480,8486><:f>ForAll...End ForAll Statement:  to execute a block of statements repeatedly for each element of an array or a list

@popref@<:#240,8486><:f>IsElement Function

@popref@<:#240,8486>IsList Function: to determine whether a Variant variable contains a List

@popref@<:#240,8486>Let Statement: to assign a value to a variable

@popref@<:#240,8486>ListTag Function

@popref@<:#240,8486>Set Statement: to assign an object reference to a variable<:f>

@popref@<:#240,8486>

>

[Embedded]
00036646
