FOR problem

Sep 13, 2016
50
0
in version 24 and 23 these lines cause a complete stop TCC and TCC-RT
in version 21 and below works without errors.

Set adminmess=%@line[t:\e-mail\system\list_adm_mess,0]
For %%iad in (%adminmess) (If %iad==%dir Set enbl=1)
 
Sep 13, 2016
50
0
Set dir=%@line[id,0]
ID file - it contains a string with the name of the user, for example, a SYSADMIN
list_adm_mess file - it contains a string with usernames, for example: sysadmin user1 user2

In all earlier versions it worked without problems.
 
May 20, 2008
11,379
98
Syracuse, NY, USA
It seems OK here, v24.02.49.
Code:
v:\winlanem> type id
sysadmin

v:\winlanem> type list_adm_mess
sysadmin user1 user2

v:\winlanem> type test.btm
Set dir=%@line[id,0]
Set adminmess=%@line[v:\winlanem\list_adm_mess,0]
For %%iad in (%adminmess) (If %iad==%dir Set enbl=1)
v:\winlanem> unset enbl

v:\winlanem> test.btm

v:\winlanem> echo %enbl
1
 
Sep 13, 2016
50
0
It seems OK here, v24.02.49.
Code:
v:\winlanem> type id
sysadmin

v:\winlanem> type list_adm_mess
sysadmin user1 user2

v:\winlanem> type test.btm
Set dir=%@line[id,0]
Set adminmess=%@line[v:\winlanem\list_adm_mess,0]
For %%iad in (%adminmess) (If %iad==%dir Set enbl=1)
v:\winlanem> unset enbl

v:\winlanem> test.btm

v:\winlanem> echo %enbl
1

This is under Windows 10 x64. I have not tried running under other versions of Windows, but I am confused by the fact that running version 21 and below all this works without errors in both Win 7 and Win 10
 
Sep 13, 2016
50
0
I understood what the problem was. When accessing files or folders that are on a network resource. I repeat that neither the hardware nor the software configuration of the computer has changed. Only new version TCC is installed. In version 21 and below, everything works, in version 23 and above - the indicated problems have appeared.


Set dir=%@line[id,0]
Set ru=HKLM\Software\WinLanEm\Users\%dir\Config
Set disk=%@REGQUERY[%ru\netpath]

rem netpath=\\192.168.102.200\channel

Set adminmess=%@line[%disk\e-mail\system\list_adm_mess,0]
For %%iad in (%adminmess) (If %iad==%dir Set enbl=1)
If isdir %disk\e-mail\system\x64\adm\%dir Set enbl=1 %+ Set enbl1=1
.........................

Iff exist %disk\%m\%dirspa\new\acc Then
Set curd=%@makeage[%_date,%_time]
set fild=%@fileage[%disk\%m\%dirspa\new\acc]
..............................
 
May 20, 2008
11,379
98
Syracuse, NY, USA
If isdir %disk\e-mail\system\x64\adm\%dir Set enbl=1 %+ Set enbl1=1

That looks like the culprit. A similar statement
Code:
if 1 == 1 echo foo %+ echo bar
with option DuplicateBugs=Yes will cause v22, v23, and v24 to stop dead (CPU = 100%). That is not the case in v21.

Change "%+" to "&" and the problem goes away.
 
Sep 13, 2016
50
0
Yes, replacing % + with & helped. And I forgot to say that CPU = 100%. Vefatica - you are a genius.
 

rconn

Administrator
Staff member
May 14, 2008
12,340
149
I learned my lesson on this one -- never, ever give the users a temporary crutch to ease the porting between command processors. (In this case, to allow running batch files in both 4DOS and 4NT. 25 years ago!)

Useless for the past 15+ years, officially deprecated 10 years ago, and I still can't stop people from using %+ ...

I've added a kludge to 24.02.50 to fix the infinite loop.
 
  • Like
Reactions: nikbackm
Sep 13, 2016
50
0
I used it from the end of the 90s, and I never thought that it should be done somehow differently)).
 
May 20, 2008
11,379
98
Syracuse, NY, USA
Yes, replacing % + with & helped. And I forgot to say that CPU = 100%. Vefatica - you are a genius.
No genius required. When you posted it, "%+" stuck out like a sore thumb. I hadn't seen it, or any discussion of it, in years. It was begging to be tested.
 
Jan 19, 2011
604
14
Norman, OK
I still can't stop people from using %+

Maybe because the current documentation TCC > Variables & Functions > Variables > + pseudovariable basically says...

USE ME!
USE ME IF YOU ALWAYS WANT IT TO WORK!
HERE'S AN EXAMPLE PROVING YOU SHOULD USE ME!

note: I'm deprecated.

2019-04-18_13-34-56.png
 
  • Like
Reactions: nikbackm
Apr 18, 2014
299
9
And at the bottom, it says this was deprecated in v17, and most support removed in v20.

I rather think that’s the point that JohnQSmith is making; that warning should be at the top, front and centre, if it’s not meant to be used any more.
 
  • Like
Reactions: nikbackm
Similar threads
Thread starter Title Forum Replies Date
Dick Johnson Weird Color Problem Support 8
fishman@panix.com Problem with 27.15 Support 2
M Problem with VSDevCmd.bat in VS 16.7.3 Support 0
R Problem with @INT[ value] in V26 Support 9
M Selecting test "off by one" problem in Take command Support 4
Alpengreis UTF-8 problem in TCC related to Python Support 7
K_Meinhard Small problem in german IDE 26 Support 3
B Problem with color in nested shells Support 1
Joe Caverly Problem creating and switching to a DESKTOP Support 9
vefatica Another popup problem Support 10
Alpengreis ffind dialog (/W) problem Support 4
Alpengreis [TCMD v25.00.24] Small space problem with the DE translation in Prefs-GUI Support 1
Alpengreis [TCMD v25.00.24] Problem with copy and paste and the # char via mouse in TCC Support 6
A Problem with functions @int @decimal and identifying Powershell as a shell. Support 12
B IF command problem in tcexit.btm Support 9
fishman@panix.com Problem at Startup of TCC Support 3
P Problem with SFTP copies Support 7
P Problem with FTP copies Support 10
Jay Sage Problem with Context Menu Copy+Paste+Run Key Assignment Support 7
R Problem with %_do_loop in nested do loops Support 2
fishman@panix.com New Problem with later Windows 10 Support 10
Peter Murschall A little problem with LEAVE and COMMENT Support 5
M Handling of %~I problem Support 4
K Problem With SCRPUT /u Support 3
vefatica What's TCMD's problem with ^e[0m? Support 13
Peter Murschall IDE: RTL with non-English resources-problem is back in Build 28 Support 4
rps Regex problem: \xnn not recognized as a hex character Support 0
rps PRIORITY LOW problem Support 1
old coot Regex problem: \xnn not recognized as a hex character Support 12
vefatica Another problem with build 22. Support 3
Alpengreis [23.x] Download-Problem Support 2
S Problem with " Support 3
C Problem navigating forums Support 11
x13 Problem listing repository files using DIR http(s)://... Support 8
Joe Caverly Problem with TEE in v22 Support 2
Alpengreis Problem with thousands delimiter and colors Support 17
M Take Command 18, migrating to another machine, license problem. Support 1
B TCC 21.01.50 Problem with ALIAS /r and SET /r Support 2
rps How to? @search problem Support 2
WinLanEm @SELECT problem Support 6
T Fixed Problem with use of Batch parameters in the IDE Support 1
Oz Solomon Problem with "list" Support 14
S V21.24 theme problem Support 2
Alpengreis Problem if command prompt is not legacy Support 4
Alpengreis TCMD.INI: The "super hidden" problem ... Support 6
G Odd problem - screen brightness Support 4
rps V20 In-process pipes problem Support 8
Alpengreis Again theme problem [v20.0.21]? Support 11
WinLanEm INPUT problem Support 1
Craig Fitzgerald problem with executable extensons with TCC version 19.10.51 x64 Support 3

Similar threads