I've asked this before but I've decided to make a new one since it gets far too complicated and I want it simple.

This program has to be done with array, no database.

Example:

1)User A validates himself
2)Book a room
3)an array in that room number is filled with a value, rendered it as unavailable

1)User B comes, validates himself
2)Book a room
3)Try to book same room as user A, but that particular array have been altered, making it unavailable
4) Prompt message is given and it loops to the first booking question


VB Code:
  1. Dim guest(2) As String
  2. Dim room(2) As String
  3. Dim i As Integer
  4.  
  5. guest(0) = "a"
  6. guest(1) = "b"
  7. guest(2) = "c"
  8.  
  9. 'pretends that there is calculation that
  10. 'validates the user here
  11.  
  12. room(0) = "1"
  13. room(1) = "2"
  14. room(2) = "3"
  15.  
  16. 'Following instruction is what i'm trying to do
  17.  
  18. room = InputBox("enter a room")
  19.  
  20. 'using boolean, if room selected is 1-2
  21. 'a special value (anything) is inserted in that
  22. 'room array so that it cannot be used by the
  23. 'next user
  24.  
  25. 'If rooom is booked, a prompt message is
  26. 'given and process starts again with
  27. 'booking room


If it's helpful, here is part of the pseudocode:

VB Code:
  1. boolean isIndexFull(integer index)
  2. if array[index] == marker
  3. return true
  4. else
  5. return false
  6. end if

Please note that this is a mock part of my program and I have spent considerable time figuring this out. Being a newbie, I am totally clueless in how array works and have spent more than 3 hours on this part of code alone with no avail. I'm not trying to get the easy way out.