JQuilici Adept
Joined: 21 Sep 2005 Posts: 250 Location: Austin, TX
|
Posted: Thu Feb 23, 2006 11:17 pm
BUG: %pathexpand vs %exec (pls help confirm) |
During some work on run scripts in this thread, I ran across an following anomaly which looks like a bug in %pathexpand.
To reproduce the problem, create a new character on a dummy MUD (so that you have no existing settings to interfere), click the Offline button to get a MUD window and command-line, and paste the following into the command line:
Code: |
#var path1 {.nwse}
#say path1: @path1
#say "pathexpand(path1):" %pathexpand(@path1)
#say "exec(path1) :" %exec(@path1)
#say
#var path2 {.nw;.se}
#say path2: @path2
#say "pathexpand(path2):" %pathexpand(@path2)
#say "exec(path2) :" %exec(@path2)
#say
#var path3 {.nw;.(open door)se}
#say path3: @path3
#say "pathexpand(path3):" %pathexpand(@path3)
#say "exec(path3) :" %exec(@path3)
#say
#var path4 {.nw;.(open door;s)e}
#say path4: @path4
#say "pathexpand(path4):" %pathexpand(@path4)
#say "exec(path4) :" %exec(@path4)
#say |
When I do so, I see the following:
Code: |
path1: .nwse
pathexpand(path1): n|w|s|e
exec(path1) : n|w|s|e
path2: .nw;.se
pathexpand(path2): n|w|.se
exec(path2) : n|w|s|e
path3: .nw;.(open door)se
pathexpand(path3): n|w|.(open door)|s|e
exec(path3) : n|w|open door|s|e
path4: .nw;.(open door;s)e
pathexpand(path4): n|w|.(open door;s)|e
exec(path4) : n|w|open door|s|e
|
Note that %pathexpand often does not produce the proper expansion of what otherwise looks like a perfectly legitimate path - there are extraneous ".(cmd)", unexpanded sections, etc. On the other hand, %exec DOES always appear to produce the right expansion.
So....(a) can others reproduce this behavior, and (b) is this a bug, or am I misunderstanding something?
For the record: running a registered 7.21 on Windows XP Home Edition SP 2 on a Dell Inspiron 600m laptop, 1.8GHz Pentium M, 512 MB Ram @ 592 MHz, display @ 1400x1050x60Hz. Not that any of it should matter, but it's good policy... |
|