Re:Why Does “=” Mean Assignment?
by paulddraper on Tuesday April 10, 2018 @04:40PM
(#16805108)
By that logic,
a <= 1
Should set a to the minimum of a and 1. I.e. after that statement the variable will indeed be less than or equal to the RHS.Languages borrowing the syntax don't need to follow its logical consistency. I just thought it was an interesting anecdote.
What about `a = a + 1`?
Coincidentally in async languages like Verilog there is a another assignment operator '<=' which means that the variable won't take the new value until the next clock cycle (or more explicitly the next evaluation of the process block). '=' exists also and has the same meaning as with traditional languages.