Re: printing values of "arrays of pointers"
- From: Nick Keighley <nick_keighley_nospam@xxxxxxxxxxx>
- Date: Tue, 6 May 2008 07:04:00 -0700 (PDT)
On 6 May, 14:44, Richard Heathfield <r...@xxxxxxxxxxxxxxx> wrote:
Nick Keighley said:
On 2 May, 14:44, Richard Heathfield <r...@xxxxxxxxxxxxxxx> wrote:
<snip>
Since arr_p[0] points to i, we're looking for the value of >
i. That value is indeterminate, because the object i never had a value
assigned to it.
not even in the for loop?
Oops - good spot - apologies to OP.
some languages make it UB to acces the for loop variable
outside the loop (I think- Pascal, Alogol-60 and Ada)
but I think it is guaranteed to point one past the end
of the array after exiting from a "normal" for-loop.
(I can't be arsed to define the exit value in Standarese).
--
Nick Keighley
.
- Follow-Ups:
- Re: printing values of "arrays of pointers"
- From: CBFalconer
- Re: printing values of "arrays of pointers"
- From: Keith Thompson
- Re: printing values of "arrays of pointers"
- References:
- printing values of "arrays of pointers"
- From: arnuld
- Re: printing values of "arrays of pointers"
- From: Richard Heathfield
- Re: printing values of "arrays of pointers"
- From: Nick Keighley
- Re: printing values of "arrays of pointers"
- From: Richard Heathfield
- printing values of "arrays of pointers"
- Prev by Date: Re: printing values of "arrays of pointers"
- Next by Date: Re: Problem with SYS_mount
- Previous by thread: Re: printing values of "arrays of pointers"
- Next by thread: Re: printing values of "arrays of pointers"
- Index(es):
Relevant Pages
|