WAD A case where the "List" command is clearly not working at all...

May 24, 2010
855
0
Northlake, Il
Since I, myself, found this a little hard to believe, I am placing just below the complete transcript of a TCC session that clearly "illustrates" the problem. Now, to be clear about what you should be looking for, there is a line "TestDeleteLinesInOtherFilesFromLinesReadFromSTDIN |& List" where the "List" command very clearly shows absolutely nothing, immediately returning to the command prompt. And the lines both before and after that line clearly shows that A: The batch file being run does produce output, and B: The "List" command does still work in at least most of the time, and I have no reason at all to believe at this point in time that it is not working in general.

So below is a complete transcript of a TCC "session" broken up into "sections" demonstrating various things I did both to verify that the .bcc file in question was, in fact, producing output, and then to verify that the "List" command was/was not working in various cases.

Code:
   Sun  Jan 15, 2012   8:26:23p

ISO8601 plugin v1.1.1 loaded.
SafeChars plugin v1.5.7 loaded.
Sift v0.55.0 loaded.

TCC  12.11.76   Windows 7 [Version 6.1.7601]
Copyright 2011  Rex Conn & JP Software Inc.  All Rights Reserved
Registered to Daniel Mathews

[Z:\]TestDeleteLinesInOtherFilesFromLinesReadFromSTDIN
DeleteLinesInOtherFilesFromLinesReadFromSTDIN
Fatal Error: Missing all all parameters!
             "DeleteLinesInOtherFilesFromLinesReadFromSTDIN" ending due to error.
Return code was: 16
DeleteLinesInOtherFilesFromLinesReadFromSTDIN ABC
File ABC does not exist!
Fatal Error:  Was expecting the name of an input file, whereas
              "ABC" is the name of a directory!
DeleteLinesInOtherFilesFromLinesReadFromSTDIN /I
DeleteLinesInOtherFilesFromLinesReadFromSTDIN /I ABC
File ABC does not exist!
Fatal Error:  Was expecting the name of an input file, whereas
              "ABC" is the name of a directory!

"DeleteLinesInOtherFilesFromLinesReadFromSTDIN" is ending due to error.
Return code was: 16
DeleteLinesInOtherFilesFromLinesReadFromSTDIN /I /S abc
Error:  Was expecting the name of an input file and no input file
        name was specified!
File abc does not exist!
Fatal Error:  Was expecting the name of an input file, whereas
              "abc" is the name of a directory!

"DeleteLinesInOtherFilesFromLinesReadFromSTDIN" is ending due to error.
Return code was: 16

As you can see from the above, the batch file did produce output.

Code:
[Z:\]TestDeleteLinesInOtherFilesFromLinesReadFromSTDIN >&TestDeleteLinesInOtherFile
sFromLinesReadFromSTDIN.txt

There was no output at all written to the console in this case, so clearly the output in the previous section was not being produced by "@Echo .... >CON:" statements.

Code:
[Z:\]List TestDeleteLinesInOtherFilesFromLinesReadFromSTDIN.txt
  TestDeleteLinesInOtherFilesFromLine │ F1 Help │      Col 0    Line 1          0%
DeleteLinesInOtherFilesFromLinesReadFromSTDIN
Fatal Error: Missing all all parameters!
             "DeleteLinesInOtherFilesFromLinesReadFromSTDIN" ending due to error.
Return code was: 16
DeleteLinesInOtherFilesFromLinesReadFromSTDIN ABC
File ABC does not exist!
Fatal Error:  Was expecting the name of an input file, whereas
              "ABC" is the name of a directory!
DeleteLinesInOtherFilesFromLinesReadFromSTDIN /I
DeleteLinesInOtherFilesFromLinesReadFromSTDIN /I ABC
File ABC does not exist!
Fatal Error:  Was expecting the name of an input file, whereas
              "ABC" is the name of a directory!

"DeleteLinesInOtherFilesFromLinesReadFromSTDIN" is ending due to error.

And listing the output file generated in the previous "section" clearly shows that the hoped for and expected output was written to the file "TestDeleteLinesInOtherFilesFromLinesReadFromSTDIN.txt".


Code:
[Z:\]TestDeleteLinesInOtherFilesFromLinesReadFromSTDIN |& List

As you can see above, the "List" command clearly did not appear to execute at all as there is no trace of it having done anything whatsoever in this transcript.

Code:
[Z:\]Dir |& List
  STDIN                               │ F1 Help │      Col 0    Line 1          0%

 Volume in drive Z is RAMDisk        Serial number is 4cce:7e9a
 Directory of  Z:\*

12/09/2011  14:02         <DIR>    A Directory 1
12/09/2011  14:02         <DIR>    A Directory 2
12/30/2011  20:38         <DIR>    D-Drive Temporary Save Area Because D-Drive Is E
 1/03/2012   4:09         <DIR>    Development
12/16/2011   0:44         <DIR>    DoIt
 1/09/2012  15:57         <DIR>    Final Song List Files
12/29/2011  16:32         <DIR>    JPSoft

[Z:\]

And yes, the "List" command is working in the general case.

While I don't really consider this to be a "critical" issue because I have a not-too-inconvenient "workaround", it is quite annoying because the "List" command is one of the most extensively used commands in my "arsenal". And since this is, to me, clearly a "bug" of some kind I am reporting it as such.

- Dan
 

rconn

Administrator
Staff member
May 14, 2008
12,363
150
I think it is extremely unlikely to be a bug in LIST or TCC (unless a serious bug in TCC redirection has somehow completely escaped notice for the last 20 years).

The problem is much more likely to be something in "TestDeleteLinesInOtherFilesFromLinesReadFromSTDIN", but since you didn't provide any clue as to what that file is doing or any source code, I can't hazard an educated guess as to the cause. But most of the time when something like this is brought up, it's either because there's an unacknowledged additional redirection going on that's diverting the output somewhere else before LIST sees it, or there's an embedded START somewhere that's sending the output to a different session, or you've got some forgotten alias getting in the way.
 
May 24, 2010
855
0
Northlake, Il
Rex, I'm not at all surprised at your answer; I would have said the same thing before this actually happened. However, there are no "Starts" or any "redirections" (other than to NUL: in the "appropriate" places) in either of the two .btm files involved (and there are also no other "executable" files of any kind involved), so your "possible" answer(s) simply do not apply in this case. And I am attaching a .zip file containing the "Test" .btm file and the .btm file being tested to this posting so you can verify that that is, in fact, the case for yourself.
 

Attachments

  • Malfuntioning\'List\'Command.btmFiles.zip
    2.3 KB · Views: 96
May 24, 2010
855
0
Northlake, Il
After I fixed the two errors in your batch file everything worked as expected.

Look in the two IFF statements at line 92 and line 96, and change the nonexistent "@EchErr" command to "@EchoErr".
Rex, thank you! I'm laughing as I type this. :) And it's really not all that surprising as as I have mentioned before I have very poor eyesight (a 20pt font is about the minimum I can read well without the Windows "Magnify" app).

But why would those particular mistakes cause the "List" command to effectively not execute when there was output and STDOUT was written directly to the console or to a file?
 
Similar threads
Thread starter Title Forum Replies Date
F WAD SWITCH statement with regexes or wildcards as CASE expressions Support 9
nikbackm Switch Case and here-document redirection Support 2
M How to? Set the ribbon titles to mixed case Support 1
vefatica WAD Escaping changes case to lower? Support 12
Frank @replace works case sensitive Support 5
S Dir - case selection possible?? Support 3
S FFIND /E"reg exp" : not case insensitive Support 4
Peter Murschall BDEBUGGER "Run to Cursor" - where is it ? Support 1
Alpengreis How to? Where is a ChangeLog for v25 build 16 Support 4
vefatica Where's @TASCII? Support 0
vefatica DO /L, where did my string go? Support 6
vefatica Where did "BP-White" go? Support 1
MickeyF where to view the latest JPSoft newsletter? Support 0
vefatica Where did my font go? Support 16
S Forum: Where is "what's new" control information? Support 1
Roedy where are the colours Support 1
M Where am I going wrong with ALIAS??? Support 7
G Where is JpSoft.com? Support 12
Gorlash tcc V11.00.37 - where is history.txt ?? Support 1
C how to copy to folder where I need admin rights Support 5
vefatica Where's the email? Support 0
M TCC Can't find WScript.exe where it says it is Support 0
C where's the .ini file gone? Support 3
FreezerBurnt ANSI Prompt messes up list output. Support 39
Phileosophos PDIR to list filenames without extensions? Support 2
T Is there a way to maintain the position in the environment list, while debugging? Support 10
Alpengreis List command: text truncated in find box (german) Support 9
L LIST's pop-up search loses focus in a Windows Terminal window Support 15
A List windows with titles matching given pattern? Support 2
C How to make list of drive contents when shutdown PC / Everything.exe Support 7
D _USBS list misses flash drives that @USB recognizes. Support 7
Phileosophos LIST edit not invoking my specified editor Support 4
cxxl WAD Mouse movement sluggish when using TCC list Support 3
Oz Solomon Problem with "list" Support 14
P Strange mouse behavior with list Support 2
T Invalid attach tabs list Support 10
M A list of issues .. Support 17
J Documentation New help system: "skip word list" Support 11
WavSlave Fixed LIST /U not working in TCC v19 Support 5
R V19 - At startup, TCC save directory in the directory history list Support 2
C cosmetic issue with LIST's (I) Support 9
Stefano Piccardi list of TCC commands for external editors Support 4
vefatica Get a list of all files with alternate streams? Support 11
Joe Caverly LIST /T (search for Text) Support 2
Joe Caverly ListColors for LIST Support 1
M How to? List path getting short file and directory names... Support 10
C How to? List empty folders Support 21
S How to? Use wild cards in include list without duplicate processing Support 49
vefatica Fixed No text in List View! Support 4
D Folder/List view changed in v15 Support 8

Similar threads