```    Program f08ah_t1w_fe

!     F08AH_T1W_F Example Program Text
!     Mark 27 Release. NAG Copyright 2019.

!     .. Use Statements ..
Use iso_c_binding, Only: c_ptr
Use nag_library, Only: nag_wp, x04caf
!     .. Implicit None Statement ..
Implicit None
!     .. Parameters ..
Integer, Parameter               :: nin = 5, nout = 6
!     .. Local Scalars ..
Integer                          :: i, ifail, info, j, lda, lwork, m, n
!     .. Local Arrays ..
Type (nagad_t1w_w_rtype), Allocatable :: a(:,:), a_in(:,:), tau(:),      &
work(:)
Real (Kind=nag_wp), Allocatable  :: dlda(:,:), l(:,:)
!     .. Executable Statements ..
Write (nout,*) 'F08AH_T1W_F Example Program Results'
!     Skip heading in data file
lda = m
lwork = 64*n
Allocate (a(lda,n),a_in(lda,n),l(m,m),dlda(m,n),tau(n),work(lwork))

ifail = 0

!     Read A from data file

Do i = 1, m
Do j = 1, n
End Do
End Do

a = a_in
Do i = 1, n

!       Compute the LQ factorization of A
!       The NAG name equivalent of dgelqf_t1w is f08ah_t1w_f

Do j = 1, m
End Do
If (i==1) Then
l(1:m,1:m) = a(1:m,1:m)%value
!         Print L

!         ifail: behaviour on error exit
!                =0 for hard exit, =1 for quiet-soft, =-1 for noisy-soft
ifail = 0
Call x04caf('Lower','Non',m,m,l,m,'L from LQ factorization of A',    &
ifail)
End If
a = a_in
End Do

Write (nout,*)
Write (nout,*) 'Derivatives of diagonal of L w.r.t. first row of A'
ifail = 0
Call x04caf('General',' ',m,n,dlda,m,'dL_ii/dA_1j',ifail)

!     Remove computational data object