Friday, January 31, 2020

Fungsi dengan return value di Batch

@echo off
SETLOCAL
CALL :SetValue value1,value2
echo %value1%
echo %value2%
EXIT /B %ERRORLEVEL%
:SetValue
set %~1=111
set %~2=222
EXIT /B 0

Hasil:
111
222

No comments:

Post a Comment