dimanche 30 août 2015

Could someone explain the last case of the following code? What does MoveCursor do?

The program is for editing the system date and time by the user. The input set is (Alt-F4,Time,Date,Tab). Please explain how the Tab case works?
Code as follows-

Input = GetInput()
While (Input ­ Alt-F4) do
Case (Input = Time)
If ValidHour(Time.Hour) and ValidMin(Time.Minute) and
ValidSec(Time.Second) and ValidAP(Time.AmPm)
Then
UpdateSystemTime(Time)
Else
DisplayError(“Invalid Time.”)
Endif
Case (Input = Date)
If ValidDay(Date.Day) and ValidMnth(Date.Month) and
ValidYear(Date.Year)
Then
UpdateSystemDate(Date)
Else
DisplayError(“Invalid Date.”)
Endif
**Case (Input = Tab)
If TabLocation = 1
Then
MoveCursor(2)
TabLocation = 2
Else
MoveCursor(1)
TabLocation = 1
Endif**
Endcase
Input = GetInput()
Enddo

Aucun commentaire:

Enregistrer un commentaire