Two @FUNCTIONs/aliases with the same name

May 20, 2008
11,285
95
Syracuse, NY, USA
Below, shouldn't the function be redefined (as it is in v19, v18, v17, ...)? The same holds for aliases.
Code:
v:\> function foo bar

v:\> function foo jar

v:\> function f*
foo=bar
foo=jar
 
Aug 3, 2016
376
9
Netherlands
Here, in 20.00.25, this seems to "function" just fine:

Code:
[TEST]ver

TCC  20.00.25 x64   Windows 7 [Version 6.1.7601]

[TEST]function
TCC: No functions defined

[TEST]function test foo
[TEST]function test bar
[TEST]function
test=bar

[TEST]alias
TCC: No aliases defined

[TEST]alias test foo
[TEST]alias test bar
[TEST]alias
test=bar
 
May 20, 2008
11,285
95
Syracuse, NY, USA
TCC 20.11.38 Windows 7 [Version 6.1.7601]

v:\> alias foo bar

v:\> alias foo bar

v:\> alias foo bar

v:\> alias fo*
foo=bar
foo=bar
foo=bar
 

rps

Jul 6, 2008
436
6
TCC 20.11.38 Windows 7 [Version 6.1.7601]

v:\> alias foo bar

v:\> alias foo bar

v:\> alias foo bar

v:\> alias fo*
foo=bar
foo=bar
foo=bar

I've been working with a few aliases lately and noticed that I now have to *unalias the existing aliases before redefining a newer version at the command line. Made me wonder what was happening for awhile.

Not the expected behavior since I didn't observe this issue in V19. Didn't check any further back.

I read several aliases from a file and multiple definitions for the same alias does not produce multiple definitions, LILO.
Conclusion: The multiple alias with same name behavior only seems to manifest when working with aliases at the V20 command line.
 
Similar threads
Thread starter Title Forum Replies Date
Joe Caverly SETLOCAL removes Aliases and Functions Support 3
J TCC Out of memory with aliases and functions Support 5
A Problem with functions @int @decimal and identifying Powershell as a shell. Support 12
Joe Caverly "Functions" in cmd.exe batch files Support 6
vefatica Library functions and line continuations? Support 4
Charles Dye Documentation Help Nits Forever: Checksum functions Support 0
Joe Caverly @NAME supports library functions Support 2
Charles Dye Functions which no-one has ever tried to use.... Support 5
vefatica WHICH and @functions Support 2
M Keywords for commands, functions, internal variables Support 3
C Documentation near or fully obsolete functions Support 7
Charles Dye Optional F parm in checksum functions Support 0
C coding functions and subroutines Support 9
rps Functions @year[date] @isowyear[date] help Support 7
mikea How to? TCC and XMLnodes/XMLxpath functions Support 0
Dan Glynhampton Are these two functions the same? Support 2
M How to? Logic in functions... Support 5
A WAD function return values with parentheses prevent evaluation of additional functions Support 31
M "History" command not giving me what I want when executed by @Exec... functions... Support 6
Charles Dye Web help on functions Support 2
samintz Help examples for the @ISxxx functions Support 3
R specific functions for number conversion Support 2
C Unsuppressable errors from XML functions Support 5
nikbackm Checksum functions Support 4
Peter Bratton Disappearing functions Support 1
A I dont see anything in the alias/functions/batchvariables tabs in IDE Support 13
dcantor Comments and suggestions on functions for binary buffers Support 4
Jay Sage Request Re Aliases CD_LEAVE and CD_ENTER Support 2
Joe Caverly Expand all aliases on the command line Support 2
S Take Command crashes for aliases with length > 1015 Support 1
D Can ANSI escape sequences be used in keystroke aliases? Support 8
Joe Caverly Documentation Aliases Overview Support 3
vefatica Display of special characters in aliases. Support 25
T aliases disappearing Support 22
J Autoexecute Keystroke Aliases Support 1
vefatica Aliases ... appending unused parameters? Support 2
cgunhouse Problem with CALL and Directory Aliases in V17 Support 9
MickeyF WAD 'if' and aliases don't mix so well Support 5
M How to? Logic in aliases... Support 3
J Saving aliases Support 21
vefatica Backquotes, aliases get 'em, BTMs don't? Support 1
vefatica Aliases global vs. local Support 12
R key aliases no longer working Support 2
newbie Test to ensure aliases are loaded Support 6
D Are local aliases inherited? Support 4
T FTP.CFG file aliases Support 5
vefatica @@key aliases cause new prompt? Support 16
J Problem with aliases Support 6
P Quick help for aliases Support 3
R Alt-key aliases? Support 3

Similar threads