CAI教學軟體中資料的分割

才智咖 人氣:2.87W

摘要: 本文使用物件導向的高階語言Visual Basic6.0設計了一套既能編輯,又能應用於教學演示的高階CAI軟體。使用本軟體,用指定的格式輸入CAI資料,並在其中設定斷點;同時,用本軟體進行播放,可實現模擬教學目的。本文著重論述瞭如何輸入資料、分割資料和顯示資料的演算法。

CAI教學軟體中資料的分割

Abstract:Using the advanced language Object Oriented -Visual Basic 6.0, the author developed a set of advanced CAI software, which can be used in data editing and teaching. This software can be used to input CAI data in assigned format and set breakpoints. At the mean time, it can be used to display data in order to realize the objective of simulated teaching. This article emphasizes on the algorithm of data input, data split and data display.

隨著計算機的普及和網路技術的發展,計算機輔助教學(CAI)越來越受到人們的重視。但縱觀目前流行的CAI軟體,大多隻能進行簡單的放映,而不具備編輯能力,為數很少的幾個能夠編輯的軟體,操作又很複雜,不能針對教學特點。基於此,作者設計了一個既能編輯,又能放映的CAI軟體,該軟體高度整合,易學易用。
1 資料的輸入
資料的輸入採用了類似超文字語言的方法,規定了若干關鍵字。如:“”表示一個特定的指令的開始;又如:“titl^2、光的`性質^”,titl:表示後邊的內容是一條標題,位於“^……^”之間的資料為標題的內容,“^”為範圍限定符。
所有的符號都可以在編輯狀態下的螢幕上找到。如圖一是編輯狀態的一角,左邊 圖 1 編輯狀態
為文字區,右邊為指令區。 Fig.1 edit status 2 資料的分割
資料的分割分為兩個步驟進行:
第一步:把文章以字形為根據分解成段落。字形的標識與命令標識相關。
程式如下:
'把整個一頁分成若個段落
Public Sub FunDivide(ByRef SourceStr As String, ByRef Destination As String, ByRef Position As Integer, ByRef propName As String)
Dim ControllCode As String
Dim codCommand As String
1
Dim ss As String
Dim SourceLen As Long

SourceLen = Len(SourceStr)
Destination = ""

ControllCode = Mid(SourceStr, Position, 1)
If (ControllCode = "") Then
Position = Position 1
codCommand = Mid(SourceStr, Position, 4)
propName = codCommand
Position = Position 4
codCommand = Mid(SourceStr, Position, 1)
If codCommand = "^" Then
Position = Position 1
ss = Mid(SourceStr, Position, 1)
Do While ss