Top "Operators" questions

ruby: what does the asterisk in "p *1..10" mean

the line p *1..10 does exactly the same thing as (1..10).each { |x| puts x } which gives you the following output: $ ruby …

ruby operators range
lvalue required as increment operand error

#include <stdio.h> int main() { int i = 10; printf("%d\n", ++(-i)); // <-- Error Here } What is wrong …

c++ c operators lvalue rvalue
Prolog operator priority

The user input is given in the format a:b>c>d>e... and so on. I …

prolog operators iso-prolog
Swift, two issues. 1) weak var 2) bang operator for @IBOutlet

Per: @IBOutlet weak var nameLabel: UILabel! Whenever I declare my IBOutlets, i just use var instead of weak var. But …

swift operators automatic-ref-counting iboutlet
Why [] == [] is false in JavaScript?

I am working on a part of the code where I have an array which looks like [[data]]. The data …

javascript operators comparison-operators
Difference between "!==" and "==!"

Yesterday I stumbled over this when I modified PHP code written by someone else. I was baffled that a simple …

php comparison operators comparison-operators
"&&" and "and" operator in C

I am trying to calculate the Greatest Common Denominator of two integers. C Code: #include <stdio.h> int …

c operators logical-operators
How to avoid short-circuit evaluation on

I'm working with Ruby on Rails and would like to validate two different models : if (model1.valid? && model2.…

ruby-on-rails operators logical-operators short-circuiting
Do all C++ operators return something?

All C++ operators that I have worked with return something, for example the + operator returns the result of the addition. …

c++ operators
OCaml: Why I can't use this operator infix?

I defined a custom equality operator (the definition is not really important so I will insert dummy stuff): let ( ~=~ ) a …

operators ocaml