GOSUB

#1
What am I doing wrong? Shouldn't it be echoing "07/28/17"?

Code:
[C:\temp]
14:19:31 $ ver

TCC  21.00.37 x64   Windows 7 [Version 6.1.7601]

[C:\temp]
14:20:02 $ type test.btm
gosub testing "%_date"
quit

:testing [ %variable ]
echo %variable
return

[C:\temp]
14:20:04 $ test.btm
gosub testing "07/28/17"
echo
ECHO is ON
return
quit
 
#3
New question. How do I get it to not display the quotes?
Code:
[C:\temp]
14:38:26 $ type test.btm
@echo off
gosub testing "Friday, July 28, 2017"
quit

:testing [ variable ]
echo %variable
return

[C:\temp]
14:38:38 $ test.btm
"Friday, July 28, 2017"

Edit:

I found that the following works. Is there another way without the extra function call?
Code:
@echo off
gosub testing "Friday, July 28, 2017"
quit

:testing [ variable ]
echo %@strip["""", %variable]
return
 
Last edited: