[OT] The Usual Arithmetic Confusions
Timon Gehr
timon.gehr at gmx.ch
Fri Feb 18 05:25:24 UTC 2022
On 18.02.22 05:32, Walter Bright wrote:
> On 2/17/2022 8:31 PM, Walter Bright wrote:
>> On 2/17/2022 4:07 PM, deadalnix wrote:
>>> Then you don't get to know the length of a slice, this is going to be
>>> really limiting really quick.
>>
>> cast(ptrdiff_t)length
>
> ptrdiff_t len = array.length;
>
> also works.
Except perhaps for somewhat long arrays in a 32-bit program.
More information about the Digitalmars-d
mailing list