Advertisement
Guest User

Untitled

a guest
Feb 18th, 2017
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @echo off & setlocal EnableDelayedExpansion
  2.  
  3. set While=if "%1" equ "While" ( for /L %%? in () do if
  4. set Do=(
  5. set EndWhile=) else exit ^^!WhileResult^^! ) else cmd /Q /C "%~F0"
  6.  
  7. if "%1" equ "While" goto %2
  8.  
  9.  
  10. rem A Fibonacci While
  11. set /a "x=0","y=1
  12. :WhileBody
  13. %While% !z! leq 500 %do%
  14.   if defined z echo !z!
  15.   set /a "z=x + y", "x=y", "y=z"
  16. %EndWhile% While WhileBody
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement