March 15, 2023 at 12:00 am
Comments posted to this topic are about the item Decoding Set Options
March 15, 2023 at 10:13 am
I get it right, but I admit that the question is a little confusing: the value of 4 is the 3rd bit (starting from position ZERO, 2 is the right one). So, I understood you want to decod ANSI_WARNINGS that is GET_BIT(@@OPTION,3).
March 15, 2023 at 1:07 pm
Yeah, I have to admit this one was a little confusing. According to the documentation "Value 4" on the user options table is referring to CURSON_CLOSE_ON_COMMIT. If you take it as the @@OPTIONS variable returns 4 (which is decimal) then you still end up with 0100 in binary which still indicates that value 4 of the user options table is set (CURSON_CLOSE_ON_COMMIT). If you ignore that and only read it as "How do you determine if SET ANSI_WARNINGS is enabled/disabled?"; then it makes more sense. At least to me...
March 15, 2023 at 9:52 pm
They do it in a lot of languages... I hate it when people number the bits differently than the exponent of "2".
--Jeff Moden
Change is inevitable... Change for the better is not.
March 20, 2023 at 4:00 pm
The whole 0 or 1 based thing seems incredibly annoying to me. Someone should have just stated everything is 0-based early on and demanded all languages stick to this.
March 20, 2023 at 4:45 pm
+1000
--Jeff Moden
Change is inevitable... Change for the better is not.
March 21, 2023 at 7:52 am
Once you actually get it that you need to work with OFFSET instead of pointers, handling bitwise operations will start working.
I always have such problems when I'm in the US and people state they live on the first floor.
At home this actually is groundlevel ( offset 0 ) - we only number and count the levels above or under ground level - and our first floor is called second floor in the US.
But, as always, bitwise operations are fun once you start using operators.
Johan
Learn to play, play to learn !
Dont drive faster than your guardian angel can fly ...
but keeping both feet on the ground wont get you anywhere :w00t:
- How to post Performance Problems
- How to post data/code to get the best help[/url]
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution
Need a bit of Powershell? How about this
Who am I ? Sometimes this is me but most of the time this is me
March 21, 2023 at 1:45 pm
Heh... I'm thinking about Left_Shift() and Right_Shift() (I always knew them as Shift-Left and Shift_right in the old days). I can see that giving new meaning to the term RBAR. I'd call it BBAB bit I've already assigned that term to "Befriended By A Bot". Saw that happen last week on LinkedIn. Really strange.
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy