Recent

Author Topic: Message methods [SOLVED]  (Read 9036 times)

pascal111

  • Sr. Member
  • ****
  • Posts: 282
  • I hope building programming team work.
Re: Message methods
« Reply #15 on: May 15, 2021, 10:17:21 pm »
Dispatch will recognize On the message number through the first 32 bits of the register which is usually of type Cardinal, the literal string type is also allowed with DispatchStr. Is what I understood correct?"
TObject.Dispatch will interpret the structure of the record as if it starts with a 32-bit number. For TObject.DispatchStr - as if there is a ShortString at the beginning.
See objpas.inc:
Code: Pascal  [Select][+][-]
  1. procedure TObject.Dispatch(var message);
  2. ...
  3. begin
  4.   index:=dword(message);
  5. ...
Code: Pascal  [Select][+][-]
  1. procedure TObject.DispatchStr(var message);
  2. ...
  3. begin
  4.   name:=pshortstring(@message)^;
  5. ...

لوهلةٍ ظننتُ أنّكـ قد أغفلت جزءاً مُهمّاً من سؤالي ولكن بعد مُضي بعض الوقت والتفكّر فيما جاد به قلمكـ إكتشفتُ أنّكـ أجبت عن سؤالي بالضبط ولكن بطريقةٍ أنيقة وبلغة أكاديميّة وفنيّة تقنيّة.

رائع! لقد تمّ إستخدام تقنيّة الـ typecasting في عمليّة إنتقاء البتّات الأولى من السجل ،عمل فنّي ذكي جدّاً ،إنّ لغة الـ Lazarus free Pascal مُدهشة وذكيّة وفنيّة في أساليبها ،لا يُمكننا في الشرق الأوسط إنشاء لغة مثل هذه ،هذه حقيقة!

google translate:

"For a while, I thought that you had omitted an important part of my question, but after spending some time and thinking about what your pen came up with, I discovered that you answered my question exactly, but in an elegant way and in an academic and technical language.

Fabulous! Typecasting has been used in the process of selecting the first bits from the register "record", a very clever artwork, Lazarus free Pascal is amazing, smart and artistic in its methods, we cannot in the Middle East create a language like this, this is a fact!"

engkin

  • Hero Member
  • *****
  • Posts: 2805
Re: Message methods
« Reply #16 on: May 16, 2021, 12:22:20 am »
Fabulous! Typecasting has been used in the process of selecting the first bits from the register "record", a very clever artwork, Lazarus free Pascal is amazing, smart and artistic in its methods, we cannot in the Middle East create a language like this, this is a fact!"

Object Pascal is very nice, yes. But nothing unusual in typecasting, as mentioned above, to make a whole region like the Middle East unable to create a language like this. It is nice to compliment people and their work, but not on the expense of other people.

I had seen some members here express their admiration of Object Pascal on the expense of C and C++.


Code: Pascal  [Select][+][-]
  1. var
  2.   //as: integer = 1;
  3.   //in: integer = 2;
  4.   //is: integer = 3;
  5.   //or: integer = 4;
  6.   //and: integer = 5;
  7.   //div: integer = 6;
  8.   //mod: integer = 7;
  9.   //not: integer = 8;
  10.   //shl: integer = 9;
  11.   //shr: integer = 10;
  12.   //xor: integer = 11;
  13.   explicit: integer = 12;
  14.   enumerator: integer = 13;
  15.   initialize: integer = 14;
  16.   finalize: integer = 15;
  17.   addref: integer = 16;
  18.   copy: integer = 17;
  19.   inc: integer = 18;
  20.   dec: integer = 19;
  21.   //end: integer = 20;
  22.   //of: integer = 21;
  23.   //file: integer = 22;
  24.   identifier: integer = 23;
  25.   non: integer = 24;
  26.   //const: integer = 25;
  27.   real: integer = 26;
  28.   ordinal: integer = 27;
  29.   //string: integer = 28;
  30.   char: integer = 29;
  31.   wstring: integer = 30;
  32.   wchar: integer = 31;
  33.   c: integer = 32;
  34.   //as: integer = 33;
  35.   at: integer = 34;
  36.   //do: integer = 35;
  37.   //if: integer = 36;
  38.   //in: integer = 37;
  39.   //is: integer = 38;
  40.   //of: integer = 39;
  41.   //on: integer = 40;
  42.   //or: integer = 41;
  43.   //to: integer = 42;
  44.   add: integer = 43;
  45.   //and: integer = 44;
  46.   //asm: integer = 45;
  47.   //div: integer = 47;
  48.   //end: integer = 48;
  49.   far: integer = 49;
  50.   //for: integer = 50;
  51.   //mod: integer = 52;
  52.   //nil: integer = 53;
  53.   //not: integer = 54;
  54.   out: integer = 55;
  55.   //set: integer = 56;
  56.   //shl: integer = 57;
  57.   //shr: integer = 58;
  58.   //try: integer = 59;
  59.   //var: integer = 60;
  60.   //xor: integer = 61;
  61.   //case: integer = 62;
  62.   //cvar: integer = 64;
  63.   //else: integer = 65;
  64.   exit: integer = 66;
  65.   fail: integer = 67;
  66.   //file: integer = 68;
  67.   //goto: integer = 69;
  68.   huge: integer = 70;
  69.   name: integer = 71;
  70.   near: integer = 72;
  71.   read: integer = 73;
  72.   self: integer = 74;
  73.   sysv: integer = 75;
  74.   //then: integer = 76;
  75.   //type: integer = 77;
  76.   //unit: integer = 78;
  77.   univ: integer = 79;
  78.   //uses: integer = 80;
  79.   //with: integer = 81;
  80.   alias: integer = 82;
  81.   //array: integer = 83;
  82.   //begin: integer = 84;
  83.   break: integer = 85;
  84.   cdecl: integer = 86;
  85.   //class: integer = 87;
  86.   //const: integer = 88;
  87.   equal: integer = 89;
  88.   far16: integer = 90;
  89.   final: integer = 91;
  90.   index: integer = 92;
  91.   //label: integer = 93;
  92.   local: integer = 94;
  93.   //raise: integer = 95;
  94.   //until: integer = 96;
  95.   //while: integer = 97;
  96.   write: integer = 98;
  97.   cblock: integer = 100;
  98.   dispid: integer = 101;
  99.   divide: integer = 102;
  100.   //downto: integer = 103;
  101.   //except: integer = 104;
  102.   //export: integer = 105;
  103.   helper: integer = 106;
  104.   inline: integer = 107;
  105.   legacy: integer = 108;
  106.   nested: integer = 109;
  107.   //object: integer = 110;
  108.   //packed: integer = 111;
  109.   pascal: integer = 112;
  110.   //public: integer = 113;
  111.   //record: integer = 114;
  112.   //repeat: integer = 115;
  113.   result: integer = 116;
  114.   return: integer = 117;
  115.   sealed: integer = 118;
  116.   static: integer = 119;
  117.   stored: integer = 120;
  118.   strict: integer = 121;
  119.   //string: integer = 122;
  120.   winapi: integer = 124;
  121.   asmname: integer = 125;
  122.   basereg: integer = 126;
  123.   cppdecl: integer = 127;
  124.   default: integer = 128;
  125.   dynamic: integer = 129;
  126.   //exports: integer = 130;
  127.   //finally: integer = 131;
  128.   forward: integer = 132;
  129.   generic: integer = 133;
  130.   iocheck: integer = 134;
  131.   //library: integer = 135;
  132.   message: integer = 136;
  133.   modulus: integer = 137;
  134.   package: integer = 138;
  135.   private: integer = 139;
  136.   //program: integer = 140;
  137.   r12base: integer = 141;
  138.   rtlproc: integer = 142;
  139.   section: integer = 143;
  140.   stdcall: integer = 144;
  141.   syscall: integer = 145;
  142.   varargs: integer = 146;
  143.   virtual: integer = 147;
  144.   absolute: integer = 148;
  145.   abstract: integer = 149;
  146.   baselast: integer = 150;
  147.   basenone: integer = 151;
  148.   basesysv: integer = 152;
  149.   constref: integer = 153;
  150.   contains: integer = 154;
  151.   continue: integer = 155;
  152.   //cppclass: integer = 156;
  153.   //external: integer = 158;
  154.   //function: integer = 160;
  155.   implicit: integer = 161;
  156.   lessthan: integer = 162;
  157.   location: integer = 163;
  158.   multiply: integer = 164;
  159.   mwpascal: integer = 165;
  160.   negative: integer = 166;
  161.   noinline: integer = 167;
  162.   noreturn: integer = 168;
  163.   notequal: integer = 169;
  164.   //operator: integer = 170;
  165.   optional: integer = 171;
  166.   overload: integer = 172;
  167.   override: integer = 173;
  168.   platform: integer = 174;
  169.   positive: integer = 175;
  170.   //property: integer = 176;
  171.   readonly: integer = 177;
  172.   register: integer = 178;
  173.   required: integer = 179;
  174.   requires: integer = 180;
  175.   resident: integer = 181;
  176.   safecall: integer = 182;
  177.   subtract: integer = 183;
  178.   sysvbase: integer = 184;
  179.   assembler: integer = 185;
  180.   basefirst: integer = 186;
  181.   //bitpacked: integer = 187;
  182.   bitwiseor: integer = 188;
  183.   hardfloat: integer = 189;
  184.   //inherited: integer = 190;
  185.   intdivide: integer = 191;
  186.   //interface: integer = 192;
  187.   interrupt: integer = 193;
  188.   leftshift: integer = 194;
  189.   logicalor: integer = 195;
  190.   nodefault: integer = 196;
  191.   objcclass: integer = 197;
  192.   //otherwise: integer = 198;
  193.   //procedure: integer = 199;
  194.   protected: integer = 200;
  195.   published: integer = 201;
  196.   reference: integer = 202;
  197.   softfloat: integer = 203;
  198.   //threadvar: integer = 204;
  199.   writeonly: integer = 205;
  200.   bitwiseand: integer = 206;
  201.   bitwisexor: integer = 207;
  202.   deprecated: integer = 208;
  203.   //destructor: integer = 209;
  204.   //enumerator: integer = 210;
  205.   implements: integer = 211;
  206.   //initialize: integer = 212;
  207.   internproc: integer = 213;
  208.   logicaland: integer = 214;
  209.   logicalnot: integer = 215;
  210.   logicalxor: integer = 216;
  211.   oldfpccall: integer = 217;
  212.   openstring: integer = 218;
  213.   rightshift: integer = 219;
  214.   specialize: integer = 220;
  215.   vectorcall: integer = 221;
  216.   //constructor: integer = 222;
  217.   greaterthan: integer = 223;
  218.   internconst: integer = 224;
  219.   reintroduce: integer = 225;
  220.   shortstring: integer = 226;
  221.   compilerproc: integer = 227;
  222.   experimental: integer = 228;
  223.   //finalization: integer = 229;
  224.   ms_abi_cdecl: integer = 230;
  225.   nostackframe: integer = 231;
  226.   objccategory: integer = 232;
  227.   objcprotocol: integer = 233;
  228.   //weakexternal: integer = 234;
  229.   //dispinterface: integer = 235;
  230.   unimplemented: integer = 236;
  231.   //implementation: integer = 237;
  232.   //initialization: integer = 238;
  233.   ms_abi_default: integer = 239;
  234.   //resourcestring: integer = 240;
  235.   sysv_abi_cdecl: integer = 241;
  236.   lessthanorequal: integer = 242;
  237.   sysv_abi_default: integer = 243;
  238.   greaterthanorequal: integer = 244;
  239.   true: integer = 245;
  240.   false: integer = 246;

pascal111

  • Sr. Member
  • ****
  • Posts: 282
  • I hope building programming team work.
Re: Message methods
« Reply #17 on: May 16, 2021, 12:48:34 am »
Fabulous! Typecasting has been used in the process of selecting the first bits from the register "record", a very clever artwork, Lazarus free Pascal is amazing, smart and artistic in its methods, we cannot in the Middle East create a language like this, this is a fact!"

Object Pascal is very nice, yes. But nothing unusual in typecasting, as mentioned above, to make a whole region like the Middle East unable to create a language like this. It is nice to compliment people and their work, but not on the expense of other people.

قد لا تُلقي بالاً لرأيكـ وتظنّه بسيطاً وقد يكون في غاية الخطورة في نظر بعض الثقافات الأخرى ،فإذا لم يُوجد عملٌ مميّزٌعند أمّةٍ ما يُثير الإعجاب لدى آخرين فهناكـ من الدوافع الأخرى التي تجعل الآخرين يظنّون أنّ تلكـ الأمّة لا تستحق الحياة.

مُهم جدّاً أن يكون لديكـ ما يُثير إعجابي جدّاً وأودّ أن أتعلّمه منكـ ،أظنّكـ الآن تفهم.

google translate:

"You may not pay any attention to your opinion and think it is simple and it may be very dangerous in the eyes of some other cultures. If there is no special work for a nation that causes admiration for others, there are other motives that make others think that that nation is not worthy of life.

It is very important that you have something that I am very impressed with and I would like to learn from you, I think you now understand."


I had seen some members here express their admiration of Object Pascal on the expense of C and C++.


Code: Pascal  [Select][+][-]
  1. var
  2.   //as: integer = 1;
  3.   //in: integer = 2;
  4.   //is: integer = 3;
  5.   //or: integer = 4;
  6.   //and: integer = 5;
  7.   //div: integer = 6;
  8.   //mod: integer = 7;
  9.   //not: integer = 8;
  10.   //shl: integer = 9;
  11.   //shr: integer = 10;
  12.   //xor: integer = 11;
  13.   explicit: integer = 12;
  14.   enumerator: integer = 13;
  15.   initialize: integer = 14;
  16.   finalize: integer = 15;
  17.   addref: integer = 16;
  18.   copy: integer = 17;
  19.   inc: integer = 18;
  20.   dec: integer = 19;
  21.   //end: integer = 20;
  22.   //of: integer = 21;
  23.   //file: integer = 22;
  24.   identifier: integer = 23;
  25.   non: integer = 24;
  26.   //const: integer = 25;
  27.   real: integer = 26;
  28.   ordinal: integer = 27;
  29.   //string: integer = 28;
  30.   char: integer = 29;
  31.   wstring: integer = 30;
  32.   wchar: integer = 31;
  33.   c: integer = 32;
  34.   //as: integer = 33;
  35.   at: integer = 34;
  36.   //do: integer = 35;
  37.   //if: integer = 36;
  38.   //in: integer = 37;
  39.   //is: integer = 38;
  40.   //of: integer = 39;
  41.   //on: integer = 40;
  42.   //or: integer = 41;
  43.   //to: integer = 42;
  44.   add: integer = 43;
  45.   //and: integer = 44;
  46.   //asm: integer = 45;
  47.   //div: integer = 47;
  48.   //end: integer = 48;
  49.   far: integer = 49;
  50.   //for: integer = 50;
  51.   //mod: integer = 52;
  52.   //nil: integer = 53;
  53.   //not: integer = 54;
  54.   out: integer = 55;
  55.   //set: integer = 56;
  56.   //shl: integer = 57;
  57.   //shr: integer = 58;
  58.   //try: integer = 59;
  59.   //var: integer = 60;
  60.   //xor: integer = 61;
  61.   //case: integer = 62;
  62.   //cvar: integer = 64;
  63.   //else: integer = 65;
  64.   exit: integer = 66;
  65.   fail: integer = 67;
  66.   //file: integer = 68;
  67.   //goto: integer = 69;
  68.   huge: integer = 70;
  69.   name: integer = 71;
  70.   near: integer = 72;
  71.   read: integer = 73;
  72.   self: integer = 74;
  73.   sysv: integer = 75;
  74.   //then: integer = 76;
  75.   //type: integer = 77;
  76.   //unit: integer = 78;
  77.   univ: integer = 79;
  78.   //uses: integer = 80;
  79.   //with: integer = 81;
  80.   alias: integer = 82;
  81.   //array: integer = 83;
  82.   //begin: integer = 84;
  83.   break: integer = 85;
  84.   cdecl: integer = 86;
  85.   //class: integer = 87;
  86.   //const: integer = 88;
  87.   equal: integer = 89;
  88.   far16: integer = 90;
  89.   final: integer = 91;
  90.   index: integer = 92;
  91.   //label: integer = 93;
  92.   local: integer = 94;
  93.   //raise: integer = 95;
  94.   //until: integer = 96;
  95.   //while: integer = 97;
  96.   write: integer = 98;
  97.   cblock: integer = 100;
  98.   dispid: integer = 101;
  99.   divide: integer = 102;
  100.   //downto: integer = 103;
  101.   //except: integer = 104;
  102.   //export: integer = 105;
  103.   helper: integer = 106;
  104.   inline: integer = 107;
  105.   legacy: integer = 108;
  106.   nested: integer = 109;
  107.   //object: integer = 110;
  108.   //packed: integer = 111;
  109.   pascal: integer = 112;
  110.   //public: integer = 113;
  111.   //record: integer = 114;
  112.   //repeat: integer = 115;
  113.   result: integer = 116;
  114.   return: integer = 117;
  115.   sealed: integer = 118;
  116.   static: integer = 119;
  117.   stored: integer = 120;
  118.   strict: integer = 121;
  119.   //string: integer = 122;
  120.   winapi: integer = 124;
  121.   asmname: integer = 125;
  122.   basereg: integer = 126;
  123.   cppdecl: integer = 127;
  124.   default: integer = 128;
  125.   dynamic: integer = 129;
  126.   //exports: integer = 130;
  127.   //finally: integer = 131;
  128.   forward: integer = 132;
  129.   generic: integer = 133;
  130.   iocheck: integer = 134;
  131.   //library: integer = 135;
  132.   message: integer = 136;
  133.   modulus: integer = 137;
  134.   package: integer = 138;
  135.   private: integer = 139;
  136.   //program: integer = 140;
  137.   r12base: integer = 141;
  138.   rtlproc: integer = 142;
  139.   section: integer = 143;
  140.   stdcall: integer = 144;
  141.   syscall: integer = 145;
  142.   varargs: integer = 146;
  143.   virtual: integer = 147;
  144.   absolute: integer = 148;
  145.   abstract: integer = 149;
  146.   baselast: integer = 150;
  147.   basenone: integer = 151;
  148.   basesysv: integer = 152;
  149.   constref: integer = 153;
  150.   contains: integer = 154;
  151.   continue: integer = 155;
  152.   //cppclass: integer = 156;
  153.   //external: integer = 158;
  154.   //function: integer = 160;
  155.   implicit: integer = 161;
  156.   lessthan: integer = 162;
  157.   location: integer = 163;
  158.   multiply: integer = 164;
  159.   mwpascal: integer = 165;
  160.   negative: integer = 166;
  161.   noinline: integer = 167;
  162.   noreturn: integer = 168;
  163.   notequal: integer = 169;
  164.   //operator: integer = 170;
  165.   optional: integer = 171;
  166.   overload: integer = 172;
  167.   override: integer = 173;
  168.   platform: integer = 174;
  169.   positive: integer = 175;
  170.   //property: integer = 176;
  171.   readonly: integer = 177;
  172.   register: integer = 178;
  173.   required: integer = 179;
  174.   requires: integer = 180;
  175.   resident: integer = 181;
  176.   safecall: integer = 182;
  177.   subtract: integer = 183;
  178.   sysvbase: integer = 184;
  179.   assembler: integer = 185;
  180.   basefirst: integer = 186;
  181.   //bitpacked: integer = 187;
  182.   bitwiseor: integer = 188;
  183.   hardfloat: integer = 189;
  184.   //inherited: integer = 190;
  185.   intdivide: integer = 191;
  186.   //interface: integer = 192;
  187.   interrupt: integer = 193;
  188.   leftshift: integer = 194;
  189.   logicalor: integer = 195;
  190.   nodefault: integer = 196;
  191.   objcclass: integer = 197;
  192.   //otherwise: integer = 198;
  193.   //procedure: integer = 199;
  194.   protected: integer = 200;
  195.   published: integer = 201;
  196.   reference: integer = 202;
  197.   softfloat: integer = 203;
  198.   //threadvar: integer = 204;
  199.   writeonly: integer = 205;
  200.   bitwiseand: integer = 206;
  201.   bitwisexor: integer = 207;
  202.   deprecated: integer = 208;
  203.   //destructor: integer = 209;
  204.   //enumerator: integer = 210;
  205.   implements: integer = 211;
  206.   //initialize: integer = 212;
  207.   internproc: integer = 213;
  208.   logicaland: integer = 214;
  209.   logicalnot: integer = 215;
  210.   logicalxor: integer = 216;
  211.   oldfpccall: integer = 217;
  212.   openstring: integer = 218;
  213.   rightshift: integer = 219;
  214.   specialize: integer = 220;
  215.   vectorcall: integer = 221;
  216.   //constructor: integer = 222;
  217.   greaterthan: integer = 223;
  218.   internconst: integer = 224;
  219.   reintroduce: integer = 225;
  220.   shortstring: integer = 226;
  221.   compilerproc: integer = 227;
  222.   experimental: integer = 228;
  223.   //finalization: integer = 229;
  224.   ms_abi_cdecl: integer = 230;
  225.   nostackframe: integer = 231;
  226.   objccategory: integer = 232;
  227.   objcprotocol: integer = 233;
  228.   //weakexternal: integer = 234;
  229.   //dispinterface: integer = 235;
  230.   unimplemented: integer = 236;
  231.   //implementation: integer = 237;
  232.   //initialization: integer = 238;
  233.   ms_abi_default: integer = 239;
  234.   //resourcestring: integer = 240;
  235.   sysv_abi_cdecl: integer = 241;
  236.   lessthanorequal: integer = 242;
  237.   sysv_abi_default: integer = 243;
  238.   greaterthanorequal: integer = 244;
  239.   true: integer = 245;
  240.   false: integer = 246;

أظنّ أنّ هذا أسلوبٌ يُشبه أسلوب لغة C++ حقّاً!

google translate:

"I think this is a really C ++ style!"

engkin

  • Hero Member
  • *****
  • Posts: 2805
Re: Message methods
« Reply #18 on: May 16, 2021, 02:04:43 am »
"I think this is a really C ++ style!"

That list was for your benefit. These are keywords similar to "message" that you can use as variables. See how the forum code treats some of these words in a special way like some of them turn blue/bold?

engkin

  • Hero Member
  • *****
  • Posts: 2805
Re: Message methods
« Reply #19 on: May 16, 2021, 02:31:38 am »
You may not pay any attention to your opinion and think it is simple and it may be very dangerous in the eyes of some other cultures.

This is a different topic. Did Google translation confuse you?

If there is no special work for a nation that causes admiration for others, there are other motives that make others think that that nation is not worthy of life.

I hope that is not the case in your eyes. When you use the word "nation", do you mean a group of people confined to some political border, a specific race, or some other meaning?

Would you consider getting rid of dictators as part of "special work"? or do you consider keeping millions of people under the boot heels of one family as "special work"?

It is very important that you have something that I am very impressed with and I would like to learn from you, I think you now understand."

Now this is bad. I do not have any intention to try to impress you or anyone else for that matter. But I do have the intention to help people learn and solve their problems.

pascal111

  • Sr. Member
  • ****
  • Posts: 282
  • I hope building programming team work.
Re: Message methods
« Reply #20 on: May 16, 2021, 12:12:28 pm »
You may not pay any attention to your opinion and think it is simple and it may be very dangerous in the eyes of some other cultures.

This is a different topic. Did Google translation confuse you?

If there is no special work for a nation that causes admiration for others, there are other motives that make others think that that nation is not worthy of life.

I hope that is not the case in your eyes. When you use the word "nation", do you mean a group of people confined to some political border, a specific race, or some other meaning?

Would you consider getting rid of dictators as part of "special work"? or do you consider keeping millions of people under the boot heels of one family as "special work"?

It is very important that you have something that I am very impressed with and I would like to learn from you, I think you now understand."

Now this is bad. I do not have any intention to try to impress you or anyone else for that matter. But I do have the intention to help people learn and solve their problems.

ربّما google translate لديه مشاكل حقّاً في تأدية المعنى المقصود بين الإنجليزيّة والعربيّة. لدينا مُشكلة فعلاً فالإختلافات بين الإنجليزيّة والعربيّة أكبر ممّا كُنتُ أتصوّر ،لقد كُنتُ أتصوّر الموضوع بسيطاً لكن للأسف ليس لديّ مُترجم مجاني غير google translate.

google translate:

"Maybe google translate has really problems performing the intended meaning between english and arabic. We really have a problem, the differences between English and Arabic are greater than I could have imagined. I used to envision the topic simple, but unfortunately I do not have a free translator other than google translate."

PascalDragon

  • Hero Member
  • *****
  • Posts: 3056
  • Compiler Developer
Re: Message methods
« Reply #21 on: May 16, 2021, 05:09:28 pm »
Code: Pascal  [Select][+][-]
  1. var
  2.   //as: integer = 1;
  3.   //in: integer = 2;
  4.   //is: integer = 3;
  5.   //or: integer = 4;
  6.   //and: integer = 5;
  7.   //div: integer = 6;
  8.   //mod: integer = 7;
  9.   //not: integer = 8;
  10.   //shl: integer = 9;
  11.   //shr: integer = 10;
  12.   //xor: integer = 11;
  13.   explicit: integer = 12;
  14.   enumerator: integer = 13;
  15.   initialize: integer = 14;
  16.   finalize: integer = 15;
  17.   addref: integer = 16;
  18.   copy: integer = 17;
  19.   inc: integer = 18;
  20.   dec: integer = 19;
  21.   //end: integer = 20;
  22.   //of: integer = 21;
  23.   //file: integer = 22;
  24.   identifier: integer = 23;
  25.   non: integer = 24;
  26.   //const: integer = 25;
  27.   real: integer = 26;
  28.   ordinal: integer = 27;
  29.   //string: integer = 28;
  30.   char: integer = 29;
  31.   wstring: integer = 30;
  32.   wchar: integer = 31;
  33.   c: integer = 32;
  34.   //as: integer = 33;
  35.   at: integer = 34;
  36.   //do: integer = 35;
  37.   //if: integer = 36;
  38.   //in: integer = 37;
  39.   //is: integer = 38;
  40.   //of: integer = 39;
  41.   //on: integer = 40;
  42.   //or: integer = 41;
  43.   //to: integer = 42;
  44.   add: integer = 43;
  45.   //and: integer = 44;
  46.   //asm: integer = 45;
  47.   //div: integer = 47;
  48.   //end: integer = 48;
  49.   far: integer = 49;
  50.   //for: integer = 50;
  51.   //mod: integer = 52;
  52.   //nil: integer = 53;
  53.   //not: integer = 54;
  54.   out: integer = 55;
  55.   //set: integer = 56;
  56.   //shl: integer = 57;
  57.   //shr: integer = 58;
  58.   //try: integer = 59;
  59.   //var: integer = 60;
  60.   //xor: integer = 61;
  61.   //case: integer = 62;
  62.   //cvar: integer = 64;
  63.   //else: integer = 65;
  64.   exit: integer = 66;
  65.   fail: integer = 67;
  66.   //file: integer = 68;
  67.   //goto: integer = 69;
  68.   huge: integer = 70;
  69.   name: integer = 71;
  70.   near: integer = 72;
  71.   read: integer = 73;
  72.   self: integer = 74;
  73.   sysv: integer = 75;
  74.   //then: integer = 76;
  75.   //type: integer = 77;
  76.   //unit: integer = 78;
  77.   univ: integer = 79;
  78.   //uses: integer = 80;
  79.   //with: integer = 81;
  80.   alias: integer = 82;
  81.   //array: integer = 83;
  82.   //begin: integer = 84;
  83.   break: integer = 85;
  84.   cdecl: integer = 86;
  85.   //class: integer = 87;
  86.   //const: integer = 88;
  87.   equal: integer = 89;
  88.   far16: integer = 90;
  89.   final: integer = 91;
  90.   index: integer = 92;
  91.   //label: integer = 93;
  92.   local: integer = 94;
  93.   //raise: integer = 95;
  94.   //until: integer = 96;
  95.   //while: integer = 97;
  96.   write: integer = 98;
  97.   cblock: integer = 100;
  98.   dispid: integer = 101;
  99.   divide: integer = 102;
  100.   //downto: integer = 103;
  101.   //except: integer = 104;
  102.   //export: integer = 105;
  103.   helper: integer = 106;
  104.   inline: integer = 107;
  105.   legacy: integer = 108;
  106.   nested: integer = 109;
  107.   //object: integer = 110;
  108.   //packed: integer = 111;
  109.   pascal: integer = 112;
  110.   //public: integer = 113;
  111.   //record: integer = 114;
  112.   //repeat: integer = 115;
  113.   result: integer = 116;
  114.   return: integer = 117;
  115.   sealed: integer = 118;
  116.   static: integer = 119;
  117.   stored: integer = 120;
  118.   strict: integer = 121;
  119.   //string: integer = 122;
  120.   winapi: integer = 124;
  121.   asmname: integer = 125;
  122.   basereg: integer = 126;
  123.   cppdecl: integer = 127;
  124.   default: integer = 128;
  125.   dynamic: integer = 129;
  126.   //exports: integer = 130;
  127.   //finally: integer = 131;
  128.   forward: integer = 132;
  129.   generic: integer = 133;
  130.   iocheck: integer = 134;
  131.   //library: integer = 135;
  132.   message: integer = 136;
  133.   modulus: integer = 137;
  134.   package: integer = 138;
  135.   private: integer = 139;
  136.   //program: integer = 140;
  137.   r12base: integer = 141;
  138.   rtlproc: integer = 142;
  139.   section: integer = 143;
  140.   stdcall: integer = 144;
  141.   syscall: integer = 145;
  142.   varargs: integer = 146;
  143.   virtual: integer = 147;
  144.   absolute: integer = 148;
  145.   abstract: integer = 149;
  146.   baselast: integer = 150;
  147.   basenone: integer = 151;
  148.   basesysv: integer = 152;
  149.   constref: integer = 153;
  150.   contains: integer = 154;
  151.   continue: integer = 155;
  152.   //cppclass: integer = 156;
  153.   //external: integer = 158;
  154.   //function: integer = 160;
  155.   implicit: integer = 161;
  156.   lessthan: integer = 162;
  157.   location: integer = 163;
  158.   multiply: integer = 164;
  159.   mwpascal: integer = 165;
  160.   negative: integer = 166;
  161.   noinline: integer = 167;
  162.   noreturn: integer = 168;
  163.   notequal: integer = 169;
  164.   //operator: integer = 170;
  165.   optional: integer = 171;
  166.   overload: integer = 172;
  167.   override: integer = 173;
  168.   platform: integer = 174;
  169.   positive: integer = 175;
  170.   //property: integer = 176;
  171.   readonly: integer = 177;
  172.   register: integer = 178;
  173.   required: integer = 179;
  174.   requires: integer = 180;
  175.   resident: integer = 181;
  176.   safecall: integer = 182;
  177.   subtract: integer = 183;
  178.   sysvbase: integer = 184;
  179.   assembler: integer = 185;
  180.   basefirst: integer = 186;
  181.   //bitpacked: integer = 187;
  182.   bitwiseor: integer = 188;
  183.   hardfloat: integer = 189;
  184.   //inherited: integer = 190;
  185.   intdivide: integer = 191;
  186.   //interface: integer = 192;
  187.   interrupt: integer = 193;
  188.   leftshift: integer = 194;
  189.   logicalor: integer = 195;
  190.   nodefault: integer = 196;
  191.   objcclass: integer = 197;
  192.   //otherwise: integer = 198;
  193.   //procedure: integer = 199;
  194.   protected: integer = 200;
  195.   published: integer = 201;
  196.   reference: integer = 202;
  197.   softfloat: integer = 203;
  198.   //threadvar: integer = 204;
  199.   writeonly: integer = 205;
  200.   bitwiseand: integer = 206;
  201.   bitwisexor: integer = 207;
  202.   deprecated: integer = 208;
  203.   //destructor: integer = 209;
  204.   //enumerator: integer = 210;
  205.   implements: integer = 211;
  206.   //initialize: integer = 212;
  207.   internproc: integer = 213;
  208.   logicaland: integer = 214;
  209.   logicalnot: integer = 215;
  210.   logicalxor: integer = 216;
  211.   oldfpccall: integer = 217;
  212.   openstring: integer = 218;
  213.   rightshift: integer = 219;
  214.   specialize: integer = 220;
  215.   vectorcall: integer = 221;
  216.   //constructor: integer = 222;
  217.   greaterthan: integer = 223;
  218.   internconst: integer = 224;
  219.   reintroduce: integer = 225;
  220.   shortstring: integer = 226;
  221.   compilerproc: integer = 227;
  222.   experimental: integer = 228;
  223.   //finalization: integer = 229;
  224.   ms_abi_cdecl: integer = 230;
  225.   nostackframe: integer = 231;
  226.   objccategory: integer = 232;
  227.   objcprotocol: integer = 233;
  228.   //weakexternal: integer = 234;
  229.   //dispinterface: integer = 235;
  230.   unimplemented: integer = 236;
  231.   //implementation: integer = 237;
  232.   //initialization: integer = 238;
  233.   ms_abi_default: integer = 239;
  234.   //resourcestring: integer = 240;
  235.   sysv_abi_cdecl: integer = 241;
  236.   lessthanorequal: integer = 242;
  237.   sysv_abi_default: integer = 243;
  238.   greaterthanorequal: integer = 244;
  239.   true: integer = 245;
  240.   false: integer = 246;

If you prefix the keywords with & (e.g. &begin) you can use them as identifiers as well.

pascal111

  • Sr. Member
  • ****
  • Posts: 282
  • I hope building programming team work.
Re: Message methods
« Reply #22 on: May 16, 2021, 07:09:14 pm »
Code: Pascal  [Select][+][-]
  1. var
  2.   //as: integer = 1;
  3.   //in: integer = 2;
  4.   //is: integer = 3;
  5.   //or: integer = 4;
  6.   //and: integer = 5;
  7.   //div: integer = 6;
  8.   //mod: integer = 7;
  9.   //not: integer = 8;
  10.   //shl: integer = 9;
  11.   //shr: integer = 10;
  12.   //xor: integer = 11;
  13.   explicit: integer = 12;
  14.   enumerator: integer = 13;
  15.   initialize: integer = 14;
  16.   finalize: integer = 15;
  17.   addref: integer = 16;
  18.   copy: integer = 17;
  19.   inc: integer = 18;
  20.   dec: integer = 19;
  21.   //end: integer = 20;
  22.   //of: integer = 21;
  23.   //file: integer = 22;
  24.   identifier: integer = 23;
  25.   non: integer = 24;
  26.   //const: integer = 25;
  27.   real: integer = 26;
  28.   ordinal: integer = 27;
  29.   //string: integer = 28;
  30.   char: integer = 29;
  31.   wstring: integer = 30;
  32.   wchar: integer = 31;
  33.   c: integer = 32;
  34.   //as: integer = 33;
  35.   at: integer = 34;
  36.   //do: integer = 35;
  37.   //if: integer = 36;
  38.   //in: integer = 37;
  39.   //is: integer = 38;
  40.   //of: integer = 39;
  41.   //on: integer = 40;
  42.   //or: integer = 41;
  43.   //to: integer = 42;
  44.   add: integer = 43;
  45.   //and: integer = 44;
  46.   //asm: integer = 45;
  47.   //div: integer = 47;
  48.   //end: integer = 48;
  49.   far: integer = 49;
  50.   //for: integer = 50;
  51.   //mod: integer = 52;
  52.   //nil: integer = 53;
  53.   //not: integer = 54;
  54.   out: integer = 55;
  55.   //set: integer = 56;
  56.   //shl: integer = 57;
  57.   //shr: integer = 58;
  58.   //try: integer = 59;
  59.   //var: integer = 60;
  60.   //xor: integer = 61;
  61.   //case: integer = 62;
  62.   //cvar: integer = 64;
  63.   //else: integer = 65;
  64.   exit: integer = 66;
  65.   fail: integer = 67;
  66.   //file: integer = 68;
  67.   //goto: integer = 69;
  68.   huge: integer = 70;
  69.   name: integer = 71;
  70.   near: integer = 72;
  71.   read: integer = 73;
  72.   self: integer = 74;
  73.   sysv: integer = 75;
  74.   //then: integer = 76;
  75.   //type: integer = 77;
  76.   //unit: integer = 78;
  77.   univ: integer = 79;
  78.   //uses: integer = 80;
  79.   //with: integer = 81;
  80.   alias: integer = 82;
  81.   //array: integer = 83;
  82.   //begin: integer = 84;
  83.   break: integer = 85;
  84.   cdecl: integer = 86;
  85.   //class: integer = 87;
  86.   //const: integer = 88;
  87.   equal: integer = 89;
  88.   far16: integer = 90;
  89.   final: integer = 91;
  90.   index: integer = 92;
  91.   //label: integer = 93;
  92.   local: integer = 94;
  93.   //raise: integer = 95;
  94.   //until: integer = 96;
  95.   //while: integer = 97;
  96.   write: integer = 98;
  97.   cblock: integer = 100;
  98.   dispid: integer = 101;
  99.   divide: integer = 102;
  100.   //downto: integer = 103;
  101.   //except: integer = 104;
  102.   //export: integer = 105;
  103.   helper: integer = 106;
  104.   inline: integer = 107;
  105.   legacy: integer = 108;
  106.   nested: integer = 109;
  107.   //object: integer = 110;
  108.   //packed: integer = 111;
  109.   pascal: integer = 112;
  110.   //public: integer = 113;
  111.   //record: integer = 114;
  112.   //repeat: integer = 115;
  113.   result: integer = 116;
  114.   return: integer = 117;
  115.   sealed: integer = 118;
  116.   static: integer = 119;
  117.   stored: integer = 120;
  118.   strict: integer = 121;
  119.   //string: integer = 122;
  120.   winapi: integer = 124;
  121.   asmname: integer = 125;
  122.   basereg: integer = 126;
  123.   cppdecl: integer = 127;
  124.   default: integer = 128;
  125.   dynamic: integer = 129;
  126.   //exports: integer = 130;
  127.   //finally: integer = 131;
  128.   forward: integer = 132;
  129.   generic: integer = 133;
  130.   iocheck: integer = 134;
  131.   //library: integer = 135;
  132.   message: integer = 136;
  133.   modulus: integer = 137;
  134.   package: integer = 138;
  135.   private: integer = 139;
  136.   //program: integer = 140;
  137.   r12base: integer = 141;
  138.   rtlproc: integer = 142;
  139.   section: integer = 143;
  140.   stdcall: integer = 144;
  141.   syscall: integer = 145;
  142.   varargs: integer = 146;
  143.   virtual: integer = 147;
  144.   absolute: integer = 148;
  145.   abstract: integer = 149;
  146.   baselast: integer = 150;
  147.   basenone: integer = 151;
  148.   basesysv: integer = 152;
  149.   constref: integer = 153;
  150.   contains: integer = 154;
  151.   continue: integer = 155;
  152.   //cppclass: integer = 156;
  153.   //external: integer = 158;
  154.   //function: integer = 160;
  155.   implicit: integer = 161;
  156.   lessthan: integer = 162;
  157.   location: integer = 163;
  158.   multiply: integer = 164;
  159.   mwpascal: integer = 165;
  160.   negative: integer = 166;
  161.   noinline: integer = 167;
  162.   noreturn: integer = 168;
  163.   notequal: integer = 169;
  164.   //operator: integer = 170;
  165.   optional: integer = 171;
  166.   overload: integer = 172;
  167.   override: integer = 173;
  168.   platform: integer = 174;
  169.   positive: integer = 175;
  170.   //property: integer = 176;
  171.   readonly: integer = 177;
  172.   register: integer = 178;
  173.   required: integer = 179;
  174.   requires: integer = 180;
  175.   resident: integer = 181;
  176.   safecall: integer = 182;
  177.   subtract: integer = 183;
  178.   sysvbase: integer = 184;
  179.   assembler: integer = 185;
  180.   basefirst: integer = 186;
  181.   //bitpacked: integer = 187;
  182.   bitwiseor: integer = 188;
  183.   hardfloat: integer = 189;
  184.   //inherited: integer = 190;
  185.   intdivide: integer = 191;
  186.   //interface: integer = 192;
  187.   interrupt: integer = 193;
  188.   leftshift: integer = 194;
  189.   logicalor: integer = 195;
  190.   nodefault: integer = 196;
  191.   objcclass: integer = 197;
  192.   //otherwise: integer = 198;
  193.   //procedure: integer = 199;
  194.   protected: integer = 200;
  195.   published: integer = 201;
  196.   reference: integer = 202;
  197.   softfloat: integer = 203;
  198.   //threadvar: integer = 204;
  199.   writeonly: integer = 205;
  200.   bitwiseand: integer = 206;
  201.   bitwisexor: integer = 207;
  202.   deprecated: integer = 208;
  203.   //destructor: integer = 209;
  204.   //enumerator: integer = 210;
  205.   implements: integer = 211;
  206.   //initialize: integer = 212;
  207.   internproc: integer = 213;
  208.   logicaland: integer = 214;
  209.   logicalnot: integer = 215;
  210.   logicalxor: integer = 216;
  211.   oldfpccall: integer = 217;
  212.   openstring: integer = 218;
  213.   rightshift: integer = 219;
  214.   specialize: integer = 220;
  215.   vectorcall: integer = 221;
  216.   //constructor: integer = 222;
  217.   greaterthan: integer = 223;
  218.   internconst: integer = 224;
  219.   reintroduce: integer = 225;
  220.   shortstring: integer = 226;
  221.   compilerproc: integer = 227;
  222.   experimental: integer = 228;
  223.   //finalization: integer = 229;
  224.   ms_abi_cdecl: integer = 230;
  225.   nostackframe: integer = 231;
  226.   objccategory: integer = 232;
  227.   objcprotocol: integer = 233;
  228.   //weakexternal: integer = 234;
  229.   //dispinterface: integer = 235;
  230.   unimplemented: integer = 236;
  231.   //implementation: integer = 237;
  232.   //initialization: integer = 238;
  233.   ms_abi_default: integer = 239;
  234.   //resourcestring: integer = 240;
  235.   sysv_abi_cdecl: integer = 241;
  236.   lessthanorequal: integer = 242;
  237.   sysv_abi_default: integer = 243;
  238.   greaterthanorequal: integer = 244;
  239.   true: integer = 245;
  240.   false: integer = 246;

If you prefix the keywords with & (e.g. &begin) you can use them as identifiers as well.

غريب! إذْ لم يكن مسموحاً في فترة الـ DOS في اللغات العاملة تحته أنْ تُستخدم كلمةٌ مُسجّلة والآن نرى كما أشار @engkin وكما أشرت أنت أنّهُ يُمكن إستخدامها كمعرّفاتٍ ولو بتهيئةٍ بسيطة مثل إضافة "&" ،ربّما ذلكـ من باب زيادة مُرونة اللغة.

google translate:

"a stranger"Strange"! "as" If in the period of DOS in the working languages ​​under it it was not allowed to use a registered "reserved" word, and now we see as indicated "mentioned" by @engkin and as you indicated "mentioned" that it can be used as identifiers, even with a simple configuration such as adding "&", perhaps in order to increase the flexibility of the language."

VTwin

  • Hero Member
  • *****
  • Posts: 1035
  • Former Turbo Pascal 3 user
Re: Message methods
« Reply #23 on: May 16, 2021, 11:49:39 pm »
If you prefix the keywords with & (e.g. &begin) you can use them as identifiers as well.

Not something I am likely to use, but interesting to know none the less.
“Talk is cheap. Show me the code.” -Linus Torvalds

Free Pascal Compiler 3.2.0
macOS 10.13.6: Lazarus 2.0.12 (64 bit Cocoa)
Ubuntu 18.04.3: Lazarus 2.0.12 (64 bit on VBox)
Windows 7 Pro SP1: Lazarus 2.0.12 (64 bit on VBox)

pascal111

  • Sr. Member
  • ****
  • Posts: 282
  • I hope building programming team work.
Re: Message methods
« Reply #24 on: May 17, 2021, 12:55:01 am »
If you prefix the keywords with & (e.g. &begin) you can use them as identifiers as well.

Not something I am likely to use, but interesting to know none the less.

ليس خليقٌ بكـ إستعمالها ولكنّكـ تُريدُ معرفتها رغم ذلكـ!

معرفة المعلومات المُفيدة في البرمجة لا تضر حتّى لو لم تكن من نفس أسلوب برمجتنا.

google translate:

"It is not appropriate "likely" for you to use it, but you want to know it nonetheless!

Knowing useful information in programming does not harm even if it is not of the same programming style as we do."

PascalDragon

  • Hero Member
  • *****
  • Posts: 3056
  • Compiler Developer
Re: Message methods
« Reply #25 on: May 17, 2021, 09:14:36 am »
"a stranger"Strange"! "as" If in the period of DOS in the working languages ​​under it it was not allowed to use a registered "reserved" word, and now we see as indicated "mentioned" by @engkin and as you indicated "mentioned" that it can be used as identifiers, even with a simple configuration such as adding "&", perhaps in order to increase the flexibility of the language."

It was originally introduced for COM dispatch interface support. There you can have code like this when named arguments are used:

Code: Pascal  [Select][+][-]
  1. var
  2.   v: OleVariant;
  3. begin
  4.   v := CreateTheDispatchIntf;
  5.   v.SomeFunc(&Begin:=21, &End:=42);
  6. end.

And as they're named arguments they need to be passed to the dispatch interface as is as the interface is possibly provided by some third party software (e.g. Microsoft Office or whatever), thus the usual tricks of using e.g. _begin won't work.

pascal111

  • Sr. Member
  • ****
  • Posts: 282
  • I hope building programming team work.
Re: Message methods
« Reply #26 on: May 17, 2021, 01:53:34 pm »
"a stranger"Strange"! "as" If in the period of DOS in the working languages ​​under it it was not allowed to use a registered "reserved" word, and now we see as indicated "mentioned" by @engkin and as you indicated "mentioned" that it can be used as identifiers, even with a simple configuration such as adding "&", perhaps in order to increase the flexibility of the language."

It was originally introduced for COM dispatch interface support. There you can have code like this when named arguments are used:

Code: Pascal  [Select][+][-]
  1. var
  2.   v: OleVariant;
  3. begin
  4.   v := CreateTheDispatchIntf;
  5.   v.SomeFunc(&Begin:=21, &End:=42);
  6. end.

And as they're named arguments they need to be passed to the dispatch interface as is as the interface is possibly provided by some third party software (e.g. Microsoft Office or whatever), thus the usual tricks of using e.g. _begin won't work.

هذه معلومة دقيقة ومُتقدّمة فلم أستخدم أو أقرأ عن الـ OLE من قبل وبالنّظر في الرابط التالي يبدو أنّ هذا موضوع مُتقدّم بعض الشيء في البرمجة المرئيّة https://wiki.freepascal.org/Olevariant

google translate:

"This is accurate and advanced information. I have not used or read about OLE before. By looking at the following link, it seems that this topic is somewhat advanced in visual programming https://wiki.freepascal.org/Olevariant "

PascalDragon

  • Hero Member
  • *****
  • Posts: 3056
  • Compiler Developer
Re: Message methods
« Reply #27 on: May 18, 2021, 09:04:14 am »
"This is accurate and advanced information. I have not used or read about OLE before. By looking at the following link, it seems that this topic is somewhat advanced in visual programming https://wiki.freepascal.org/Olevariant "

It's advanced, yes (though Object Pascal greatly simplifies it compared to e.g. C++), but it's not only visual programming: OLE (and COM) are very prevalent in the Windows world and you can use them to interface with Microsoft Office, Internet Explorer, Windows Management Instrumentation, Windows Explorer, Active Directory, OLE DB, etc.

pascal111

  • Sr. Member
  • ****
  • Posts: 282
  • I hope building programming team work.
Re: Message methods
« Reply #28 on: May 18, 2021, 12:03:59 pm »
"This is accurate and advanced information. I have not used or read about OLE before. By looking at the following link, it seems that this topic is somewhat advanced in visual programming https://wiki.freepascal.org/Olevariant "

It's advanced, yes (though Object Pascal greatly simplifies it compared to e.g. C++), but it's not only visual programming: OLE (and COM) are very prevalent in the Windows world and you can use them to interface with Microsoft Office, Internet Explorer, Windows Management Instrumentation, Windows Explorer, Active Directory, OLE DB, etc.

الآن إتضحت الصورة أكثر وأظنّني فهمتُ الغاية وهي إدراج بعض العناصر الجاهزة من برامج أخرى إلى البرنامج الذي نُبرمجه على Lazarus أظنّني سمعتُ نفس الشيء في فترة VB6 فقد كانت VB6 تصنع نفس الشيء والآن من الجيّد أنّ هذه الميزة المرنة موجودة كذلكـ في Lazarus.

google translate:

"Now the picture becomes clearer and I think I understood the purpose which is to include some ready-made elements from other programs into the program that we program on Lazarus. I think I heard the same thing in the period of VB6, VB6 was doing the same thing and now it is good that this flexible feature is also present in Lazarus."

 

TinyPortal © 2005-2018