Welcome!

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

SignUp Now!

Option to always CALL?

Apr
35
0
Is there an option to always CALL batch files without having to specify CALL? The default behavior for running an executable from a batch is to run the process, then continue executing the batch file. But it's different for batch files where running a batch from within a batch by default exits the first batch (unless you use CALL). It becomes a pain when there are a lot of batch files and you never really know if what you're calling is a batch or exec. It sure would help if there was a global option to always imply CALL to keep the behavior consistent.

== a.btm ==
b
echo continued

== b.btm ==
echo b

In this example "continued" wouldn't be shown. If b was an executable then "continue" would be shown. If there was an "Always CALL" option, then it wouldn't matter if b was an exec or batch, the behavior would be consistent. Not a big deal if you control b as well, but sometimes the whole point is that b can be switched out by someone else, may be a batch to today an exec tomorrow.

p.s. This option may already exist, if so it'd help for it to be mentioned in the CALL help section. If it doesn't exist, what do you think about adding it?
 
There isn't any option in TCC to do this -- it would be highly unpopular with people running legacy batch files!

TCC's current batch file chaining / calling handling is identical to CMD's. If you want to suggest it as a new feature for a future version, click on the orange "feedback" button .
 
There isn't any option in TCC to do this -- it would be highly unpopular with people running legacy batch files!

TCC's current batch file chaining / calling handling is identical to CMD's. If you want to suggest it as a new feature for a future version, click on the orange "feedback" button .

well good point, if I'd be calling any other batch files that depend on not returning from chaining another batch, turning on an option like this would break those, thanks for comment
 
Perhaps an option could be added which always defaults to OFF whenever a batch file is started. If you had to turn it on, say with AUTOCALL ON, in every batch file which uses that feature, then it shouldn't cause compatibility issues.
 
Back
Top
[FOX] Ultimate Translator
Translate