in reply to Variable assignment after logical OR
You have a precedence problem.
General rule:
Use or to join statments together (where you'd otherwise use an if).
Use || when you'll use the result of the operation (i.e. in an assignment, to pass to a function, etc).
Omitting parens from function calls has a few pitfalls, including this one. You might be better off using them.
|
|---|