1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
|
@echo off
title Bat - Calculette decimaux
mode con cols=70 lines=30
:0
cls
echo ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
echo º º
echo º SCRIPT - BAT-BILAN_PLANNING.BAT º
echo º Script bat Calculette pour calculs decimaux º
echo º º
echo ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
set /p op=. Saisir votre operation:
:: B >>TESTS SAISIS CALCUL USER<<
echo %op% | findstr "+ - * /" > nul
if errorlevel 1 (set testA=kO)
If not errorlevel 1 (set testA=OK)
echo %testA%
echo %errorlevel%
pause
echo %op% | findstr /r [0-9] > nul
if errorlevel 1 (set testB=KO)
If not errorlevel 1 (set testB=OK)
echo %testB%
echo %errorlevel%
pause
echo %op% | findstr /r [a-z] > nul
if errorlevel 1 (set testC=OK)
If not errorlevel 1 (set testC=KO)
echo %testC%
echo %errorlevel%
pause
echo %op% | findstr "@" > nul
if errorlevel 1 (set testD=KO)
If not errorlevel 1 (set testD=OK)
echo %testD%
echo %errorlevel%
pause
for /f "delims=" %%a in ('powershell %op%') do (echo . %op% = %%a)
Pause
goto 0
Pause |
Partager