Errors, bugs, questions - page 2569

 
Roman:

Yes, and it contains rubbish.

The question was quite different. To initialize with an empty value, not zero. If such a thing is possible at all.
Zero is a number! An empty value as I understand it, no numbers, nothing.
But memory cells are initialized with this emptiness ))

How do you imagine it?

A memory location always contains something. A single byte can contain a number between 0 and 255.

An empty value is not provided.

 
Roman:

Yes, and contains rubbish.

The question was quite different. Initialise with an empty value, not zero. If that's even possible.
Zero is a number! An empty value as I understand it, no numbers, nothing.
But memory cells are initialized with this emptiness ))


Anything is possible, but the task is not clear. Either allocate from char range codes with special state if possible(CHAR_MAX- empty, CHAR_MAX-1 - error, etc.), or parallel to char array store flags describing character array state (one byte - "empty" flags for eight cells). But this is probably not needed at all, strange want.

ZS: probably the influence of languages where all arrays are associative
 
Roman:

Yes, and contains rubbish.

The question was quite different. Initialise with an empty value, not zero. If that's even possible.
Zero is a number! An empty value as I understand it, no numbers, nothing.
But memory cells are initialized with this emptiness ))

It doesn't work that way))) A byte is a unit of information. If it is there, then there is a value.
 
Maksim Emeliashin:

MT5 Build 2145 dated 17 September 2019.

When the tester starts, it automatically disables the local network agent cluster. If it is forced on, the next time the tester is started it forcibly turns it off again.

So sick and tired of the problem that drags on for half a year when suddenly half of the agents stop accepting the job and you have to force them off and on again,

and now I have to turn on the local agents every time the tester starts up.

What is displayed in the tester's logbook when doing this?

 
Slava:

What is displayed in the tester's logbook when doing this?

Already got it, there was a debug version of the EA, apparently it cannot be used for the tester in local agents, but only in those on your computer, although it's not clear why.
 
Roman:

Yes, and contains rubbish.

The question was quite different. To initialize with an empty value, not zero. If that's even possible.
Zero is a number! An empty value as I understand it, no numbers, nothing.
But memory cells are initialized with this emptiness ))

for example, initialise different types with "empty"

   uchar  c=EMPTY_VALUE;
   uint   i=EMPTY_VALUE;
   ulong  l=EMPTY_VALUE;
   short  s=EMPTY_VALUE;
   float  f=EMPTY_VALUE;
   double d=EMPTY_VALUE;
   string str=EMPTY_VALUE;
   uchar uc[];
   StringToCharArray(str,uc);

which we have in HEX form when debugging:


With strings, it's a funny thing.


but if the string is initialized like this

string str="";

then the result:


Well, if you don't initialize(string str;) at all as well as initialize =NULL, then what you need is a real void:


 
Nikolai Semko:

for example, initialise different types with "empty"

which we have in HEX form when debugging:


With strings, it's a funny thing.


but if the string is initialized like this

then the result:


Well if you don't initialize(string str;) at all as well as initialize =NULL, then what you need is a real void:


Where did you see a void? It's called array overrun. In C/C++ undefined behaviour and here runtime error.
All other types are implicitly casted from double, so that's right there too.
 
Vladimir Simakov:
Where do you see emptiness? It's called array overrun. In C/C++ undefined behavior, and here it is runtime error.
All other types are implicitly casted from double, so everything is correct there too.

String is empty (not uchar array), as if it does not exist, i.e. not even memory is allocated.

This is observed in other types. If you declare a variable, it means that memory is already allocated.
But in fact, string is not a primitive type, but a reference type, just like any array.

 

can't figure out how to checkPrintFormat

Note

PrintFormat() is not executed in the strategy tester in optimisation mode.

Any thoughts?

 
Igor Makanu:

can't figure out how to checkPrintFormat

Note

PrintFormat() is not executed in the strategy tester in optimisation mode.

Any thoughts?

Check what?

Want to see how it is printed?

In the visualiser.