A truly amazing result!!! - page 3

 
nen >> :
There is a standard and it must be adhered to. And if the developers produce their own standard which contradicts the generally accepted one, then... dirt is... rubbish.

You were given a tool to work with. You should thank the developers. If you don't like it, don't use it! Write in C.

 
In MQL4 the operation is
bool r1 = a>=s && a<=f && s<=f || (a>=s || a<=f) && s>f;

happens like this :



bool r1 = a>=s && a<=f && (s<=f || (a>=s || a<=f)) && s>f;

and the standard is this:



bool r1 = (a>=s && a<=f && s<=f) || ((a>=s || a<=f) && s>f);
 
Dedka писал(а) >>

You have been given a tool to work with. You should thank the developers. If you don't like it, don't use it! Write in C.

You don't have to reinvent the wheel. You have to stick to the standards everyone is taught at school.

If every person wants to do whatever he/she wants, it'll be a mess...

And I use the tool provided by developers. There are no complaints on the results of developments...

 

Yes, of course natural laziness is the engine of progress. I understand the argument - give you a tool and use it.


But one thing.


The tool is announced as a language with syntax similar to C.


It's a shame that similarity is so imperceptibly substituted at the heart of logical operations.


I certainly put brackets, but I put them in Java and C and take those brackets the way they are written back in Fortran and the way I was taught at university.

 
We do put brackets, of course, but when multiplication is less than addition.
I'd like to wish you "Further success in the fight against peculators!"
 
sol >> :

Yes, of course natural laziness is the engine of progress. I understand the argument - give you a tool and use it.


But one thing.


The tool is announced as a language with syntax similar to C.


It's a shame that similarity is so imperceptibly substituted at the heart of logical operations.


I certainly put brackets, but I put them in java and C and take those brackets the way they are written back in Fortran and the way I was taught at university.


In fact, even the various C++ implementations have several incompatible standards. And although Java has a single standard for all implementations, it is incompatible with most C++ implementations in some respects.



For example:


int a = 3;

int b = 5;


b += a += b += 7;


Java will give b = 20;

C++ will give b = 27 in most implementations;


So, don't gobble, gentlemen - there are no common standards, but there are programming language reference books and brackets.

 
Dedka писал(а) >>

You have been given a tool to work with. You should thank the developers. If you don't like it, don't use it! Write in C.

But don't pour your venom here.

It shows how inaccurate the tool is. This helps developers make their product better, eliminate bugs, glitches, etc. Of course, if they find it necessary and possible. Thanks to posts like these, MQL becomes better from build to build.

S.Y. Quite a few bugs were detected in C as well. If you go down the chain, your next advice should be to write them directly in machine codes - everything will definitely work there ))))

 
Rosh >> :

To be honest, I've never learned the priorities of logical and bitwise operations. Due to innate laziness, I just put parentheses in all the right places.

"There's a lot, friend Horace...."

I quite agree!

---

I hate constructions you have to wade through like a coniferous forest.

I'd rather write clearer code - it's easier for me later

---

for example:

I've always preferred to create one fancy SQL query

3 simple ones, by the way, as practice shows it tends to work faster

provided that the first query will eliminate as much as possible

besides, the code becomes clearer

---

in C and MQL4 similarly! I try to write simpler constructions

and I'd rather put brackets myself.

 

Stop! What does this have to do with standards or conventions? It is a totally different area of error that turns all mathematics upside down.

The mathematical basis of digital electronics and computing is the algebra of logic (or Boolean algebra), in which definitely (axiomatically)

The logical addition of "or" (disjunction ) and the logical multiplication of "and"(conjunction).

How then all KNFs and DNFs that we studied at uni? I think we need to fix this urgently and not embarrass ourselves.

 
Galaxy писал(а) >>

What about all the QNFs and DNFs we studied at uni?

Studied logic for programming over 30 years ago. Decipher the abbreviations of KNF and DNF.