التنبيهات التالية ظهرت :
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 864 - File: showthread.php PHP 7.4.33 (Linux)
File Line Function
/showthread.php 864 errorHandler->error



تقييم الموضوع :
  • 0 أصوات - بمعدل 0
  • 1
  • 2
  • 3
  • 4
  • 5
مواصفات قياسية تنصح بها مايكروسوفت عند كتابة الأكواد
#1
كاتب الموضوع : Athman


مواصفات قياسية تنصح بها مايكروسوفت عند كتابة الأكواد

السلام عليكم ورحمة الله وبركاته

يعد إتقان اللغة الرمجة (أيا كانت ) تمثل 75% من تعلم لغة البرمجة تليها مرحلة صناعة الواجهات

و لكن طبعا لكل منا طريقته عند كتابة الأكواد

و أنا هنا بإذن الله أعرض عليكم القواعد المتبعة أثناء كتابة الأكواد وذلك حسب تفضيلات مايكروسوفت (Microsoft Recommend to …)

سأقسم القواعد إلى موضوعين بإذن الله

نبدأ بالقواعد على بركة الله

ترا على فكرة مالي خبرة بالترجمة

1-Hungarian Notation must be used to create variable, constant, sub-routine, function, object, property names etc. Hungarian Notation is a Microsoft Windows standard naming convention whereby each word (excluding prefixes which are all lower case) begins with an upper case letter while the balance of the word is all lower case. Variable, constant, sub-routine, object, property names, etc. must be meaningful names prefixed with the prefix from the variable name and scope prefix tables shown on the next page. Type declaration characters may not be used in variable or constant names.



1-يستخدم لإنشاء المتغيرات ،الثوابت،الإجراءات،الدوال،الكائنات،أسماء الخصائص ...إلخ مايعرف بالتدوينة المجرية أو Hungarian Notation حيث أنها تمثل إتفاقية مايكروسوفت ويندوز للتسميات الأساسية والتي تقتضي بأن كل كلمة (ماعدا السابقة حيث أنها كلها بالأحرف الصغيرة أو Lower Case ) تبدأ بحرف كبير والباقي يكون صغيرا بحيث يجب أن تكون نفس الكلمة ذات معنى مفهوم للشيء المكتوب عنه مسبوقة بسابقة Prefix من نوع المتغير ومجاله

2-The ByRef or ByVal keyword MUST precede all parameters for functions, sub-routines and property procedures.

2-يجب أن يسبق ByVal أو ByRef كل البارمترات في الدوال ،الإجراءات،العمليات على الخصائص

3-Use of the END statement to end a program is forbidden. Closing the main form or reaching the end of Sub Main will do this in a controlled manner. Using END does not allow Visual Basic.NET to shutdown your program in an orderly manner. Problems will occur using END.

3-استخدام END لإنهاء البرنامج ممنوع. حيث أن إغلاق النافذء الرئيسية أو الوصول إلى نهاية الإجراء سيؤدي إلى إغلاق البرنامج بطريقة منظمة ولأن استخدام END لايسمح للفيجوال بيسك بأن يغلق البرنامج بطريقة منظمة حيث أنه من الممكن أن يؤدي إلى حدوث مشاكل

4-The use of literals is prohibited. If you are tempted to use a literal, replace it with a standard Visual Basic.NET constant if one is available or create your own constant (see page 3 for constant naming standards) if Visual Basic.NET does not provide one.

4- هذي لم أفهمها



5-The plus sign (+) is to be used as a mathematical addition operator only. Do not use it for concatenation.

Use the & for concatenation.

5- علامة الجمع (+) تستخدم فقط وفقط للعمليات الحسابية ولا تستخدم لدمج النصوص بل يستخدم (&) بدلا منها

6-The visible property of the data control must always be set to false.

6- مش فاهم ايش هي Data Control



7-Only one statement per line is allowed including Dim statements. Only one variable may be defined in a Dim statement. Use of the separator command ( is forbidden.

7-فقط تعليمة واحدة في كل سطر مسموحة أثناء تعريف المتغيرات أما استخدام ( لإضافة أكثر من تعريفة فهي ممنوعة



8-Dimensioning a variable as Object is forbidden unless required by Visual Basic.NET or the supplier of an external control.

8-تعريف متغير على انه كائن أي عدك تعريفه على انه رقم او نص ممنوع عدا في الحالات اللتي تطلب من الفيجوال بيسك(مش فاهم ايش قصده هنا) أو عند جلب البيانات من أداة خارجية



9-All forms of the IF statement and the CASE statement must be preceded and followed by one blank line. All forms of the IF statement must be indented one tab stop (4 characters) on the line after the THEN and ELSE clauses. ELSE clauses must be properly lined up with the corresponding IF statements. A blank line must precede and follow all iteration construct instructions



9-حالات الشرط بكل أنواعها يجب أن تسبق بـسطر خالي وأن تبدأ بعد أربعة أحرف الذي يتكون بالظغط على Tab في السطر الذي يكون بعد الشرط .الحالة Else يجب أن تكون موجودة في أي حالة شرط .سطر خالي يجب أن يسبق ويلحق كل تركيبة

10-Statements must not extend beyond the width of the editor window. Statements longer than the width of the editor window must be broken into one or more subsequent lines. This is accomplished by use of an underscore preceded and followed by a space at the end of the line.

يجب 10-أن لايتجاوز الكود حدودو الشاشة حيث إن الأكواد الطويلة يجب تقسيمها إلى عدة اسطر باستخدام (_) تليها مسافة في نهاية السطر المراد تكسيره إلى عدة أسطر



11-GOTO statements are forbidden in all cases.

11-إستخدام التعليمة GoTo ممنوعة



The Return statement must be used when you need to exit from sub-routine, function, event or property procedure prior to the last statement within the procedure. When used to exit a sub-routine the Return statement is used with no parameters--in other words, just use Return with nothing else on that line.

12-التعليمة Return يجب أن تستخدم عند الحاجة للخروج من إجراء معين ،دالة،حدث، أو عملية الخاصية للعودة للتعليمة الأخيرة في العملية يراعى أنه في حالة استخدامها مع إجراء يجب أن لا تلحق ببارامترات



Menu names must be hierarchical. For example, the SaveAs option on the File menu would be named mnuFileSaveAs.

13-أسماء القوائم يجب أن تتبع النظام الهرمي أو hierarchicalعلى سبيل المثال الخيار Save As الموجودة في قائمة File تسمى mnuFileSaveAs وهكذا



يتبع ...
}}}
تم الشكر بواسطة:


الردود في هذا الموضوع
مواصفات قياسية تنصح بها مايكروسوفت عند كتابة الأكواد - بواسطة Raggi Tech - 05-10-12, 02:54 AM


التنقل السريع :


يقوم بقرائة الموضوع: بالاضافة الى ( 1 ) ضيف كريم