I would like to start a subscript to calculate something for me and return the value somehow if it's done.
foo.bat:
@echo off
start bar.bat 2 3
::This foo.bat does something and after a while it waits for the calculated value.
set result=//somehow return the value
echo %result%
pause
exit
bar.bat:
@echo off
set int1=%1
set int2=%2
set /a result=%int1%+%int2%
::somehow send the result to the running foo.bat
exit
I tried to ask this question here but I got redirected by three people to the call function, which is not what I need (in my opinion).