On Mon, Jul 19, 2010 at 7:24 PM, Wolfgang Schuster <schuster.wolfgang@googlemail.com> wrote:
 Am 19.07.10 13:30, schrieb luigi scarso:

The '*last' mode is enabled when context needs the maximal number of runs for your document.

\definetwopasslist{last}
\starttext
\gettwopassdata{last}
\iftwopassdatafound
 \savetwopassdata{last}{1}{\number\numexpr\twopassdata+1\relax}
\else
 \savetwopassdata{last}{1}{1}
\fi
\doifnotmode{*last}{not }the last run
\stoptext

Wolfgang


Hm.
From core-sys.mkiv:

\appendtoks
    \ifcase\@@svn
        %                        % 0 : unknown
    \or
        \setsystemmode\v!first   % 1 : first run
    \or
        %                        % 2 : successive run
    \or
        \setsystemmode\v!first   % 3 : first and only run
    \or
        \setsystemmode\v!last    % 4 : (extra) last run
    \fi
\to \everysetupsystem

I suppose that last=4 runs
But the max number of runs is 8 , if I've understood  mtx-context.lua 
So 
\starttext
%%
%% content here
%%
\startmode[LAST]\myNullMacro\stopmode%
\stoptext

#> context mydocument.tex && context --mode=LAST mydocument.tex

ensure that the code inside \startmode[LAST]...\stopmode  is really seen the "last " pass

--
luigi