Rob van der Woude's Scripting Pages
Powered by GeSHi

Source code for max_php.bat

(view source code of max_php.bat as plain text)

  1. :: https://www.robvanderwoude.com/batchphp.php
  2. :: Returns the largest of the numbers specified
  3. :: Usage:  "Max 4 16 0 -99" returns "16"
  4. @ECHO OFF
  5. SETLOCAL ENABLEDELAYEDEXPANSION
  6. IF NOT "%~2"=="" (
  7. 	FOR %%A IN (%*) DO SET Args=!Args!, %%A
  8. 	PHP -r "print(max(!Args:~2!));"
  9. )
  10. ENDLOCAL
  11.  

page last modified: 2024-04-16; loaded in 0.0094 seconds