Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^5: How can I set a bit to 0 ?

by kcott (Archbishop)
on May 27, 2022 at 05:13 UTC ( #11144219=note: print w/replies, xml ) Need Help??


in reply to Re^4: How can I set a bit to 0 ?
in thread How can I set a bit to 0 ?

I thought about what you had written whilst traveling to and from my appointment. On returning, I modified my original code, tested it and posted an update.

There were no replies when I started to compose my post. I got distracted midway and, when I did post, I saw ikegami had replied; however, I had to rush off for $work and didn't really look at it closely.

Thanks for your further explanation. Unfortunately, the vaccine is already taking effect and the code is just spinning around before me. Looks like another weekend of being completely ga-ga: probably best to revisit this in a few days.

— Ken

Replies are listed 'Best First'.
Re^6: How can I set a bit to 0 ?
by syphilis (Archbishop) on May 27, 2022 at 09:55 UTC
    There were no replies when I started to compose my post. I got distracted midway and, when I did post, I saw ikegami had replied

    Yes - I have a similar policy. If there's no replies when I start composing one, I just send my post off anyway, as soon as it's finished.
    It's a policy that has been known to result in egg on face - but egg is good for the complexion ... so it's "Win-Win!!".

    The interesting thing with this thread is that I can't see how any of the replies (including GF's diversion) relate to the original post.

    bartender1382 posts some nonsensical snippet that doesn't even compile ... and everyone has a ready made solution !!
    GrandFather is even able to provide some evaluation of the different approaches !!

    I am clearly unfit to sit at the same table ;-)

    Cheers,
    Rob
      > bartender1382 posts some nonsensical snippet that doesn't even compile ... and everyone has a ready made solution !!

      you seem to miss that he's using constants, like so often in bit operations.

      DB<44> use constant {upload =>0b1, getTicket =>0b10, downLoading=>0b +100}; DB<45> use warnings; use strict; say my $stats = upload | getTicket +| downLoading; 7 DB<46>

      > The interesting thing with this thread is that I can't see how any of the replies (including GF's diversion) relate to the original post.

      Now I'd be interested to know how I failed to answer exactly the question given in a concise way, especially given the level of the OP.

      Plus explanation most others were lacking including the correct terminology and multiple further read-more links.

      Cheers Rolf
      (addicted to the Perl Programming Language :)
      Wikisyntax for the Monastery

        you seem to miss that he's using constants

        You seem to assume that he's using constants ;-)

        Unfortunately, he hasn't provided the definitions of those labels, let alone an SSCCE, so it's all guesswork.


        🦛

        Now I'd be interested to know how I failed to answer exactly the question given in a concise way, especially given the level of the OP.

        I didn't say that you (or anyone else) had failed to answer the question.
        All I said was that I couldn't see how the answers given related to the question that was asked ... for the simple reason that I couldn't work out what the question actually was (owing to lack of details given).
        Sure, I know the OP wants to set bits in something - in a PV ? in an IV ? in an NV ? in some object (maybe Math::GMP or Bit::Vector) ?

        Everyone else seems to reckon they know, and if they were able to deduce that from the original post, then well done !!
        But I don't have that level of psychic acuity.

        Cheers,
        Rob
Re^6: How can I set a bit to 0 ?
by kcott (Archbishop) on Jun 02, 2022 at 05:59 UTC
    "... the vaccine is already taking effect ... probably best to revisit this in a few days."

    Well, that certainly knocked me for six. I originally posted early Friday morning; it's now late Thursday afternoon and I'm only just starting to return to normality.

    It certainly wasn't my intention to start such a long subthread. :-)

    — Ken

      Mine is a long and a sad tale!” said the Mouse, turning to Alice, and sighing.
      “It is a long tail, certainly,” said Alice, looking down with wonder at the Mouse’s tail; “but why do you call it sad?
      (Alice in Wonderland, chapter 3)
Re^6: How can I set a bit to 0 ?
by LanX (Sage) on May 27, 2022 at 13:20 UTC
    Ken you did nothing wrong, except suffering from a raging cranky old man disease.

    Your answer compiled and you didn't deserve those reactions partly due to herd instinct.

    It's a Perl forum, not a obfuscated C board and TIMTOWTDI.

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    Wikisyntax for the Monastery

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11144219]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (3)
As of 2022-08-12 05:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?