Hello,\r\n\r\nI wrote the following code (reading.txt in attachment) to read the header of a ppm file. Modelsim throws me an error during the compilation: \r\nreading.vhd(54): (vcom-1282) Cannot reference file "ppm_file" inside pure function "readheader".\r\n\r\nI don't know how to solve it and I don't want to put the code of the function ReadHeader in the process. It seems to be linked to the passing of the file parameter and MODELSIM (see below). A problem of type ?\r\n\r\nThanks in advance for your help.\r\n\r\nI have made some additional tests to see where the problem comes from. I was surprised to see that my file could be compiled with GHDL and works fine with it. So my problem is clearly related to MODELSIM (6.5 PE).