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

SignUp Now!

Am I just crazy, or ...

has there been a "significant" change that I've never noticed in the "What's New" section of any previous release?

As usual, using a TCC "log" to "illustrate" the issue:

  Thu  Jan 19, 2012  8:37:05p
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:\]Set ABC=QRS
[Z:\]Echo %ABC
[Z:\]Echo %ABCDEF

Frankly, what I expected that last "Echo" command to produce (and I'm close to 100% sure that this is what it used to produce at least at some time in the past) is "QRSDEF", i.e., the variable named "ABC" completely "covered" or "obscured" variables named ABC<anythingelse>.

This is definitely a major improvement in my mind if it is, in fact, a change (and when that happened if that happened; things work as above in the earliest release of TCC I have access to - Version 9); but I can't help but wonder if this is really a change or my memory is just playing "tricks" on me again...

- Dan

P. S. And you really don't need to answer the "Am I just crazy" question... :)
Not a change -- it's always worked like that. If you want to expand the shorter variable name, you can:
echo %ABC%DEF
echo %[ABC]DEF
Not a change -- it's always worked like that. If you want to expand the shorter variable name, you can:
echo %ABC%DEF
echo %[ABC]DEF

Thank you, Charles, (I think :)) you just proved that I'm just crazy. You see, I've been making an effort (by strictly (as in carefully) using a "naming convention" where the full name of no variable matched the beginning characters of any other variable) for as long as I can remember (and my memory didn't start going until about 10 years ago so that's not an issue), and, while I really wouldn't call doing that much of a problem (at this point in my life it's fairly "automatic"), I can't help but wonder when, how, and where I got the idea that I had to do that in the first place...
The only place this is true is in FOR arguments, where (for CMD compatibility) TCC will match a single-character FOR variable with any longer variable name that begins with that character. For example:

for %a in (a b c) do echo %aardvark

will return:


and not the value of the environment variable named AARDVARK.
Thank you, Rex, that's probably where I got that (mis)impression. I pretty much mostly stopped using the "For" command many years ago and now use the "Do" command whenever possible because I just really don't like the "For" command's syntax (the "Do (...)" bit) and I also don't like the fact that the contents of the "For" loop essentially show up as one big, long, continuous line with "Echo On" that really isn't even "traced"; and in those few cases where I actually do use it (more on that in just a moment) I invariably put a Gosub in and as the only contents of the loop. (Although rarely there is test for some variable set by the subroutine followed immediately by a "Leave" right after the "Gosub".) And I do use "For" not-counted loop variations ("For %F in (...)" variation for example); in those situations its "wonderfulness" exceeds its ugliness, but that really doesn't come up all that often for me.