Once again, about MQL localisation - page 7

 
DDFedor >> :

In general, I wanted to say that bureaucrats do not get into programming at all, financiers do not consider making their own "report" as programming, all this to say that we should distinguish between "user" and "programmer" in ANY PRODUCT... now we are talking about an environment FOR PROGRAMMERS, and "accountants-financiers", as users, are not at all representative in this topic, as well as traders who do not open the meta-editor... who don't give a damn about "Russian" or "NOT Russian"...


Now I get the idea. I can give you an example (already) of my former colleagues. They learn 1C faster because it is in Russian, almost like users.
 
Is it difficult to make a module that defines everything through "defines"? And there will be programming in Russian or another language.
 
yuripk >> :
Is it difficult to make a module in which to define everything through "defines"? And there will be programming in russian or other language.

not difficult, here is code which compiles without errors

#define цикл for 
#define целое int 
#define Печать Print

void OnStart()
{
   целое Сумма = 0;
   цикл ( целое Номер = 0; Номер < 10; Номер++) Сумма += Номер;
   Печать (  Сумма );
}

The question is what is it: uncompleted bugfitch or it will remain so? Because it may happen so that someday developers get their hands to checks and they decide to ban using reserved words in defines :(

 
ForexTools >> :

it's not hard, here is the code that compiles without errors

The question is what it is: an unfinished bugfix or will it stay like that? Because it may happen so that developers one day get down to checks and decide to forbid using reserved words in defines :(

Technically, a define is a set of certain language tokens used during parsing.

It makes no sense to forbid any tokens or any set of them.
The only important thing is that we must not allow overriding of language statements (if, for, return, ...).
Now we are also thinking of excluding "system" language functions from the list of possible defines.

 
ForexTools >> :

it's not hard, here is the code that compiles without errors

The question is what it is: an unfinished bugfix or will it stay like that? Because it may happen so that developers one day get down to checks and decide to forbid using reserved words in defines :(

If their preprocessor works by the Sisch principle, no checks will appear.

The only thing I'm not sure is that the Cish preprocessor would give the macro a Russian name. :)

 
mql5 >> :


The only important thing is that the language operator cannot be overridden (if, for, return, ...).

of course they cannot be redefined, but they can be "renamed" (in my example, for is renamed by a loop)

 
mql5 >> :

Technically, a define is a set of tokens in the language which are inserted during parsing.

It makes no sense to forbid any tokens or any set of them.
The only important thing is that we must not allow overriding of language statements (if, for, return, ...).
We are now thinking of excluding "system" language functions from the list of possible defines.


Forbid - what our citizens are used to.
 
yuripk >> :


Prohibit - what our citizens are used to.

Not sure what this is about....


>> so you can:

#define если "тут можно написать что угодно и это всё вставиться в код при встрече 'если'"


that's not the way to do it:

#define if "нельзя ключевые слова переопределять - ошибка компиляции"


it might not be possible to do so:

#define Sleep "на данный момент так написать можно, но скорее всего это мы прикроем - будет ошибкой при компиляции"

 

Here's a selection from the help. Anyone who wants it is welcome to try it out ;)

// Типы данных			
                                    
#define		логический      bool			
#define		символ          char			
#define		бзсимвол        uchar			
#define		короткий        short			
#define		бзкороткий      ushort		
#define		целый           int			  
#define		бзцелый         uint			
#define		длинный         long			
#define		бздлинный       ulong			
#define		двойной         double		
#define		плавающий       float			
#define		цвет            color			
#define		датавремя       datetime	
#define		строка          string		
#define		перечисление    enum			
#define		структура       struct		
#define		класс           class			
#define		безтипа         void			
		 			                          
                                    
// Спецификаторы доступа			
					                          
#define		константа       const			
#define		личный          private		
#define		защищенный      protected	
#define		публичный       public		
#define		виртуальный     virtual		
					                          
                                    
// Классы памяти			
                                    
#define		внешний         extern		
#define		статический     static		
#define		ввод            input			
		 			                          
					                          
// Операторы			
					                          
#define		поумолчанию     default		
#define		размер          sizeof		
#define		новый           new			  
#define		удалить         delete		
#define		если            if			  
#define		иначе           else			
#define		выбор           switch		
#define		вариант         case			
#define		выполнить       do			  
#define		пока            while			
#define		цикл            for			  
#define		прервать        break			
#define		продолжить      continue	
#define		возврат         return		
			                              
					                          
// Прочие			
					                          
#define		ложь            false			
#define		этот            this			
#define		истина          true			
                          
                          
 
ForexTools >> :

Here's a selection from the help. If you want, you can try it out ;)

And you can also put it into mqh-check, and write the call from the inlude directly into the template,

what are you searching for?

Reason: