الفرق بين المراجعتين لصفحة: «برمجة سي/ما تحتاجه قبل أن تتعلم»

تم حذف المحتوى تمت إضافة المحتوى
طلا ملخص تعديل
وسم: تعديل مصدر 2017
لا ملخص تعديل
وسم: تعديل مصدر 2017
سطر 1:
{{تحرك}}
 
== Getting Startedالبدء ==
This book introduces and teaches the basics of the C programming language and touches upon some advanced topics as well. This section outlines the required skills and tools you'll need to get the most out of this book.
 
يقدم هذا الكتاب ويعلم أساسيات لغة البرمجة سي ويتطرق إلى بعض الموضوعات المتقدمة أيضًا. يوضح هذا القسم المهارات والأدوات المطلوبة التي ستحتاج إليها لتحقيق أقصى استفادة من هذا الكتاب.
=== Skills and Prior Experience You'll Need ===
This book is for beginning programmers, so don't worry if you have no formal computer training or prior programming experience. It's assumed you know how to turn your computer on, start and stop applications, and perform other basic operations like installing software. It's also assumed you have some experience interacting with your operating system through a terminal window using its '''command line interface.''' If you aren't sure what this means, consider seeking out a tutorial for your chosen platform that can get you comfortable with getting around your computer's command line. At a minimum, you should know the basic commands for navigating to different directories and performing simple file management operations. This book will spell out any other commands you'll need to run from the command line to get your C code working on your machine.
 
=== المهارات والخبرة السابقة التي ستحتاجها ===
=== Software You'll Need ===
هذا الكتاب مخصص للمبرمجين المبتدئين، لذلك لا تقلق إذا لم يكن لديك تدريب رسمي على الكمبيوتر أو خبرة سابقة في البرمجة. من المفترض أنك تعرف كيفية تشغيل جهاز الكمبيوتر الخاص بك، وبدء التطبيقات وإيقافها، وتنفيذ العمليات الأساسية الأخرى مثل تثبيت البرامج. يُفترض أيضًا أن لديك بعض الخبرة في التفاعل مع نظام التشغيل الخاص بك من خلال نافذة طرفية باستخدام [[w:واجهة سطر الأوامر|واجهة سطر الأوامر]]. إذا لم تكن متأكدًا مما يعنيه هذا، ففكر في البحث عن برنامج تعليمي للنظام الأساسي الذي اخترته والذي سيمكنك من التعامل مع سطر أوامر جهاز الكمبيوتر الخاص بك. كحد أدنى ، يجب أن تعرف الأوامر الأساسية للتنقل إلى مجلدات مختلفة وتنفيذ عمليات إدارة الملفات البسيطة. سوف يوضح هذا الكتاب أي أوامر أخرى ستحتاج إلى تشغيلها من سطر الأوامر لتشغيل كود سي الخاص بك على جهازك.
No one ever became a musician just by reading sheet music. Musicians have to constantly play and practice on their instruments to get good. Similarly, the only way to become a programmer is to write and execute lots of code. To do that, you will need two different pieces of software: a '''compiler''' and a '''text editor'''. Both can be had for no cost.
 
=== البرامج التي ستحتاجها ===
====== Compilers ======
كمثال، لا أحد أصبح موسيقيًا بمجرد قراءة النوتة الموسيقية. يجب على الموسيقيين أن يلعبوا ويتدربوا باستمرار على آلاتهم ليحصلوا على شيء جيد. لذا فإن الطريقة الوحيدة لتصبح مبرمجًا هي كتابة وتنفيذ الكثير من الأكواد البرمجية، وللقيام بذلك، ستحتاج إلى برنامجين مختلفين: '''المترجم''' و'''محرر النصوص'''. يمكنك تحميل أي منهما بدون تكلفة.
A compiler is a sophisticated piece of software for converting the C source code you write with your text editor into the [[w:machine code|machine code]]<ref>Actually, GCC’s (GNU C Compiler) '''cc''' (C Compiler) translates the input .c file to the target CPU’s [[w:Assembly language|assembly]], output is written to an .s file. Then '''as''' (assembler) generates a machine code file from the .s file. Pre-processing is done by another sub-program '''cpp ''' (C PreProcessor), which is not to be confused with '''c++''' (a compiler for another programming language).</ref> that you can execute on your computer. Below is a list of some popular C compilers. Note that some of the compilers listed below come as part of an '''[[wikipapers:Integrated development environment|integrated development environment]] (IDE).''' However, if you are brand new to programming, it's best if you can install and run the compiler from the command line instead of through an IDE. This book uses the GNU C Compiler (GCC) in its examples so we recommend installing this compiler for use with this book. The next section in this chapter will explain how to download and install the GCC software to your machine.
 
====== Compilersالمترجم ======
المترجم هو برنامج معقد لتحويل أكواد لغة سي الذي تكتبها باستخدام محرر النصوص الخاص بك إلى ملف [[w:لغة الآلة|لغة الآلة]]<ref>في الحقيقة، جنو سي سي (مترجم جنو لغة سي - {{إنج|GNU C Compiler}}) '''سي سي''' (مترجم سي - {{إنج|C Compiler}}) يترجم الملف المُدخل بصيغة '''.c''' إلى [[w:لغة التجميع|لغة المُجمع]] الخاصة بالمعالج المركزي، يأتي المُخرج بملف بصيغة '''.s''' . ومن ثم يقوم المُجمع بإنشاء أكواد لغة الآله من الملف '''.s''' . تتم المعالجة المسبقة بواسطة برنامج فرعي آخر '''سي بي بي''' (المعالج المُسبق لسي - {{إنج|C PreProcessor}}).</ref> والتي يُمكنك تنفيذها على جهاز الكمبيوتر الخاص بك. يوجد أدناه قائمة ببعض المترجمات المشهورة للغة سي. لاحظ أن بعض المترجمات المدرجة أدناه تأتي كجزء من '''[[w:بيئة تطوير متكاملة|بيئة التطوير المتكاملة]] (IDE).''' ومع ذلك، إذا كنت جديدًا في البرمجة، فمن الأفضل أن تتمكن من تثبيت وتشغيل المترجم من سطر الأوامر بدلاً من برامج بيئة التطوير المتكاملة. يستخدم هذا الكتاب مترجم جنو لغة سي {{إنج|GNU C Compiler}} في الأمثلة لذلك نوصي بتثبيت هذا المترجم لاستخدامه مع هذا الكتاب. سيشرح القسم التالي في هذا الفصل كيفية تنزيل هذا المُترجم وتثبيته على جهازك.
 
 
'''Popular C compilers/IDEs include:'''
'''المترجمات المشهورة للغة سي/يتضمن أيضًا برامج بيئة التطوير المتكاملة:'''
{| style="border: 1px #aaa solid;"
! align="leftright"|Nameالأسم
! align="leftright"|Websiteالموقع
! align="leftright"|Platformالمنصة
! align="leftright"|Licenseالترخيص
! align="leftright"|Detailsالتفاصيل
|-
| [[w:مايكروسوفت فيجوال ستوديو#فيجوال_ستوديو_كوميونيتي|مايكروسوفت فيجوال ستوديو كوميونيتي]]
| [[w:Microsoft Visual Studio#Community|Microsoft Visual Studio Community]]
| [https://www.visualstudio.com/vs/community/ Visualفيجوال Studioستوديو]
| الويندوز
| Windows
| ملكية، بدون مقابل
| Proprietary, free of charge
| إصدار قوي وسهل للطلاب من مترجم قياسي.
| Powerful and student-friendly version of an industry standard compiler.
|-
|[[w:إكس كود|إكس كود]]
|[[wikipedia:Xcode|Xcode]]
|إكس كود
|Xcode
|ماك أو إس
|macOS, OSX
|ملكية، بدون مقابل
|Proprietary, free of charge
|Availableمتوفر freeمجانًا of charge atفي [https://itunes.apple.com/us/app/xcode/id497799835?ls=1&mt=12 Macمتجر Appتطبيقات Storeالماك].
|-
| [[w:Tinyمترجم Cسي Compilerالمصغر|Tinyمترجم Cسي Compilerالمصغر (TCC)]]
| [https://bellard.org/tcc/ tinyccمترجم سي مصغر]
| جنو/لينكس، الويندوز
| GNU/Linux, Windows
| [[w:رخصة جنو العمومية الصغرى|رخصة جنو العمومية الصغرى]]
| [[w:GNU Lesser General Public License|LGPL]]
| مترجم صغير وسريع وبسيط.
| Small, fast and simple compiler.
|-
| [[w:Clangكلانج|Clangكلانج]]
| [https://clang.llvm.org clangكلانج]
| جنو/لينكس، ويندوز، يونكس، ماك أو إس
| GNU/Linux, Windows, Unix, OS X
| [http://opensource.org/licenses/UoI-NCSA.php Universityجامعة of Illinoisإلينوي/NCSAرخصة إن سي أس Licenseأيه]
| واجهة أمامية مجانية ومرخصة بشكل مسموح والتي تستخدم أدوات إل إل في إم {{إنج|LLVM}}.
| A free, permissively licensed front-end using a LLVM backend.
|-
| [[w:مجموعة مترجمات جنو|مترجم جنو لغة سي]]
| [[w:GNU Compiler Collection|GNU C Compiler]]
| [https://gcc.gnu.org gccجنو سي سي]
| GNU/Linux, [http://mingw.org MinGW] orلـ جنو ولينكس أو [https://mingw-w64.org mingw-w64] (Windows),لكلاً من الويندوز، يونكس، Unix,ماك OSأو Xإس.
| [[w:رخصة جنو العمومية|رخصة جنو العمومية]]
| [[w:GNU General Public License|GPL]]
| الأساسي بحكم الأمر الواقع. يأتي مُضمنًا مع معظم الأنظمة الشبيهة بـ يونكس.
| The De facto standard. Ships with most Unix-like systems.
|}
 
====== محررات النصوص وبيئات التطوير المتكاملة ======
====== Text Editors and IDEs ======
Aside from a compiler, the only other software requirement is a [[w:Text Editor|text editor]] for writing and saving your C code. Note that a text editor is different from a [[w:Word Processor|word processor]], a piece of software with many features for creating visually appealing documents. Unlike word processors, text editors are primarily designed to create plain text files. On Windows, the Notepad text editor can be used but it does not offer any advanced capabilities such as syntax highlighting and code completion. There are hundreds of text editors (see [[w:List of text editors|List of Text Editors]]). Among the most popular are [[w:Notepad++|Notepad++]] for Windows as well as [https://atom.io/ Atom], [[w:Sublime Text|Sublime Text]], [[w:gedit|gedit]], [[w:Vim (text editor)|Vim]] and [[w:Emacs|Emacs]] which are also available on other operating systems (“cross-platform”). These text editors come with [[w:syntax highlighting|syntax highlighting]] and line numbers, which makes code easier to read at a glance, and to spot syntax errors. Many text editors have features for increasing your coding speed, such as keystroke macros and code snippets, that you can take advantage of as you gain skill as a programmer.