[pascal]type
PUint8array = ^TUint8array;
TUint8array = array[0..MaxInt div SizeOf(Uint - 1] of Uint8;
var
keystate : PUint8array; // PUint8;
begin
keystate := SDL_GetKeystate(nil);
SDL_PumpEvents();

if (keystate[SDLK_q] <> 0) then { error here: array type required}
exit;
.....
[/pascal]

if this will not work (I have not checked), then try this:
[pascal]var
keystate : PUint8;
...
if (PUint8array(keystate)[SDLK_q] <> 0) then
...
[/pascal]


-MDelphi is it the same as putting {$MODE DEPHI} at the beginning of the program??
Yes