2026-07-072026-07-07http://salesiana.dossiersoluciones.com/handle/123456789/63768Let us call a function $f$ from a space $X$ into a space $Y$ preserving if the image of every compact subspace of $X$ is compact in $Y$ and the image of every connected subspace of $X$ is connected in $Y$. By elementary theorems a continuous function is always preserving. Evelyn R. McMillan proved in 1970 that if $X$ is Hausdorff, locally connected and Frechet, $Y$ is Hausdorff, then the converse is also true: any preserving function $f:X\to Y$ is continuous. The main result of this paper is that if $X$ is any product of connected linearly ordered spaces (e.g. if $X = R^κ$) and $f:X \to Y$ is a preserving function into a regular space $Y$, then $f$ is continuous.26 pages. This article has been submitted for publication to Fundamenta MathematicaeGeneral Topology54C05, 54D05, 54F05, 54B10Characterizing continuity by preserving compactness and connectednesstext