Batch, rechnen mit der set-P-Eingabe
Hallo,
ich möchte eine set /p-Eingabe zum Rechnen verwenden. Nur es geht nicht.
Das ist mein Code, darunter die Ausgabe:
Bereits das erste Echo zeigt %toc1% nicht an. Aber egal wie ich rechne, irgendetwas fehlt ...
Danke für die Mithilfe.
Gruß
max5moritz
Das ist mein Code, darunter die Ausgabe:
echo off
set /P tco1=Wie lange? Angabe in sek=
echo 1 %toc1%
set /A tco2=%tco1%+0 2>nul
if %tco1% neq %tco2% set "tco1="&goto :man2
echo 2 %toc1%=%tco2%
set /A tco1=%toc2%/60
echo 3 %toc1%=%tco2%
set /A tco2=%toc1%/60
echo 4 %toc1%=%tco2%
pause
-----------------------Ergebnis------------
Wie lange? Angabe in sek= 184
1
2 =184
Fehlender Operand
3 =184
Fehlender Operand
4 =184
Drücken Sie eine beliebige Taste . . .
Bereits das erste Echo zeigt %toc1% nicht an. Aber egal wie ich rechne, irgendetwas fehlt ...
Danke für die Mithilfe.
Gruß
max5moritz
Please also mark the comments that contributed to the solution of the article
Content-Key: 197945
Url: https://administrator.de/contentid/197945
Printed on: April 20, 2024 at 01:04 o'clock
3 Comments
Latest comment