anchor.diff:  goto :eof
   
   :#----------------------------------------------------------------------------#
  +
  +:testLogFunc
  +%FUNCTION%
  +%ECHO% This is myFunc
  +%POPARG%
  +set "RET=!ARG!"
  +%POPARG%
  +set "VAR=!ARG!"
  +if defined VAR %UPVAR% !VAR! & %POPARG% & set "!VAR!=!ARG!"
  +%RETURN% !RET!
  +
  +:testLog
  +call :Debug.SetLog t.log
  +
  +call :testLogFunc
  +call :testLogFunc 0
  +call :testLogFunc 1
  +call :testLogFunc 0 RESULT Zero
  +call :testLogFunc 0 TOTO "0 + 0 = La tte  Toto"
  +set "STRING=@||&&(())<<>>^^^^,,;;  %%%%^!^!**??[[]]==~~''%%CD%%_^!CD^!"
  +call :testLogFunc 0 RESULT "!STRING:%%=%%%%!"
  +exit /b 0
  +
  +:#----------------------------------------------------------------------------#
   :#                                                                            #
   :#  Function        Main                                                      #
   :#                                                                            #
  
positive.code: %IF_DEBUG% goto :Echo
  goto :Echo.Log
  
  :Echo.Eval2DebugOut %*=String with variables that need to be evaluated first
  :# Must be called with delayed expansion on, so that !variables! within %* get expanded
  %>DEBUGOUT% echo.%INDENT%%*
  goto :eof
  
  :Echo.2DebugOut	%*=String to output to the DEBUGOUT stream
  setlocal DisableDelayedExpansion &:# Make sure !variables! do _not_ get expanded
  set ^"ARGS=%*^" &:# ^carets within "quoted" strings get doubled.
  if defined ARGS set ^"ARGS=%ARGS:^^=^%^"
  %>DEBUGOUT% echo.%INDENT%%ARGS%
  goto :eof
  
  :Echo.Eval2LogFile %*=String with variables that need to be evaluated first
  :# Must be called with delayed expansion on, so that !variables! within %* get expanded
  %>>LOGFILE% echo.%INDENT%%*
  goto :eof
  
  :Echo.2LogFile %*=String to output to the LOGFILE
  setlocal DisableDelayedExpansion &:# Make sure !variables! do _not_ get expanded
  set ^"ARGS=%*^" &:# ^carets within "quoted" strings get doubled.
  if defined ARGS set ^"ARGS=%ARGS:^^=^%^"
  %>>LOGFILE% echo.%INDENT%%ARGS%
  goto :eof
  
  :# Echo and log variable values, indented at the same level as the debug output.
  
negative.code:       ) %\n%
        call set "DEBUG.MSG=%'!%DEBUG.MSG:%%=%%DEBUG.excl%%%'!%" %# Change all percent to ! #%  %\n%
        if defined ^^%>%DEBUGOUT ( %# If we use a debugging stream distinct from stdout #% %\n%
  	%!%LCALL%!% :Echo.Eval2DebugOut DEBUG.MSG %# Use a helper routine, as delayed redirection does not work #% %\n%
        ) else ( %# Output directly here, which is faster #% %\n%
  	for /f "delims=" %%c in ("%'!%INDENT%'!%%'!%DEBUG.MSG%'!%") do echo %%c%# Use a for loop to do a double !variable! expansion #%%\n%
        ) %\n%
        if defined LOGFILE ( %# If we have to send a copy to a log file #% %\n%
  	%!%LCALL%!% :Echo.Eval2LogFile DEBUG.MSG %# Use a helper routine, as delayed redirection does not work #% %\n%
        ) %\n%
      ) %\n%
      for %%r in (%!%DEBUG.EXITCODE%!%) do ( %# Carry the return values through the endlocal barriers #% %\n%
  