Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.lang.c    |    Meh, in C you gotta define EVERYTHING    |    243,242 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 242,589 of 243,242    |
|    Michael Sanders to Michael S    |
|    Re: srand(0)    |
|    25 Dec 25 02:01:11    |
      From: porkchop@invalid.foo              On Wed, 24 Dec 2025 20:16:22 +0200, Michael S wrote:              > I agree that Powershell is too complicated and too "wannabe real       > programming language" which makes it bad shell scripting language.       > Esp. so for quick throwaway scripts.       >       > However I don't quite understand what you find wrong with cmd.exe.       > Cryptic? May be. But I can not imagine shell scripting language which is       > not cryptic in some way.       > Has few limitations that one would not expect in shell script in 2025?       > Yes.       > C:>set a= 1000000       > C:>set /A ab= %a% * 1000       > 1000000000       > C:>set /A ab= %a% * 2000       > 2000000000       > C:>set /A ab= %a% * 3000       > -1294967296       >       > But cmd.exe language certainly is *not* over-complicated. Rather more       > like too primitive.              Complicated doesn't quite capture the zeitgeist, closer to obtuse,       or baroque. An example below of a valid block that makes Perl look       good... Notice for instance the alternate use of set compared to       your example.              yours: set [option] var = assignment              below: set "var = assignment"              Not to mention some other quirks. But that's just my opinion.              @echo off              cd /d "%~dp0"       >nul chcp 65001       set "_MediaInfo=C:\Program Files\MediaInfo\MediaInfo.exe"              for /f ^usebackq^delims^= %%G in =;(` "%__AppDir__%where.exe" .:v*.mpg `);= do       for /f usebackq^delims^= %%i in =;(`        call "%_MediaInfo%" --inform^^^=Video^^^;^^^%%Height^^^%% "%%~fG" `);= do       rename "%%~fG" "%%~nG-%%~ip%%~xG"              >nul chcp 437              --       :wq       Mike Sanders              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca