content_image/789099.jpg content_image/789098.jpg
Warning: if a record variable pi i' created by the second form of New, then this variable must not change Iii" variant during program execution. Assignment to the entire variable i I an error; however one can assign to the components of pi. 

The first step in programmin I~ a solution to our problem posed above, is to introduce a pointer var lable. Let it be called NewP. Then the statement 

allocates a new variable of type PI [son. 

New(NewP) 

Next the new variable, referenced by the pointer NewP, is to be inserted after the person referenced by Pt. See Figure 1O.d. 

<img src='content_image/789099.jpg'>

Insertion is a simple matter of changing the pointers: 

Figure 10.e illustrates the result. 

Newpi.Next := Pti.Next; Pti.Next := NewP 

<img src='content_image/789098.jpg'>

