Continuity of the restriction of a function to a set

Let $ X$ be a topological space and $ f$ a real-valued function defined on $ X$ . Let $ S\subset X$ and suppose $ f$ is continuous with respect to the induced topology on $ S$ (opens are in the form $ S\cap V$ , where $ V$ is an open of $ X$ ). Is this the same as saying that the restriction of $ f$ to $ S$ is continuous?