1 / 18

# 計算機程式 C omputer Programming Language Lecture 7 檔案 - PowerPoint PPT Presentation

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.

## PowerPoint Slideshow about ' 計算機程式 C omputer Programming Language Lecture 7 檔案' - anson

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

### 計算機程式Computer Programming LanguageLecture 7 檔案

Open(unit=10, file=‘a.txt’, form=‘formatted’, status=‘unknown’, & error=100, iostat=0, blank=null)

• Inquire (file=‘hello.txt’, exist=alive, iostat=0)

• Backspace (unit=10, err=100, iostat=0)

• Endfile (unit=10, err=100, iostat=0)

• Rewind (unit=10, err=100 , iostat=0)

• Close (unit=10, status=‘keep’, err=100 , iostat=0)

• Close (unit=10, status=‘delete’, err=100 , iostat=0)

Cont...

• 循序檔操作 (sequential)

• 讀寫資料只能從頭開始一步步走。改變檔案讀寫位置時，只能一步步進退，或是跳到檔案開頭。

• 直接存取操作 (direct)

• 事先將檔案空間分割成幾個同大小區塊，區塊會自動按順序編號。檔案讀寫時，先指定讀寫位置的區塊，再進行讀寫。

6的原因：４個字元＋2

Cont.寫一程式讀取下面成績單，計算個人總分及各科平均分數