George Neuner sez:
> On Mon, 19 Jun 2006 22:02:55 +0000 (UTC), Dimitri Maziuk
><[EMAIL PROTECTED]> wrote:
>
>>Yet Another Dan sez:
>>
>>... Requiring an array index to be an integer is considered a typing 
>>> problem because it can be checked based on only the variable itself, 
>>> whereas checking whether it's in bounds requires knowledge about the array.
>>
>>You mean like
>> subtype MyArrayIndexType is INTEGER 7 .. 11
>> type MyArrayType is array (MyArrayIndexType) of MyElementType
>>
>
> If the index computation involves wider types it can still produce
> illegal index values.  The runtime computation of an illegal index
> value is not prevented by narrowing subtypes and cannot be statically
> checked.

My vague recollection is that no, it won't unless _you_ explicitly code an
unchecked type conversion. But it's been a while.

HTH
Dima
-- 
I have not been able to think of any way of describing Perl to [person]
"Hello, blind man?  This is color."                                      -- DPM
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to