-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFiling Task 1.3.vb
More file actions
37 lines (27 loc) · 930 Bytes
/
Filing Task 1.3.vb
File metadata and controls
37 lines (27 loc) · 930 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
33
34
35
36
37
Module Module1
Sub Main()
Dim mName As String = ""
Dim IDnumber As Integer = 0
'Task 1.3 Name searching in file
Dim Isfound As Boolean
Dim SearchName As String
Isfound = False
SearchName = ""
Console.Write("Enter the name you want to search: ")
SearchName = Console.ReadLine
FileOpen(1, "C:\Filing Practice\ClubMembers.txt", OpenMode.Input)
While Not EOF(1)
Input(1, mName)
Input(1, IDnumber)
If UCase(mName) = UCase(SearchName) Then
Isfound = True
Console.WriteLine("The Member ID number is: " & IDnumber)
End If
End While
FileClose(1)
If Isfound = False Then
Console.WriteLine("The Name was not found...")
End If
Console.ReadKey()
End Sub
End Module