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 49 50 51 52 53 54 55 56 57 58
|
@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 Test saisie signe: %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 Test saisie chiffre: %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 Test saisie lettre: %testC%
::echo %errorlevel%
::pause
echo %op% | findstr "@ %% $ # : ! ;" > nul
if errorlevel 1 (set testD=OK)
If not errorlevel 1 (set testD=KO)
::echo Test saisie caracteres particuliers: %testD%
::echo %errorlevel%
::pause
::echo %testA%%testB%%testC%%testD%
::Pause
echo %testA%%testB%%testC%%testD% | findstr OKOKOKOK > nul
if errorlevel 1 (echo ERREUR. Veuillez resaisir l'operation. & pause & goto 0)
if not errorlevel 1 (set TEST=%testA%%testB%%testC%%testD%)
::echo %TEST%
::pause
:: C >>REALISATION CALCUL DECIMAUX<<
for /f "delims=" %%a in ('powershell %op%') do (echo . %op% = %%a)
Pause
goto 0
Pause |
Partager