-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathDataEntry2.cls
More file actions
32 lines (28 loc) · 678 Bytes
/
Copy pathDataEntry2.cls
File metadata and controls
32 lines (28 loc) · 678 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
Class ObjectScript.DataEntry2
{
/// Main loop section
ClassMethod Main()
{
while ..Prompt() {
do ..Display()
}
}
/// prompt
ClassMethod Prompt() As %Boolean [ PublicList = (name, phone, dob) ]
{
read !, "Name: ", name
return:(name = "") 0 // user entered nothing so return FALSE and exit method
read !, "Phone: ", phone
read !, "DOB: ", dob
return 1 // return true
}
/// display the data
ClassMethod Display() [ PublicList = (name, phone, dob) ]
{
write !!, "========================================"
write !, "Name:", ?20, name
write !, "Phone:", ?20, phone
write !, "DOB:", ?20, dob
write !, "========================================", !
}
}