What's all this nonsense about the tab character{t}?

 

I wrote an indicator and decided to output the information via

Comment();

I have made a simple test code and as a result the most recent message at the top of the Alerte is displayed correctly.

I wrote a simple test code and as a result in Alerte the most recent message at the top is displayed correctly, but this message in the message history is already with nonsense, as well as all other messages in the history.

Is it supposed to be like this? Looks like a bug to me. Comment on this, please.

Yeah, here's the documentation on it https://docs.mql4.com/ru/basis/types/literal

Here's the code

#property indicator_chart_window
int init()
  {
   Comment("Тест на выставление символа табуляции вот здесь 2 раза -> \t 1\t 2", " а теперь новая строка \n это уже на новой строке 3 раза табуляция \t\t\t 777");
   Alert("Тест на выставление символа табуляции вот здесь 2 раза -> \t 1\t 2", " а теперь новая строка \n это уже на новой строке 3 раза табуляция \t\t\t 777");
   return(0);
  }
  
int deinit()
   {
    Comment("");
    return(0);
   }
 
Yes. It's a bug.
 
alsu >> :
>> Yes. This is a bug.

This is not a bug, the Comment() help only says about line break and nothing about tabulation

The line feed character "\n" or "\r\n" can be used to split the printout into multiple lines.

 
Rosh писал(а) >>

This is not a bug, the Comment() help only says about line breaks, but nothing about tabs.

Let's say for Comment() tabulation doesn't work and wasn't originally intended (which I think is kind of weird, but okay...).

But where does it work then? It's written about it here for something https://docs.mql4.com/ru/basis/types/literal

And with Alert() in general it's interesting (see a screenshot in the 1st topic) I doubt that it was designed that way, so that in the upper part of the window everything would be displayed nicely, and in the lower part with squares instead of tabs. I.e. Alert() understands this symbol (since last message in upper part of the window displays with tabulation), but in help about Alert it was written only about line feed symbol "\n" or "\r\n".

Where can I use tabulation?

 
ALEX_SPB_RU >> :

Let's say the tab does not work for Comment() and was not originally intended for it (which I think is kind of weird, but okay...)

But where does it work then, because it's written about it here for something https://docs.mql4.com/ru/basis/types/literal

Open Expert Log (log file), there will be tabs (although in the terminal itself tabs are shown as squares).

 
Rosh писал(а) >>

Open the Expert Log (log file), there will be a tab (although the terminal itself shows tabs in squares).

Sorry for being so annoying, but this is the last point I want to clarify.

1. so when displaying information that it is displayed in the form of a table with smooth edges, because the data displayed will be of different length (say one time output 25, and another 1023), I would not be able to do it, because it is the tabulation allows you to do it (at least in C and other languages, I did so)? I can of course do it through objects... ...but it's something else.

2. Was it really intended to display the tab character correctly somewhere and not somewhere? Or is there some fundamental difficulty???

Thank you, for your prompt response.

 

By the way, this indicator (attached below) is the reason for all the fuss.

Is it worth putting it in the database or not?

Files:
 
ALEX_SPB_RU >> :

2. Is it really the intention that the tab character will be displayed correctly somewhere and somewhere not??? Or is there some fundamental difficulty???

Thank you, for your prompt response.

But do you know that there is a function TabbedTextOut ? I don't know either. :-)

And the listview with custom draw- if you don't just change the colour of the line- so ugly!!!

And with all this it takes me two hours to figure it out! :-)

 

In the messagbox, the tabs work...

MessageBox("graal\t40\nsum\t120","tab",0);
 
kombat писал(а) >>

The tabs work in the messagbox...

Well this is not surprising because in the alert which is displayed at the top on a grey background (exactly as it looks in the messagbox) they are also displayed as they should be...

That's what I wonder is their selectivity?

And the idea was just through the comment to do because it's easier than anything else, but this turned out to be the same nuance.

 
ALEX_SPB_RU >> :

Sorry for the annoying last point I want to find out.

1. so, when outputting information, so that it is output as a table with even edges, because the output data will be of different length (let's say one time I output 25, the other 1023) I can not do it, because it is the tabulation that allows to do it (at least in C and other languages I did it)? I can of course do it through objects... ...but it's something else.

2. Was it really intended to display the tab character correctly somewhere and not somewhere? Or is there some fundamental difficulty???

Thank you, for your prompt response.

I can tell you that this has been the case for a long time, since the beginning. Here are the links to the topic in question: