  A function $f:X\to Y$ between topological spaces is called {\em
compact-preserving} if the image $f(K)$ of each compact subset $K\subset X$ is
compact. We prove that a function $f:X\to Y$ defined on a strong Frechet space
$X$ is compact-preserving if and only if for each point $x\in X$ there is a
compact subset $K_x\subset Y$ such that for each neighborhood $O_{f(x)}\subset
Y$ of $f(x)$ there is a neighborhood $O_x\subset X$ of $x$ such that
$f(O_x)\subset O_{f(x)}\cup K_x$ and the set $K_x\setminus O_{f(x)}$ is finite.
This characterization is applied to give an alternative proof of a classical
characterization of continuous functions on locally connected metrizable spaces
as functions that preserve compact and connected sets. Also we show that for
each compact-preserving function $f:X\to Y$ defined on a (strong) Fr\'echet
space $X$, the restriction $f|LI'_f$ (resp. $f|LI_f)$ is continuous. Here
$LI_f$ is the set of points $x\in X$ of local infinity of $f$ and $LI'_f$ is
the set of non-isolated points of the set $LI_f$. Suitable examples show that
the obtained results cannot be improved.
