First of all I want to underline that LaTeX already has a mechanism for the most frequent cases when “delayed definitions” are needed. If you want to use a generated number even before the place where it's generated, or the page number where the event occurs, you just place \label{<string>} after the command that generates the number and you can print the generated number by \ref{<string>} or the page number by \pageref{<string>}.
A generated number is, for instance, a section number or the item number in an enumerate and so on.
It's not possible to use a command before it has been defined, because TeX proceeds with tokens one at a time (and macros can change their meaning any time). The mechanism above works by writing a note in the .aux file, so the “delayed item” will be known only at the next LaTeX run. This might look annoying, but no document is ever finished at the first LaTeX run, so this is really not a problem.
You can even abuse the above mechanism:
\newcounter{laterdef} % just a dummy counter
\newcommand{\laterdef}[2]{%
\renewcommand\thelaterdef{#2}%
\refstepcounter{laterdef}\label{#1}%
}
Here's a full example, where the text has special commands (accents here) to show that no particular protection is needed in general; some commands may need \protect in front of them (look on the site for “fragile command”).
\documentclass{article}
\newcounter{laterdef} % just a dummy counter
\newcommand{\laterdef}[2]{%
\renewcommand\thelaterdef{#2}%
\refstepcounter{laterdef}\label{#1}%
}
\begin{document}
This is some text where we want to
use something that will be known only
later: \ref{test}.
Here is text that follows.
Now we define the contents needed
above.
\laterdef{test}{Na\"ive Stra\ss e}
\end{document}
During the LaTeX run you may see the following messages on the console:
LaTeX Warning: Reference `test' on page 1 undefined on input line 13.
LaTeX Warning: There were undefined references.
LaTeX Warning: Label(s) may have changed. Rerun to get cross-references right.
If you later change the text in \laterdef, you'll just see the last message; the first two happens when a reference is not yet known.
The first LaTeX run will produce

where the unknown text has been replaced by ??
The next LaTeX run will produce instead

If you're bold and want to define a mechanism yourself, you can:
\documentclass{article}
\makeatletter
\newcommand{\lateruse}[1]{%
\@ifundefined{late@#1}{??}{\@nameuse{late@#1}}%
}
\newcommand\laterdef[2]{%
\protected@write\@auxout{}{%
\global\string\@namedef{late@#1}{#2}%
}%
}
\makeatother
\begin{document}
This is some text where we want to
use something that will be known only
later: \lateruse{test}.
Here is text that follows.
Now we define the contents needed
above.
\laterdef{test}{Na\"ive Stra\ss e}
\end{document}
.auxfile for the macro\testhave the desired value at the next run of LaTeX. Can you please be some more specific about your need? – egreg Jun 01 '15 at 21:00