4 ms·
That is true, but has nothing to do with "==" vs "=" vs ":=". You can do: func(x = 42); /* syntax error: expression operator expected, got '=' */ x = 42; /
by a1369209993 6y ago
That is true, but has nothing to do with "==" vs "=" vs ":=". You can do:
func(x = 42); /* syntax error: expression operator expected, got '=' */
x = 42; /* OK */
x == 42; /* warning: statement expression has no effect */
just fine if you require "=" to be a statement.