[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Typo?
[Thread Prev] | [Thread Next]
- Subject: Re: Typo?
- From: Bruce Steers <bsteers4@xxxxxxxxx>
- Date: Mon, 17 Nov 2025 14:11:05 +0000
- To: user@xxxxxxxxxxxxxxxxxxxxxx
On Mon, 17 Nov 2025 at 13:39, Gianluigi <gradobag@xxxxxxxxxxx> wrote:
> Benoit, Fabien,
>
> In the DocumentView class, on line 983 of the Public Sub _get(Index As
> Integer) As _DocumentItem function, there's this statement: If Index < 0
> Or If Index >= $iCount Then Error.Raise("Bad argument")
> Is this a typo?
>
> Best regards
> Gianluigi
I didn't check the context of the code but that looks pretty normal to me.
Maximum allowed array Index would normally be Count - 1 so "If Index >=
$iCount" makes sense to be a bad index value.
Or do you see another reason the code may be wrong?
If i was to fix any typo it would be to say "Bad index" not "Bad argument"
just to be more descriptive.
Respects
BruceS
| Re: Typo? | Gianluigi <gradobag@xxxxxxxxxxx> |
| Typo? | Gianluigi <gradobag@xxxxxxxxxxx> |