Rob van der Woude's Scripting Pages
Powered by GeSHi

Source code for hex2dec_php.bat

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

  1. @ECHO OFF
  2. :: https://www.robvanderwoude.com/batchphp.php
  3. :: Usage:  "hex2dec 0xF" or "hex2dec F" both return "15"
  4. SETLOCAL
  5. SET Hex=%~1
  6. IF /I "%Hex:~0,2%"=="0x" SET Hex=%Hex:~2%
  7. PHP -r print(hexdec(%Hex%));
  8. ENDLOCAL
  9.  

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