Frage

If you have a remark before the end of a block it gives a error. ) was unexpected at this time

example code:

@echo off
set x=1
if %x% == 1 (
    set y=4
    set z=5
::Hello world
)

Does any one know way it has this error?

Keine korrekte Lösung

Andere Tipps

You cannot use :: for remarks when inside brackets (). You must instead use REM

@echo off
set x=1
if %x% == 1 (
    set y=4
    set z=5
rem Hello world
)
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top