Advertisement
IcarusLives

%plot% demo

Jun 7th, 2017
276
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 0.81 KB | None | 0 0
  1. @echo off & setlocal enableDelayedExpansion
  2.  
  3. mode 53,53
  4.  
  5. set ^"LF=^
  6.  
  7. ^" Above empty line is required - do not remove
  8. set ^"\n=^^^%LF%%LF%^%LF%%LF%^^"
  9.  
  10. set plot=for %%# in (1 2) do if %%#==2 ( for /f "tokens=1-3" %%1 in ("^!args^!") do (%\n%
  11.     set /a "_y=%%2", "_x=%%1", "_x2=%%1 + 1"%\n%
  12.     for /f "tokens=1-4" %%a in ("_y ^!_y^! ^!_x^! ^!_x2^!") do set "_[^!%%a^!]=^!_[%%b]:~0,%%c^!%%3^!_[%%b]:~%%d^!"%\n%
  13. )) else set args=
  14.  
  15.  
  16.  
  17.  
  18. for /l %%a in (1,1,50) do set "_[%%a]=                                                  "
  19.  
  20. for /l %%a in (1,1,50) do (
  21.     set /a "r1=!random! %% 49 + 1
  22.     set /a "r2=!random! %% 49 + 1
  23.    
  24.     %plot% r1 r2 @
  25. )
  26.  
  27. echo ####################################################
  28. for /l %%a in (1,1,50) do echo=#!_[%%a]!#
  29. echo ####################################################
  30. pause & exit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement