7,703 questions
Advice
2
votes
2
replies
99
views
Bool and int comparisons in C++, and why does putting variable containing integer into if-else goes to if branch?
While in C++ this code:
#include <iostream>
using namespace std;
int main()
{
int a = 1;
cout << (a == true) << endl;
}
will display 1,
this code:
#include <iostream>...
-1
votes
1
answer
106
views
Is it not possible to write: "result.plus(if (condition) 1f else 0f)" in kotlin?
Let's assume conditionalVariable is true. Then for me:
This returns 0f:
result = 0f
result.plus(if (conditionalVariable) 1f else 0f)
return result
while this returns 1f:
result = 0f
if(...
1
vote
1
answer
173
views
What exactly is a context of an expression?
Up until now, I thought of a context as a place in the code that expects a certain kind of expression. The Rust Reference on Expressions writes for example that:
The following contexts are place ...
4
votes
1
answer
198
views
How can the operand of a dereference operator be of type &mut T, but fail to be a mutable place expression?
In the Rust Reference’s page on the dereference operator, it is said that:
If the expression is of type &mut T or *mut T, and is either a local variable, a (nested) field of a local variable or ...
2
votes
2
answers
129
views
Does a dereference operator expect a place-expression or a value-expression?
This document explains the differences between a place expression (an expression that evaluates to a "place", where something can be stored) and a value expression (an expression that ...
7
votes
1
answer
290
views
Difference between Expression.Return and Expression.Goto in C# Expression Trees
I'm experimenting with C# Expression Trees and trying to understand the difference between Expression.Return and Expression.Goto. I can’t create an example where Return and Goto behave differently ...
1
vote
3
answers
190
views
Comparing multiple flags at once
I have a script which checks the value of a series of flags before deciding on an execution pathway. Because of the way the script executes, the flag values are held as script properties, therefore ...
1
vote
3
answers
135
views
execute a set of different commands specified in a list
I have a repeated task that demands executing slightly different sub-parts of commands in each task.
Each task starts the same, but then I have to go into direction A, B, C, D... for each task.
My ...
1
vote
1
answer
91
views
Issue with expression using IIF with multiple parameters
I am trying to create an expression with an IIF statement:
1st condition that takes a parameter minus 1 = field1
2nd condition takes another parameter = 'field2
true
false
I have tried to use switch, ...
-2
votes
1
answer
119
views
Expression compiler for .NET [closed]
We have a system with many logic expressions, they're implemented as series of boolean functions operating on variables and the rules are stored as XML. As the XML files are compiled into the assembly ...
3
votes
1
answer
230
views
Why is `""s.size()` legal, but `5ms.count()` is not? [duplicate]
#include <chrono>
#include <string>
using namespace std::literals;
int main() {
""s.size(); // ok
(""s).size(); // ok
(5ms).count(); // ok
5ms....
0
votes
0
answers
50
views
Android mXparser miscalculation
I'm converting an Xcode app to Android.
Part of the app takes a string mathematical expression and using NSExpression (Xcode) connects and calculates a result.
In Android I've used mXparser, but ...
0
votes
0
answers
230
views
Use Unicode symbol in SSRS report
I need to add a globe symbol into a field on my SSRS report. I cannot find it in Webdings or any of the Wingdings. I found it in Unicode with the link below. 1F30E is the symbol I am trying to add. Is ...
-1
votes
1
answer
106
views
How do I filter data based on text expressions? [closed]
Now I can read data from a database and can map the data to a case class using a ORM the case class is like following
case class Example(a: Double, b: Double)
And I have a text file and this file ...
1
vote
1
answer
46
views
SSRS - EXPRESSION - HANDLING NULL VALUES AND LINEBREAK FOR AN CONCATENATED FIELD
I have a column that is concatenated; separated by a semicolon. I wrote an expression to check for null values and to get a line break at the semicolon. It is doing the right thing where there is data ...