Welcome!

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

SignUp Now!

GOSUB

Jan
616
15
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
 
Never mind... extra % symbol in the gosub parameter field.
 
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:
Back
Top