I'm using TCC (not LE) 11.00.48.
Is this a bug or intentional?
Look at this one (ignore the actual contents as it is just an example, make note of the %+):
function aa=`set test=a%+echo testing`
if you try to call it on the commandline "%@aa[]" then it does what's
expected, i.e set test to "a" and output "testing"
However, try doing this as part of a PDIR command:
pdir /(@aa
[*])
Now that function displays the code of that function (with eventual expanded variables), and doesn't run it.
if the %+ isn't present, the function would run in similar manner as on the commandline.
I'm asking because I have a bit of need to use some temporary variables as recalculating CRC32 is slow, and PDIR should both display and compare with the crc contained in the filename) in a function.
Is there eventual alternatives which can be used to set a variable which would work in a function definition (AND work with PDIR)?
Is this a bug or intentional?
Look at this one (ignore the actual contents as it is just an example, make note of the %+):
function aa=`set test=a%+echo testing`
if you try to call it on the commandline "%@aa[]" then it does what's
expected, i.e set test to "a" and output "testing"
However, try doing this as part of a PDIR command:
pdir /(@aa
[*])
Now that function displays the code of that function (with eventual expanded variables), and doesn't run it.
if the %+ isn't present, the function would run in similar manner as on the commandline.
I'm asking because I have a bit of need to use some temporary variables as recalculating CRC32 is slow, and PDIR should both display and compare with the crc contained in the filename) in a function.
Is there eventual alternatives which can be used to set a variable which would work in a function definition (AND work with PDIR)?