Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Recent content by Raistlin

  1. R

    A collection of incompatibilities with CMD.EXE

    Why useless? It's a comfortable way to check if a subroutine returned an error, instead of additional "if errorlevel 1..." It is not, actually. I agree that a lot of incompatibilities I've described above is a result of CMD.EXE creators' mistakes, but they are really used as features, because...
  2. R

    A collection of incompatibilities with CMD.EXE

    Another incompatibility. Executing following batch file@echo off call :aaa || echo Error exit /b :aaa exit /b 1will give different results under TCC and CMD (see in my signature for their versions).
  3. R

    A collection of incompatibilities with CMD.EXE

    Can I please hope that these incompatibilities will be gone with next releases?
  4. R

    A collection of incompatibilities with CMD.EXE

    Here is a couple of TCC's incompatibilities with CMD.EXE I've discovered. To check any of them, create file Test.cmd, paste an example there, save Test.cmd and run it first under TCC.EXE then under CMD.EXE and compare outputs. 1. set aaa=c:\windows\ for %%a in (%aaa%nul) do echo %%~dpa 2...
  5. R

    Reading an Unicode file with more than 8191 lines

    Is there a way to effectively read lines from an Unicode file? @LINE works OK but has limitation - 8191 lines. @FILEREAD returns garbage when used with Unicode files.
  6. R

    FOR issues

    Charles Dye Yeah, I'm wondering why I haven't tried this myself :) Well IFF is another multiline construct, but it works inside FOR loop. Anyway, I believe such things should be illustrated in Help.
  7. R

    FOR issues

    3. It seems that RETURN is not allowed in nested FOR loops: executinggosub aaa echo %bbb quit :aaa for %A in (123) ( for %B in (345) ( return ) set bbb=ccc )displays "ccc".
  8. R

    FOR issues

    FOR can't be used in @EXEC. Example:echo %@exec[@for ^%A in (123) echo %A] > nulreturns "ECHO IS OFF". SWITCH works incorrectly from inside FOR loop: executing for %A in (123) ( switch a case a echos aaa case f echo fff endswitch ) returns "aaafff".
  9. R

    Use of @WINAPI

    Then all we need is new command SETERROR. Calling external batch file or using external plugin ain't good ways to perform such simple and trivial operation as setting the errorlevel.
  10. R

    Use of @WINAPI

    Why RETURN? It's better to add a new option to QUIT - to make it possible to quit just an alias but not parent batch file.
  11. R

    Use of @WINAPI

    Thank you. This thought came into my mind, too :).
  12. R

    Use of @WINAPI

    I want my alias to return an error code. QUIT doesn't suit since it quits a batch file along with an alias. So I want to use WinAPI's SetLastError. But executing echo %@winapi[Kernel32.dll,SetLastError,20] > nul echo %? # %_?returns "0 # 0". Neither exit code for last internal command nor exit...
Back
Top