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

Input and Output statements in Q.B

Share |
الكلية كلية هندسة المواد     القسم قسم هندسة السيراميك ومواد البناء     المرحلة 1
أستاذ المادة رلا سامي خضير عباس العيسى       03/01/2017 13:30:17
Input and output statements in QB
Clean screen Cls : it use at the begin of every program to clear the screen before run the program ; if it not use we will see that when run the program more than one time it will print the new result and old result .
Output statements
Print statement: use to print the data or the information on the screen
Example to use Separator shall and normal shall with print statement
cls
A=12
Print "A="; A
End

At run :
A=12

cls
A=12
Print "A=", A
End
In this program ….print the value of A after one zone ; where each zone constant of 14 spaces , Q.B screen constant of five zones .
At run :
A= 12





Read ….data statement :
Use this sentence to read literal data or knowledge of numerical data in the (data )statement ... this sentence is always accompanied by read statement.
The general formula of read statement is

Read variable list
Where variable list represent all the variable went to read from Data statement
Read X1,X2,X3

The general formula of data statement is
Data constant [constant]
Where the constant represent the value of the variable went to read in Read statement; which may be literal or numerical, content all the literal and numerical find in Q.B
Data C24,1901,Black ,"Abcd"

Example to read three degree by using the Read statement
Read D1,D2,D3
The Data statement can be in one of these formulas
Data 10,80,90
Or
Data 10
Data 80
Data 90

Where the read can be from one of the multi statements for (Data) ;the important thing is that the true sequence to read data , also the Data statement can be in any place of the program ……Data statement not running statement .


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