In the book Modern Digital and Analog Communication Systems by B.P. Lathi and Z. Ding, on page 21, the authors wrote: "A necessary condition for the energy to be finite is that the signal amplitude $\to 0$ as $|t| \to \infty$."
The energy of signal $g(t)$ is defined as $$ E_g = \int_{-\infty}^{\infty} |g(t)|^2 dt. $$
However, there exist positive continuous functions that do not tend to $0$ but the integral is finite.
Am I missing something, or is the statement wrong?
Edit: After thinking a while about this, I think the phrase could be corrected by "A necessary condition for the energy to be finite is that the essential limit superior of the signal amplitude $\to 0$ as $|t| \to \infty$."
This includes the case for which the limit does not exist but the integral still converges. The essential supremum captures what really matters in the tail of the function.
Perhaps that is what Lathi thought when writing the sentence, and, of course, it is not sensible to use this terminology in an undergraduate book.