library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; use std.textio.all; package pkg is impure function f1( path : string ) return string; impure function f1( file f : text ) return string; end package pkg; package body pkg is impure function f1( path : string ) return string is file f : text open read_mode is path; begin return f1(f); end function; impure function f1( file f : text ) return string is variable ef : boolean := false; begin ef := endfile(f); if (ef = TRUE) then return "true"; else return "false"; end if; end function; end package body pkg;