Errors, bugs, questions - page 1537

 
coderex:
strange, how do you expect to pass a complex type of this (structure type) by nonreference? And theoretically imagine how it should be at all, if the size of structure is not constant by sizeof, the compiler at compile time should calculate the size of the structure object and... ugh, i can't even imagine how clever the compiler must be, not even in cp :)

Just like the assignment operator does. The compiler will only complain if the size of the structure is undefined

struct A
{
};

struct B
{
  string Str;
};

void F( void )
{
  A a1, a2;
  
  a1 = a2; // no problem

  B b1, b2;

  b1 = b2; // '=' - structure have objects and cannot be copied
  
  return;
}
 
comp:

Just like an assignment operator does. The compiler will only complain if the size of the structure is undefined

)))) The assignment operator only works if the structure is simple, and your structure B has a string field, which tells you that this structure is not simple but has a complex type... why this example? you asked a question about passing a structure as an argument to a function not by reference but by copying, i told you that even in cpp you can't do that, there's a rule for it, the web is full of information about it...
 
coderex:
)))) assignment operator works only if structure is simple, and your structure B has string field, which already says that this structure is not simple but has a complex type... and what's the point of this example? you asked a question about passing a structure as an argument to a function not by reference but by copying, I told you that even in cpp you can't do that, there's a rule for it, the web is full of information about it...

My example demonstrates this. The compiler knows perfectly well when you can assign and when you can't. And it's a perfect analogy of when you can only pass by reference and when you can also pass as an argument.

The question was "why ALWAYS can't?". Answering because somewhere out there something can't either - doesn't work. Asking why you can't actually do it in terms of language architecture? What can go wrong there to reject it?

 
Gentlemen, can you tell me if the Multiterminal manual is available somewhere?
 
vodoleyvl:
Gentlemen, could you tell me if there is a Multiterminal manual available somewhere?
What is Multiterminal?)
 
There hasn't been a multiterminal for some time now.
 
Hi all. Can you tell me where to get a lightweight terminal?
 

Is it possible to introduce more scales of the timetable?

ChartGetInteger(chart_ID, CHART_SCALE)
 

I use predefined macros when debugging. Is it also possible to conveniently find out who called the function/method without passing the relevant parameter to it?

 

Faced with a problem that so far the following hypothesis can explain.

Is it true that when an indicator is removed manually while OnCalculate is running, OnDeinit is executed immediately, sometimes at the same time as OnCalculate has not finished yet?

Reason: