SORU
26 Ocak 2010, Salı


Mantıksal operatörler ("ve", "veya") DOS toplu

Nasıl DOS Toplu iş dosyaları mantıksal işleç uygulamak istiyorsunuz?

CEVAP
26 Ocak 2010, Salı


İç içe koşulları ile and yapabilirsiniz:

if %age% geq 2 (
    if %age% leq 12 (
        set class=child
    )
)

ya da:

if %age% geq 2 if %age% leq 12 set class=child

Ayrı bir değişken ile or yapabilirsiniz:

set res=false
if %hour% leq 6 set res=true
if %hour% geq 22 set res=true
if "%res%"=="true" (
    set state=asleep
)

Bunu Paylaş:
  • Google+
  • E-Posta
Etiketler:

YORUMLAR

SPONSOR VİDEO

Rastgele Yazarlar

  • Deany Boii

    Deany Boii

    27 Kasım 2007
  • lane182videos

    lane182video

    6 EKİM 2011
  • monkophile

    monkophile

    25 Temmuz 2007