1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

A list of issues ..

Discussion in 'Support' started by MaartenG, Feb 2, 2017.

  1. MaartenG

    Joined:
    Aug 3, 2016
    Messages:
    355
    Likes Received:
    8
    Yesterday, when trying to solve some FUQ's (Formerly Unanswered Questions) on these forums, I ran into a couple of "things" with TCC (20.00.25 x64) that didn't work as advertised or expected.
    I do no longer report bugs, as they hurt nobody (or else these bugs would have been reported already) and the response (if any at all!) most of the times makes me feel like *I* did something wrong and have to defend myself, which is not something I actively pursue.

    Anyway, after 4 or 5 of these issues I started to get annoyed and decided to keep track.
    This is the list of approximately 3 hours working with TCC (without the first 4/5 issues, which I already forgot):

    • With TASKBAR desktop you can minimize all applications (and thus show the desktop). A second TASKBAR desktop restores the original layout. But after TASKBAR desktop & delay 2 & TASKBAR desktop the cursor is gone. Without a visible prompt you can still type your commands, but [Enter] is impossible (gives error-beep).
      The solution is to activate another program (by clicking on it's window) and then back to TCC. Now things work again. The similar built-in Windows functionality (Win-m , Win-Shift-M) works as expected.
    • @EVAL[10/0] has it's (obvious) error trapped, @EVAL[10\0] and @eval[10 MOD 0] have not.
    • @UNC crashes TCC:
      2017-02-02 20_52_25-TCC.png
    • The text in the helpfile regarding internal variables like _LALT, _SHIFT uses "depressed" for the state where the key is in it's lower position. For me - English is not my native language - this was confusing. My guess would be that depressed would mean that the key was NOT pressed (like (de)solder, (de)compress, etc). Only after a little thought I realized depressed=down. And then it made sense. But still: Why not just "pressed", like "Press any key to continue"?
    • START /? misses the /TABNA option in the short option list (I get it that it's not in the second part")
    • Same goes for WINDOW /? : it misses the DETACH and /FLASH options
    • If you have multiple TCC applications running and in one of them you change from global to local history, flush that local history and activate global history after that: the global history is deleted. That means all the other TCC intances now also have an empy (global) history... I assume DIRHISTORY behaves the same (not tested)
    • Regarding DIRHISTORY: Why is there no @DIRHISTORY function, like there is a @HISTORY companion for the HISTORY command. Not consistent.
    • echo %_expansion returns %_expansion after setdos /x-3 (disable all variable expansion). Seems logical, but not very practical.
    • dir /4 does *not* display the output in 4 colums; it displays it in as much colums as possible with the current columnwidth (with a max of 4). Same goes for DIR /2. Redirection (dir /4 > output.txt) still limits the output to the column width of the screen.
      In contrast: DIR /W has the right description in the helpfile: "... displays as many columns as it can fit into TCC window ...."
    • There is no function to get just the path of a filename, like \TEMP\
      Luckily there is the CMD-compatible solution :
      for %a in ("English.dll") do echo %~da %~pa %~na %~xa gives you:
      C: \Program Files\JPSoft\TCCLE14x64\ English .dll (Drive Path Name Extension)
      Couldn't get it working with the DO command, though. And it cannot handle this:
      for %x in ("English.dll") do echo %~xx
      Reply: English.dllx . Should be: .dll
    • The @FILENAME example in the help should be echo %@filename["%comspec"] instead of ["comspec"]

    Back to non-bug-reporting-mode....
     
    #1 MaartenG, Feb 2, 2017
    Last edited: Feb 2, 2017
  2. Charles Dye

    Charles Dye Super Moderator
    Staff Member

    Joined:
    May 20, 2008
    Messages:
    3,307
    Likes Received:
    39
    I decided this function must be a wrapper around WNetGetUniversalName(), q.v. Note the first user comment: "This function is a nightmare...."

    Among other oddities, this function expects to be passed a filename with a drive letter, and that drive letter should be mapped to a network share.
     
  3. MaartenG

    Joined:
    Aug 3, 2016
    Messages:
    355
    Likes Received:
    8
    The helpfile states: @UNC[filename] : Returns the UNC name for the specified file (or an error if the file has no UNC, e.g., a local file).

    In the help-file of the file-related @functions it is often unclear if the example filename just means filename, or "filename" or %@FULL[filename] or "%@FULL["filename"]". It needs a little trial-and-error to find out which of those it should be. In this case I tried all of those. All lead to crashes.

    Truth to be told, the @UNC function *did* throw an error; just not the error I was expecting :-)


    BTW: No harm done with the malfunctioning @UNC: you could use %@TRUENAME to get the same results (At least on SMB-shares; don't know about other networks)
    BTW2: On network shares the @UNC function is smart enough to understand just a filename /folder (without share and path)

    Thanks for your feedback! (and research)

    EDIT: changed some text from bold to italic; otherwise it was just too "LOUD"
     
    #3 MaartenG, Feb 2, 2017
    Last edited: Feb 3, 2017
  4. Charles G

    Joined:
    Apr 2, 2011
    Messages:
    1,022
    Likes Received:
    0
    Why not, if I understand, %@right[-2,%@path["C:\Program Files\JPSoft\TCCLE14x64\English.dll"]]
     
  5. MaartenG

    Joined:
    Aug 3, 2016
    Messages:
    355
    Likes Received:
    8
    You *do* understand and that's what I eventually did (glad it wasn't a UNC-path ;-)
    (Somewhat more universal would be: %@replace[%@DRIVE[..],,%@PATH[..]] )

    It's just that for every part of the FQFN there is a @function; just not for the path (without drive).
    (I was "playing" with fsutil hardlink It would come in handy for parsing it's output without further fuss)
     
  6. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,860
    Likes Received:
    83
    Not reproducible here (TCMD 20.10.38, Windows 10 x64). What version of Windows are you running?

    10/0 throws a Windows hardware exception (which TCC catches). 10 \ 0 generates an internal error in the math library in TCC:

    MAPM Warning: 'M_apm_sdivide', Divide by 0

    What are you expecting to see?

    Fixed in 20.10.39.

    In this case "depressed" is the correct usage. "Pressed" means that the key was at some point (but not necessarily currently) pressed. "Depressed" means that the key is down *at this moment*.

    WAD. There are a whole lot more (particularly in things like START) that aren't displayed in the quick help. The quick help (which will be going away altogether sometime soon) is intended to display the commonly used options, not to display multiple pages of rarely-used options. (Pus every option that gets added to the quick help requires translation to six languages.)

    Because nobody has ever asked for @DIRHISTORY. Features get added because of user demand, not for the sake of (largely mythical) "consistency". If you want @DIRHISTORY, request it in the Suggestions Forum.

    Not sure what you're looking for here - "disable all variable expansion except for the ones that I really don't want to disable?" That seems like a job for the DWIM parser.

    /2 and /4 are obsolete leftovers from the 4DOS / FAT file name days. If I remove them people will complain that their (very old) aliases and batch files don't work anymore.

    Nobody ever asked for it. If you want it, request it in the Suggestions Forum.
     
  7. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,959
    Likes Received:
    30
    I can reproduce the TASKBAR thing (Win7/32). After the command in Maarten's example, you can type in the restored v20 but "Enter" just produces a sound.
     
  8. JohnQSmith

    Joined:
    Jan 19, 2011
    Messages:
    559
    Likes Received:
    7
    No TASKBAR issue (sort of) using
    TCC 20.11.38 x64 Windows 7 [Version 6.1.7601]
    TCC Build 38 Windows 7 Build 7601 Service Pack 1

    Works fine after I mouse click inside the TC window (set it as the focused window), however any key typed creates a noise if I don't, even though the window appears to be focused (title bar text is dark, not greyed out as though unfocused). Clicking the title bar in this case should force focus, but any key still creates the noise until I click inside the TCC window inside TC.
     
  9. JohnQSmith

    Joined:
    Jan 19, 2011
    Messages:
    559
    Likes Received:
    7
    Try this (also works with UNCs)
    Code:
    function patth=`%@substr[%@path[%@full[%1]],%@len[%@drive[%@full[%1]]]]`
    Edit: Here's a demo (\\xxxxx.xxxx.xxxx.xxx\devroot\ (obfuscated) is the root of the UNC path)

    Code:
    0:00:00.002
    [\\xxxxx.xxxx.xxxx.xxx\devroot\devphp\dev\demo]
    13:00:39 $ dir
    
     Directory of  \\xxxxx.xxxx.xxxx.xxx\devroot\devphp\dev\demo\*
    
     2/10/2015  20:12         <DIR>    .
     2/10/2015  20:12         <DIR>    ..
     2/10/2015  20:11         <DIR>    css
     3/20/2013   7:18         <DIR>    development-bundle
     2/10/2015  20:12         <DIR>    flot
     2/10/2015  20:12         <DIR>    img
     2/10/2015  20:12         <DIR>    js
     2/10/2015  20:12         <DIR>    scripts
     8/02/2012   9:22           1,069  css-float-test.hm
     8/02/2012   9:31             987  css-float-test.htm
     8/02/2012  12:03          63,681  index.htm
     7/23/2012  12:56          10,607  table.html
                  76,344 bytes in 4 files and 8 dirs
       1,336,717,524,992 bytes free
    
    0:00:00.022
    [\\xxxxx.xxxx.xxxx.xxx\devroot\devphp\dev\demo]
    13:00:56 $ echo %@patth[index.htm]
    \devphp\dev\demo\
    
    0:00:00.004
    [\\xxxxx.xxxx.xxxx.xxx\devroot\devphp\dev\demo]
    13:01:10 $ c:
    
    0:00:00.002
    [C:\temp\temp2]
    13:01:12 $ dir
    
     Volume in drive C is unlabeled      Serial number is 262b:d729
     Directory of  C:\temp\temp2\*
    
     2/03/2017  12:19         <DIR>    .
     2/03/2017  12:19         <DIR>    ..
     2/03/2017  12:19               0  file.txt
                       0 bytes in 1 file and 2 dirs
         110,967,496,704 bytes free
    
    0:00:00.007
    [C:\temp\temp2]
    13:01:34 $ echo %@patth[file.txt]
    \temp\temp2\
    
     
    #9 JohnQSmith, Feb 3, 2017
    Last edited: Feb 3, 2017
  10. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,860
    Likes Received:
    83
    I am baffled about one thing-- why would you think that a second TASKBAR should put you back in your tab window? The documentation doesn't suggest anything of the sort.
     
  11. MaartenG

    Joined:
    Aug 3, 2016
    Messages:
    355
    Likes Received:
    8
    [EDIT] Too long (half of a) story removed.
     
    #11 MaartenG, Feb 3, 2017
    Last edited: Feb 4, 2017
  12. MaartenG

    Joined:
    Aug 3, 2016
    Messages:
    355
    Likes Received:
    8
    TCC 20.00.25 x64 Windows 7 [Version 6.1.7601], using TCC.exe (not tested with TCMD.exe)

    The same "Divide by zero" error message.
    From Help > Troubleshooting > Errormessage:
    Divide by zero: The command or function you used tried to do a division by zero. .....


    That is quick!
    BTW: What's with the versions? Current is 20.11.38 according to the website/announcements. You're talking about 20.10.39 and you are now running TCMD 20.10.38, Windows 10 x64 (first line of your response)


    OK, got it. Learned something new for my English vocabulary.


    The quickhelp consists of 3 parts:
    - a very short description (1 line),
    - the exact syntax (1 or 2 lines)
    - a description of the use of the parameters (many lines).

    I was talking about the second one. That should be complete imo.

    Are you implying that the sole source of innovation and improvement is user demand?

    Consistency was the best match in my - admitted- limited English vocabulary. I thought everyone would unerstand what I meant by that. Apparently I was wrong.
    BTW: The first word that came to my mind was "congruent" (I get treatment for that), but that seemed less clear.

    No. The behaviour doesn't match the helptext. Change the helptext or create an exeption.

    The behaviour doesn't match the (quick)helptext. Change the helptext or change the behaviour.
    FWIW: I still use DIR/4: alias EXE=`echo. & dir /4 /b %@replace[.,*.,%PATHEXT]`
    (BTW: I like the current behaviour better than forcing 4 columns)

    (regarding a @just-the-path function).
    I won't. It just seemed strange that there isn't one already (let's call it "inconsistent" ;-).


    There are 2 findings without any feedback. Can you confirm that global history indeed gets deleted?
     
    #12 MaartenG, Feb 4, 2017
    Last edited: Feb 4, 2017
  13. MaartenG

    Joined:
    Aug 3, 2016
    Messages:
    355
    Likes Received:
    8
    I tried it. Works like a charm (even strips quotes). Thanks!!
     
  14. MaartenG

    Joined:
    Aug 3, 2016
    Messages:
    355
    Likes Received:
    8
    Which "you" are you referring to?
     
  15. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,860
    Likes Received:
    83


    Three problems here:

    1) A modulo is not the same operation as a divide, and
    2) The modulo error is coming from the math library, not TCC or a Windows hardware exception, so
    3) Reinterpreting it (incorrectly IMO) as a divide-by-zero error would require writing an additional math parser to preprocess the input solely for the purpose of generating "consistent" (whatever that means) error results.

    (Cue the math professors frequenting this forum to launch into another of their exceeding obscure threads about number theory.)

    Which would still be several incomprehensible lines in the case of START. Which makes the whole concept of "quick help" silly.

    The "/?" syntax is a 25-year-old holdover from 4DOS. Every year I try to kill it and every year I get complaints about deleting it. And complaints about keeping it.

    I have an idea for a quicker help -- it's three less keystrokes, and it will show all the help for that command, including every option and some examples, and it won't scroll your current command line off the screen.

    It's called "F1".

    In terms of the UI, pretty much yes. Are you suggesting that I should ignore user feedback and requests? Keep in mind that anything about the UI or command syntax that you don't like was previously requested by other users. There isn't much that I created in a vacuum -- as a commercial product, TCMD needs to address real-world user demands.

    Whenever someone suggests that I should add (insert some random command / variable here) for the sake of "consistency", or "orthogonality", I know that (1) that user has no interest in or intention of ever using that feature, and (2) I should immediately dump it into the circular file.

    And here we go again ...
     
  16. MaartenG

    Joined:
    Aug 3, 2016
    Messages:
    355
    Likes Received:
    8
    I will not respond to this. It will cause further mis-communication and irritation (at least on my side).
    Back to non-bug-reporting-mode....
     
  17. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,860
    Likes Received:
    83
    WAD (it's behaved this way for 20 years). When you switch modes, TCC copies the existing list to the new list. This was what users had requested & expected (at least at that time). AFAIK you're the first user to *not* want to retain the existing list. I'm not going to change the current behavior (too much risk of breaking existing aliases & batch files), but if you need this you can request it in the suggestions forum.

    Fixed in 20.11.39.[/QUOTE]
     
  18. Juppycmd

    Joined:
    Dec 10, 2014
    Messages:
    61
    Likes Received:
    1
    A certain quote comes to mind, esp. with the new, slower help system that had to replace the responsive chm...

    User demand is leave the quick help for common switches in place :-o ... if translation is too much of a hassle at least for English (which the level of expertise required for cmd scripts, I guess lotsa foreigners use it anyway instead of translation attempts).
     

    Attached Files:

Share This Page