@Nick_Craver@E_Craver You can built one and claim that you haven't technically _bought_ it. Plenty of tutorials on YouTube, and doesn't need a lot of space.
Interesting that Interlocked.CompareExchange doesn't support booleans. I wonder how bool is implemented in .net and if it could have magically been treated as an int. That's what I did now, have a private int and a public bool that checks if _privInt == 1.
One of the least believable aspects of Science Fiction is that the ship's computer warning messages are always concise and helpful. "Coolant leak detected" instead of "Sensor ENTMPF1 has been outside threshold for the past 5 minutes" between 600 other downstream failure logs.
@mstum In VB bool true represented as -1, because it allows using the same ops for bitwise and logic operations
In asm (at least for the 8086), equality is tested by jumping if subtracted value is 0/non-0.
That's why I think most languages also picked 0/non-0 to differentiate bools
@porges But then I have to worry about an access to the AtomicFlag to be atomic :) (I guess having it a struct and only using fields could work, but I'd have to do some testing for that)
@yortw@IDisposable Both 0 and 1 have been used for false in different contexts. I think C programmers often use 0 for false, but e.g., Unix programs usually use an Exit Code of 0 as Success and anything else as Failure (not a "real" bool, but it creates a mindset). -1 as True is neat though!
@vcsjones I wonder if she doesn't own a computer, but wants to use their free e-filing for a lot of cases? (Standard deduction only, W-2, allows EIC and Child Tax credits)