Discussion of article "MQL5 Programming Basics: Lists" - page 8

 
C-4:

Nothing extra? Yes your classes are 100% redundant. All cl1 methods and data are almost completely duplicated by cl2 class, while base is empty.

Cl1 and cl2 are not duplicated, they are different classes, they have different methods. The base is empty because it is needed only to cram different classes cl1 and cl2 into one array.

Superfluous. Unless you could make one method in each class.

 
Integer:
They did. That's great. But as it turns out, there's more to it than that.

So what was there to show? Here's what the topstarter says:

papaklass:

It is possible to discuss substantially! How nice to read such an exchange of opinions.

To ThteXpert.

If it is not difficult for you, please give some examples of codes (you can use your own practice) that would reveal your theses. Do not forget that the majority of "dummies" are here (first of all, I am talking about myself).

I gave him a concrete example that you do not need a single collection that would work with different nodes, but one node that works with different collections, which in turn work with different classes. I have shown how it all works with CObject.
 
C-4:

So what was there to show? Here is the topikstarter writes:

I gave him a concrete example that you need not one collection that would work with different nodes, but one node that works with different collections, which in turn work with different classes. I've shown you how it all works with CObject.
Yes. It does, but that doesn't make us happy:)
 
papaklass:

... give some examples of codes (you can use your own practice), which would reveal your theses.

Man, I'd love to, but I don't have time for MT5 now. And a day or two will probably have to be spent on a normal implementation.
 
TheXpert:
Shit, I'd love to, but I don't have time for MT5 now. And it would probably take a day or two for a normal implementation.
Like with such a subtle hint that everything that was written here is a complete bullshit, and you alone have some magic method in your stash, but only it will remain unknown to anyone due to insurmountable circumstances. No wonder.
 
Integer:
Like with such a subtle hint that everything that was written here is a load of rubbish, and you alone have some magic method in your stash, but only it will remain unknown to anyone due to insurmountable circumstances. Not surprising.
Perhaps by the word "normal implementation" you mean implementation on templates.
 
Integer:

Um, I don't actually press codes. And I post a lot of stuff.

Integer:
Kind of a subtle hint that everything that's been written here is bullshit.

Not even close to such a hint. Many of the articles here are awesome. The codes are too.

Normal is on templates, yes.

Oh, yeah:
Why are you pussyfooting around here if you don't give a shit? )
 

Admins and moderators, what is this double standard?

Someone spews bile and mud - like water off a goose... and a regular dude gets banned for nothing.....

 

isn't it an MT5 error that a class member is changed in a const method of a class????

CiSingleList.mqh - compiles without errors.

//+------------------------------------------------------------------+
//|| Count the size of the list|
//+------------------------------------------------------------------+
void CiSingleList::CalcSize(void) const
  {
   TRACE_CALL(_t_flag)
   uint count=0;
   if(!this.IsEmpty()) // if the list is not empty
     {
      // processing a list with one node
      if(this.m_head==this.m_tail && this.m_head.GetVal()!=NULL)
         count=1;
      // otherwise go through the whole list 
      else
        {
         CiSingleNode *offNode=this.m_tail.GetNextNode();
         for(CiSingleNode *sn=this.m_head; sn!=offNode; sn=sn.GetNextNode())
            ++count;  // increase the counter
        }
     }
   this.m_size=count;
  }
Документация по MQL5: Основы языка / Типы данных / Структуры и классы
Документация по MQL5: Основы языка / Типы данных / Структуры и классы
  • www.mql5.com
Основы языка / Типы данных / Структуры и классы - Документация по MQL5
 
ALXIMIKS:

Isn't it an MT5 error that a class member is changed in a const method of a class????

Error, probably not fixed yet. They wrote somewhere recently.