This message was edited by the iDaZe at 2002-3-29 14:10:48
: i have the following code:
:
: const
: Sizes:array[0..10] of string=('Junior,Small,Medium,Large',
: 'Junior,Adult','Junior,Adult','Junior,Adult');
:
: apparently my number of elements differs from my declaration. can anyone help me by telling me how many elements i have and what i should put in my declaration? i thought i had it right... :(
:
You have 4 elements:
'Junior, Small, Medium, Large',
'Junior, Adult',
'Junior, Adult',
'Junior, Adult'
See, you only have 4 sets of ', so only 4 strings
'Junior',
'Small',
'Medium',
'Large',
'Junior',
'Adult',
'Junior',
'Adult',
'Junior',
'Adult'
That are 10 strings, each one between it's own set of '
Style tip:
You might want to add some spaces behind each comma, put each element on a new line, etc ... Just to make your code more readable, you'll catch errors easier that way
btw, [0..10] declares an array of 11 elements, [0..9] is for 10