مشاهدة النسخة كاملة : هام وضرورى مرة اخرى


petermaher
12-05-2015, 04:17 PM
ما هى إجابة السؤال الأتى

Function calc ( byval fn as single , byval sn as single ) as decimal
dim total as single
total = fn +sn
return total
end function


- what the procedure name ?
- what the parameters?
- what the returned value ?
- what the data type of function ?
- what the data type of parameters ?
- what the data type of returned value ?

سيف سالم
12-05-2015, 04:25 PM
ما هى إجابة السؤال الأتى

Function calc ( byval fn as single , byval sn as single ) as decimal
dim total as single
total = fn +sn
return total
end function


- what the procedure name ?
- what the parameters?
- what the returned value ?
- what the data type of function ?
- what the data type of parameters ?
- what the data type of returned value ?
jتانى
برده السؤال ده لما جاء في احد المحافظات تم استبدال نوع بنوع بيانات اخر ليه الهدف ايه بقيس من وراه اه معرفش
وحصل ما حصل
والف راي والف قول
نوع بيان الدالة والقيمة الراجعة لابد ان يكونوا واحد او ينفع التحويل بينهما
اما dim total as single
فدا نوع بيان المتغير الذى سيخصص له ناتج جمع الوسائط وليس نوع بيان القيمة الراجعة
علشان لو تم جمع قيم تخزن في single و لا تخزن في decimal سيعطى خطأ تشعيل