صفحة 143 - كتاب التقنية الرقمية - الصف 12 - الفصل 1 - المملكة العربية السعودية

الكتاب: كتاب التقنية الرقمية - الصف 12 - الفصل 1 | المادة: التقنية الرقمية | المرحلة: الصف 12 | الفصل الدراسي: 1

الدولة: المملكة العربية السعودية | المنهج: المنهج السعودي - وزارة التعليم

📚 معلومات الصفحة

الكتاب: كتاب التقنية الرقمية - الصف 12 - الفصل 1 | المادة: التقنية الرقمية | المرحلة: الصف 12 | الفصل الدراسي: 1

الدولة: المملكة العربية السعودية | المنهج: المنهج السعودي - وزارة التعليم

📋 المحتوى المنظم

📖 محتوى تعليمي مفصّل

نوع: محتوى تعليمي

استخدام المتغيرات

نوع: محتوى تعليمي

في مطور التطبيقات، المتغير هو موقع تخزين يحتوي على قيمة يمكن أن تتغير أثناء تنفيذ التطبيق. يمكن استخدام المتغيرات (Variables) لتخزين مجموعة واسعة من أنواع البيانات، بما في ذلك الأرقام أو النصوص أو القوائم. يمكن تهيئة المتغيرات بقيمة أولية، وتحديثها أثناء تنفيذ التطبيق واستخدامها في العبارات الشرطية للتحكم في سلوك التطبيق.

نوع: محتوى تعليمي

هناك نوعان من المتغيرات وهما:

نوع: محتوى تعليمي

1. المتغيرات المحلية (Local Variable)

نوع: محتوى تعليمي

وهي المتغيرات التي لا يمكن استخدامها إلا داخل لبنة محددة؛ وتُستخدم اللبنة الآتية لإنشاء المتغير المحلي:

نوع: محتوى تعليمي

في المثال الآتي تم إنشاء متغير محلي اسمه "a" وقيمته 10.

نوع: محتوى تعليمي

2. المتغيرات العامة (Global Variable)

نوع: محتوى تعليمي

وهي المتغيرات التي يمكن استخدامها أو تغيير قيمتها في أي جزء من التطبيق؛ وتُستخدم اللبنة الآتية لتعريف المتغير العام:

نوع: NON_EDUCATIONAL

وزارة التعليم Ministry of Education 2025 - 1447

نوع: METADATA

143

🔍 عناصر مرئية

A visual representation of a code block for initializing a local variable. It shows an orange block with a gear icon and the text "initialize local name to", connected to a smaller orange block labeled "in". This block is used to declare and assign an initial value to a local variable within a specific scope.

A visual representation of a code block sequence. It starts with a green "when Button1 .Click" block, which has a dropdown for "Button1". Nested inside its "do" slot is an orange "initialize local a to "10"" block, which has a text input field for "a" and a text input field for "10". This block is connected to a smaller orange "in" block. This diagram illustrates how to initialize a local variable named "a" with the value "10" when "Button1" is clicked.

A visual representation of a code block for initializing a global variable. It shows an orange block with a gear icon and the text "initialize global name to". This block is used to declare and assign an initial value to a global variable, accessible throughout the application.

📄 النص الكامل للصفحة

استخدام المتغيرات في مطور التطبيقات، المتغير هو موقع تخزين يحتوي على قيمة يمكن أن تتغير أثناء تنفيذ التطبيق. يمكن استخدام المتغيرات (Variables) لتخزين مجموعة واسعة من أنواع البيانات، بما في ذلك الأرقام أو النصوص أو القوائم. يمكن تهيئة المتغيرات بقيمة أولية، وتحديثها أثناء تنفيذ التطبيق واستخدامها في العبارات الشرطية للتحكم في سلوك التطبيق. هناك نوعان من المتغيرات وهما: 1. المتغيرات المحلية (Local Variable) وهي المتغيرات التي لا يمكن استخدامها إلا داخل لبنة محددة؛ وتُستخدم اللبنة الآتية لإنشاء المتغير المحلي: في المثال الآتي تم إنشاء متغير محلي اسمه "a" وقيمته 10. 2. المتغيرات العامة (Global Variable) وهي المتغيرات التي يمكن استخدامها أو تغيير قيمتها في أي جزء من التطبيق؛ وتُستخدم اللبنة الآتية لتعريف المتغير العام: وزارة التعليم Ministry of Education 2025 - 1447 143 --- VISUAL CONTEXT --- **DIAGRAM**: Untitled Description: A visual representation of a code block for initializing a local variable. It shows an orange block with a gear icon and the text "initialize local name to", connected to a smaller orange block labeled "in". This block is used to declare and assign an initial value to a local variable within a specific scope. Context: Illustrates the syntax for declaring a local variable in a block-based programming environment. **DIAGRAM**: Untitled Description: A visual representation of a code block sequence. It starts with a green "when Button1 .Click" block, which has a dropdown for "Button1". Nested inside its "do" slot is an orange "initialize local a to "10"" block, which has a text input field for "a" and a text input field for "10". This block is connected to a smaller orange "in" block. This diagram illustrates how to initialize a local variable named "a" with the value "10" when "Button1" is clicked. Context: Provides a concrete example of how to initialize a local variable 'a' with a value of 10 upon a specific event (Button1 click). **DIAGRAM**: Untitled Description: A visual representation of a code block for initializing a global variable. It shows an orange block with a gear icon and the text "initialize global name to". This block is used to declare and assign an initial value to a global variable, accessible throughout the application. Context: Illustrates the syntax for declaring a global variable in a block-based programming environment.