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

Computer Programming I_11

الكلية كلية الهندسة     القسم  الهندسة البيئية     المرحلة 1
أستاذ المادة رواء حسين كاظم العيساوي       07/07/2018 18:51:18
Files
Two types of files in QBASIC:
1. Program File:
Program file contains a set of instructions. (QBASIC Commands). Extension is “.bas”
2. Data File:
Data file is the file that stores data permanently which are required for data processing. Extension is “.dat” or any three letter extension. Data stored in a row, which is known as record. Data field may contain many records. Each Data of record is known as field.
Opening a data file:
OPEN "student.dat" FOR OUTPUT As #1
Open in OUTPUT mode - new data file created and assigned 1 as a file number (File number can be 1 to 255).
OPEN "student.dat" FOR INPUT As #2
Opens an existing data file - can retrieve records of data and manipulate info.
Closing a data file:
CLOSE #1, #3
Closes both data files which have file numbers 1 and 3
CLOSE
Closes all opened data files.


Files
Two types of files in QBASIC:
1. Program File:
Program file contains a set of instructions. (QBASIC Commands). Extension is “.bas”
2. Data File:
Data file is the file that stores data permanently which are required for data processing. Extension is “.dat” or any three letter extension. Data stored in a row, which is known as record. Data field may contain many records. Each Data of record is known as field.
Opening a data file:
OPEN "student.dat" FOR OUTPUT As #1
Open in OUTPUT mode - new data file created and assigned 1 as a file number (File number can be 1 to 255).
OPEN "student.dat" FOR INPUT As #2
Opens an existing data file - can retrieve records of data and manipulate info.
Closing a data file:
CLOSE #1, #3
Closes both data files which have file numbers 1 and 3
CLOSE
Closes all opened data files.


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