انت هنا الان : شبكة جامعة بابل > موقع الكلية > نظام التعليم الالكتروني > مشاهدة المحاضرة

lecture2- Variables and Math Operations

Share |
الكلية كلية تكنولوجيا المعلومات     القسم قسم شبكات المعلومات     المرحلة 1
أستاذ المادة امير كاظم هادي الاسدي       24/02/2016 15:41:07
1 المتغيرات Variables:-
المتغيرات هي اماكن خزن في الذاكرة.
A variable is a location in memory, which has been specifically reserved for holding data.i.e. A variable is a ‘data box’. A variable thus binds the stored data to a name. Which enables convenient access at a later time. Variables can be assigned values, via ‘assignment’: Such an assignment operation takes the form: variable_name = value Here, ‘=’ is the assignment operator (NOT the ‘equality’ operator) Examples:المتغيراتVariables Declaration and assignment
Prior to use, in VB variables must first be declared…This reserves (creates) a place in your computer’s memory.The VB syntax for a local variable declaration:
Dim variable_name As data_type
Dim is a VB keyword for declaring a variable;variable_name is the name of the variable; As is a VB keyword for specifying the data_type… the type of data the variable will hold. Example of variable use: Adding 10 + 15…
Example2


For a constant, both memory location and the stored value are fixed.
The VB syntax for declaring a constant is:

Const const_name As Data_Type = value
Const is a keyword declaring the constant; const_name and value are the name and value of the constant; Data_Type is the type of constant.
Note: variables can also be given initial values…In both cases, this is called ‘initialization’.
Example 4: Const x As Integer = 10
Example 5: Const PI As Double = 3.14


المادة المعروضة اعلاه هي مدخل الى المحاضرة المرفوعة بواسطة استاذ(ة) المادة . وقد تبدو لك غير متكاملة . حيث يضع استاذ المادة في بعض الاحيان فقط الجزء الاول من المحاضرة من اجل الاطلاع على ما ستقوم بتحميله لاحقا . في نظام التعليم الالكتروني نوفر هذه الخدمة لكي نبقيك على اطلاع حول محتوى الملف الذي ستقوم بتحميله .
الرجوع الى لوحة التحكم