Top "Operator-keyword" questions

In several languages, the operator keyword is used to identify methods which will be used in operator overloading.

Python AND operator on two boolean lists - how?

I have two boolean lists, e.g., x=[True,True,False,False] y=[True,False,True,False] I want to …

python list boolean operator-keyword
C++ - overloading [] operator

I have a template class Array: template <class T=int, int SIZE=10> class Array { T TheArray[SIZE]; public: …

c++ operator-overloading overloading operator-keyword
Are Variable Operators Possible?

Is there a way to do something similar to either of the following: var1 = 10; var2 = 20; var operator = "<"; console.log(…

javascript variables operators operator-keyword dynamic-variables
How do I create and use a class arrow operator?

So, after researching everywhere for it, I cannot seem to find how to create a class arrow operator, i.e., …

c++ class operator-keyword
Boolean operators precedence

I would like to know if operator precedence in programming languages depends on implementation or there is a fixed rule …

boolean operator-keyword operator-precedence
php string number concatenation messed up

I got some php code here: <?php echo 'hello ' . 1 + 2 . '34'; ?> which outputs 234, but when I add …

php string concatenation operator-keyword operator-precedence
Why doesn't C++ have a power operator?

Many languages have a power operator; why doesn't C++? For example, Fortran and Python use ** and is commonly written (in …

c++ operator-keyword
Python: multiplication override

So, I've got a custom class that has a __mul__ function which works with ints. However, in my program (in …

python overriding operator-keyword
The difference between '+=' and '=+'?

So I have a simple piece of code that prints out the integers 1-10: i = 0 while i < 10: i += 1 print(…

python operator-keyword
C++ [] array operator with multiple arguments?

Can I define in C++ an array operator that takes multiple arguments? I tried it like this: const T& …

c++ arrays operators operator-keyword