• Re: ## is a godsend.

    From Branimir Maksimovic@21:1/5 to Chris M. Thomasson on Sat Oct 2 10:56:53 2021
    XPost: comp.os.linux.advocacy, sci.physics

    On 2021-10-02, Chris M. Thomasson <chris.m.thomasson.1@gmail.com> wrote:
    On 10/1/2021 9:29 PM, Jeff-Relf.Me@. wrote:
    ## is a godsend. From "z1.CPP" in "Jeff-Relf.Me/z1.ZIP":

    #define \( t, aTop ) { while ( ++i < PlotDays && !aTop[ i ] ); if ( i >=
    PlotDays ) continue ; i--, h = zHr = zDay = 0 ; \ Rel##t: _i = i ; \ >> while ( rv = 0, ++i < PlotDays && i - _i < 2 && ( h = aTop[ i ], Wig = .5f*( >> !zHr ? 1 : i - zDay ), rv = h > zHr - Wig && ( !zHr || h < zHr + Wig ), !rv >> ) ); \ if ( rv ) { zHr = h, zDay = i + h/24, _i = i ; goto Rel##t ; }
    if ( !zDay ) continue ; \ i = zDay + 12, DayCol = zDay - Day0, h = _24( zHr >> ), rv = Round( h ), *sChr( rv, zDay ) = L'\\', t = { 0, 0, iSurVerb, 0,
    zDay, zHr }; }

    Bowman:
    With a little "creativity" you can create [obfuscated] functions that you >>> never see unless you look at the preprocessor output.

    The same (foolish) argument is used to put down "goto".

    "#define" is the only way to define a child function smack dab in the middle >> of its parent function, retaining the parent's variables right there, in
    close proximity -- C++ (kinda) tries but fails in comparison.

    If things get hairy, manually expand the macro, to debug it, before turning >> it back into a macro again.

    P.S. "Squid Game" is a 9 episode TV show made in Korea. Well worth
    watching. In comparison, Hollywood is a rotting corpse.



    Are you familiar with the Chaos PP lib? Its hard fuc*ing core.

    https://github.com/rofl0r/chaos-pp
    ++++++
    His code does not compile BTW :P


    --

    7-77-777
    Evil Sinner!

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From rbowman@21:1/5 to Jeff-Relf.Me@. on Sat Oct 2 11:31:16 2021
    XPost: comp.os.linux.advocacy, sci.physics

    On 10/01/2021 10:29 PM, Jeff-Relf.Me@. wrote:
    ## is a godsend. From "z1.CPP" in "Jeff-Relf.Me/z1.ZIP":

    As I was saying, clever programmers can use # and ## to create
    completely obfuscated and unmaintainable code.

    I don't recall who said it but the gist of the statement was if you use
    every last ounce of your cleverness creating the code you ain't got shit
    left when it comes to debugging it.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)