Welcome!

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

SignUp Now!

Tab Question

May
366
4
Hello everyone

In TCC options | advanced I have my TAB Width set to 3. However, if I TYPE eRen.tcclib, one of my library functions, which uses tabs for indentation, it looks like it uses 8. How is the Tab Width setting used? Am I doing something wrong? I expected the tabs to be of the set width.

Thanks,

Michael


Code:
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: eRen - rename in place with command line edit
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
eRen {
        setlocal

        GetOpt %*

        :: Turn on Debugging if -D provided
        if defined OPTION_D set DEBUG=1

        iff %PARAM_0 EQ 1 then
                DebugPrint "Filename Given:  %PARAM_1"

                :: Make sure the provided file exists
                iff not exist %PARAM_1 then
                        EchoColor RED "eRen Usage Error - '%PARAM_1' Does Not Exist"
                        gosub Usage
                        goto EndProgram
                endiff

                set NewFileName=%@filename[%@Replace[\,,%PARAM_1]]
                eset NewFileName
                DebugPrint "New Filename: %NewFileName"
                DebugPrint "Rename Command: '%PARAM_1' '%NewFileName'"
                ren "%PARAM_1" "%NewFileName"
        else
                echocolor RED "eRen Usage Error - One Filename Parameter Needed"
                gosub Usage
                goto EndProgram
        endiff

        :EndProgram
        DebugPrint "Cleaning up and exiting..."
        unset NewFileName
        if defined OPTION_D unset DEBUG
        endlocal
        quit

        :Usage
                echo.
                echo Usage: eRen [-D] filename
                echo   -D:  Turns on eRen's Debug Mode
        return
}
 
If you use the LIST command to show your file, that tab setting should take effect. The TYPE command is little more than "copy file to console", which expands tabs as you see.
 
Thanks Larry, but I'm not sure I get it. Somewhere in TCC it must convert the tab in the file to X amount of display characters. It's odd to me that that wouldn't take the setting into account.

BTW, I don't care about CMD compatibility....

Michael
 
Thanks Larry, but I'm not sure I get it. Somewhere in TCC it must convert the tab in the file to X amount of display characters. It's odd to me that that wouldn't take the setting into account.

BTW, I don't care about CMD compatibility....

Michael
As Larry said. It does, but only in LIST. And that setting affects only LIST. See he help for the OPTION tab with that setting.
 
... Somewhere in TCC it must convert the tab in the file to X amount of display characters. ...
Given your above-quoted assumption, your puzzlement is sensible. But the assumption is false. The TYPE command simply copies the file content to the console (as I stated.) It is the conhost.exe program, (distributed with Windows), which is deciding how the tabs should should be rendered. (See a recent thread, "In console, tabs are rendered with non-uniform tab-stop spacing ", for Rexx's assertion of this fact, which I can confirm having seen the effects of using a conhost.exe replacement.)
 

Similar threads

Back
Top