Sunset programming? - page 10

 
Реter Konow:

Well, let them. I don't care about other people's thoughts from the bearded years.))

I hope it's not the incandescent light bulb, there are LEDs now.

 
Aliaksandr Hryshyn:
Let's start with examples of the simplest algorithms with a visual representation. Let's consider this: a table contains the names of people and their ages, we need to find the age of a person by his surname. A loop, an array of structures or its analog, a description of the structure. We will immediately separate the different types, we don't need errors, we won't allow to store surnames in int type.

Yes. But first, I will describe the simplest GUI mechanisms, which I know like the back of my hand. I will imagine how it looks like at the level of parameters and connections, and then I will try to describe the system visually.

We will also look into your example. Tomorrow.

 
Реter Konow:
Yes. But first, I will describe the simplest GUI mechanisms, which I know like the back of my hand. I will imagine how it looks like at the level of parameters and links, and then I will try to describe the system visually.

I don't care if it's just a simple HTML table. You just need to find the right one (age) by specified parameters (last name). In any case, you need to search for something to find the right one. Logic may be different. And let's say you specified not age but date of birth, and you need age. So the minimum you need to subtract from the current date.

P.S. Real example is simple as hell)))
 
Konstantin Nikitin:

It doesn't matter, even if it's a simple HTML table. You just need to find the right one (age) by some parameters (last name). In any case, you need to try and find the right one. The logic may be different.

P.S. This example is simple as hell )))


If you're talking about the bare search mechanism, it's something like this:

1. Create two parameter objects - Last Name and Age.

2. Create two selection objects - lists of Surnames and Ages.

3. Connect a Surname picker object to the Last Name object.

4. Connect a selection object for ages to an object-parameter for ages.

5. Fill both selections (enter text into the list).

6. Connect the object-parameter by a mapping.

7. Place a handler in the middle of the bundle.

8. Connect the handler to the last name input field parameter.

9. Connect the handler to the output field for age (second handler connection).

10. The handler operates according to the principle - selection point 1 = selection point 2.

11. The input event in field 1 generates a match loop in the first sample, gets the item number and goes into the match search in the second sample, where it looks for the received number from the first sample.

12. The resulting value goes into the age output field.

//------------------------------------

Документация по MQL5: Константы, перечисления и структуры / Константы объектов / Типы объектов
Документация по MQL5: Константы, перечисления и структуры / Константы объектов / Типы объектов
  • www.mql5.com
При создании графического объекта функцией ObjectCreate() необходимо указать тип создаваемого объекта, который может принимать одно из значений перечисления ENUM_OBJECT. Дальнейшие уточнения свойств созданного объекта возможно с помощью функций по работе с графическими объектами.
 
In itself, the above handler is simple. It has a loop. Of course, you need minimal code to create it, but once you create it once, it can be used in other systems. If it doesn't fit 100%, modify instances of that handler to inherit from the generic template.
 
CREATE TABLE "staff" (
        "surname" TEXT,
        "age"     INTEGER
);

SELECT age FROM staff
WHERE surname='Deer';
 
Igor Makanu:
Let's see what SQL code you put out tomorrow when I describe the GUI mechanism structures in a visual representation.))
 
Реter Konow:
Let's see what SQL code will be posted tomorrow, when I will describe GUI mechanism structures in visual representation)).

I'm not against it.

this is the concept of modern programming, which you deny - there is a problem, there is a solution, but 99% of problems already have ready-made solutions, you just need to have some knowledge, not to invent something new every time

the aim is to complete a task, not to write code for the sake of writing code? - imho, there are a lot of interesting things besides writing code

 
Igor Makanu:

I'm not against it.

this is the concept of modern programming, which you deny - there is a problem, there is a solution, but 99% of problems already have ready-made solutions, you just need to have at least some knowledge, not to invent something new every time

the aim is to complete a task, not to write code for the sake of writing code? - imho, there are many interesting things besides writing code

This philosophy is alien to me. This consumerism is sickening, frankly speaking. There's no ego in it. Some kind of bowing down to the world and accepting someone else's as the only right and irreplaceable. You can't fight for a place in the sun with such views. You can only lose to everyone else and stand at the end of the line. Sorry. No offence.

 
Реter Konow:

This philosophy is foreign to me. This consumerism is sickening, to be honest. It has no ego of its own. Some kind of bowing down to the world and accepting someone else's as the only right and irreplaceable. You can't fight for a place in the sun with such views. You can only lose to everyone else and stand at the end of the line. Sorry. No offense.

No offense taken.

There's a whole other way to get a place in the sun.... it's like the joke, "the horse worked hardest in the collective farm, but he never became chairman".