Typecasts

Strings passed to SDL subroutines must be null-terminated (of type PChar in Pascal). This may be achieved either by declaring the variable to be passed as type PChar from the outset or by performing a typecast on a variable of type string. As its name suggests, a typecast (or sometimes just cast) converts one type of variable into another.

For example, the instruction PChar(MyString) converts the ordinary Pascal string MyString to a PChar string.

An example of an SDL function with a PChar parameter is declared as follows.
function SDL_LoadBMP(filename : PChar) : PSDL_Surface;   
 
Programming - a skill for life!

How to use SDL parameters such as flags and PChar strings