If I change the

Code:
viewport: array[0..3] of GLint;
into

Code:
 
GLVWarray = array[0..3] of GLInt;

viewport: GLVWarray;
the compiler accepts it. Now let me check whether it works. Thanks so far, I'll get back to you.