Questions tagged [operand]
177 questions
4
votes
2 answers
Order of operands in C
Say you have x = exp1 + exp2 in c. It might be evaluated by first evaluating exp1 then exp2 and adding the results however it may evaluate exp2 first.
How do you find out which side is evaluated first? I would like to make x = 1/2 depending on…

Ketameme
- 101
- 6
4
votes
1 answer
CakePHP Unsupported Operand
I am getting the below error in CakePHP, the function works fine in PHP just not Cake, does anyone know why this is not supported or a workaround?
Error: Unsupported operand types
File: /var/www/spitdev/console2/app/Lib/IpLib.php
Line: 40
Notice:…

Steven Marks
- 704
- 1
- 6
- 21
3
votes
1 answer
SQL order of operations for logical operands
I inherited some some bad SQL code (zero documentation and I'm missing the original requirements). In the where clause, it has the following:
A OR B AND C AND D OR E
From my knowledge of logical operands, my assumption is that SQL would compile…

user3654225
- 99
- 11
3
votes
1 answer
map() lambda() unsupported operand only with python 2.7.6
I am asking for help in last resort, I have a problem with my code that is driving me crazy.
I work with both Python 2.7.6 and Python 3.4.3 on Ubuntu 14.04 with the following very simple part of code that I took from there password generator…

PGriffin
- 31
- 2
3
votes
1 answer
SQL Server Always Encrypted Operand type clash: varchar is incompatible with varchar(60) when running EXEC sproc
I am unable to EXEC a stored procedure that upserts a table that has an encrypted column using Always Encrypted. However, I am able to copy the SQL from the sproc and run that as regular SQL with the parameters set, Just cannot get the sproc to fire…

sverble
- 31
- 1
- 4
3
votes
2 answers
Overloading operators: operand order when using C++ literals
I am writing a class and I got to the point where I can do operations that mix my class type objects and C++ literals, but in one direction only.
here is a simplified code that shows the idea:
#include
#include
using namespace…

Kamal Zidan
- 474
- 2
- 9
3
votes
2 answers
Do literals in C++ really evaluate?
It was always my understanding that l-values have to evaluate, but for kind of obvious and easily explained reasons. An identifier represents a region of storage, and the value is in that storage and must be retrieved. That makes sense. But a…

j_burks
- 93
- 5
3
votes
2 answers
Php unsupported operand type
I got this:
$newcw = array_rand( range( 1, 52 ), 15 ) ;
shuffle($newcw);
$year = date("Y");
$time = mktime(0,0,0,1,1,$year) + ($newcw * 7 * 24 * 60 * 60);
$time = $time - ((date('N', $time) - 1) * 24 * 60 * 60);
$startWeek = date('D d-M-Y',…

Jon Don
- 81
- 5
3
votes
5 answers
Error while running program with certain operator and operands in C
I was trying to run a program but it shows an error as:
Invalid binary operator float to int
When I tried making it float it says:
Invalid binary operator float to float
The problem is with % operator And its operands.
Please tell me what to…

Satyarth Agrahari
- 31
- 2
3
votes
4 answers
Evaluate multiple boolean conditions exclusively, only one can be true (Delphi)
I have a function which is evaluate multiple (7, in my case) boolean variables and conditions and the result is true if only one of them true (and the rest false of course). I have the following code:
function GetExclusiveTrue: boolean;
begin
…

tcxbalage
- 696
- 1
- 10
- 30
3
votes
2 answers
Doing operations between an int and double
I have a homework assignment in basic C that is asking me to calculate certain expressions and then check my answers in a program. I can't seem to get any of these answers correct by my own calculations...
They want me to solve math problems using…

jlest
- 85
- 2
- 3
- 6
3
votes
1 answer
Java calulator throws -bad operand types for binary operator '-'-
I get this error; bad operand types for binary operator '-'
All other operations work...when I leave out the subtraction via comments like // and /* */; can someone help?
This is the code by the way; the exception is on the subtraction line.
public…

MicrosoftNoiseMaker
- 33
- 1
- 3
3
votes
4 answers
How to enter a default value when a TextBox is empty
I have this method which SUM values in those textboxes, I wanted to improve it so if any of these textboxes is empty I would like to insert into it "0" but I didn't knew where to and what exactly put to make it work like I want. I have wondered…

Marek
- 3,555
- 17
- 74
- 123
2
votes
3 answers
Invalid types for operand "+" Ada 95
I have defined two integer ranges in ans spec file of Ada95, as follows:
type year is new integer range 1996..2100;
type month is new integer range 1..12;
When i'm compiling the code of the body file, i have a code line like this:
....
key:…

Osf
- 23
- 3
2
votes
1 answer
Postgres | IF statement with OR conditional
I have a stored procedure which is used to validate an incoming variable. If the variable is not 'maker' or 'member', then it should throw an error. If the variable is of the two above mentioned, it should continue normal processing.
The current…

Bill Bensing
- 193
- 2
- 17