It doesn't really matter what's in there, as long as it is a match.
Sure, as long as everyone has the same security level. But if there are restrictions like giving access to certain people at certain times of the day, then you'll need to know who they are.
I'm sure you could do this on your own, but here's a possible search routine. Might save you some time. Haven't thoroughly tested it, but it should be close.
Code:
<font color="#000000"><b>Record </b><font color="#008000"><b>VAR BYTE </b></font><font color="#0000FF"><b><i>; Start of each Record
</i></b></font><b>Ptr </b><font color="#008000"><b>VAR BYTE </b></font><font color="#0000FF"><b><i>; Points to each byte in the record
</i></b></font><b>TempB </b><font color="#008000"><b>VAR BYTE </b></font><font color="#0000FF"><b><i>; Temp var
</i></b></font><b>MaxEE </b><font color="#008000"><b>CON </b></font><b>250 </b><font color="#0000FF"><b><i>; Start addr of Last available record
</i></b></font><b>SerNum </b><font color="#008000"><b>VAR BYTE</b></font>[<b>5</b>] <font color="#0000FF"><b><i>; The S/N to search for
</i></b></font><b>UserID </b><font color="#008000"><b>VAR BYTE </b></font><font color="#0000FF"><b><i>; Resulting User ID
</i></b></font><b>SearchUser</b>:
<font color="#008000"><b>FOR </b></font><b>Record </b>= <b>0 </b><font color="#008000"><b>TO </b></font><b>MaxEE </b><font color="#008000"><b>STEP </b></font><b>5
</b><font color="#008000"><b>FOR </b></font><b>Ptr </b>= <b>0 </b><font color="#008000"><b>TO </b></font><b>4
</b><font color="#008000"><b>READ </b></font><b>Record </b>+ <b>Ptr</b>, <b>TempB
</b><font color="#008000"><b>IF </b></font><b>SerNum</b>(<b>Ptr</b>) <> <b>TempB </b><font color="#008000"><b>THEN </b></font><b>RecNotMatch
</b><font color="#008000"><b>NEXT </b></font><b>Ptr
</b><font color="#008000"><b>GOTO </b></font><b>MatchFound
RecNotMatch</b>:
<font color="#008000"><b>NEXT </b></font><b>Record
UserID </b>= <b>0 </b><font color="#0000FF"><b><i>; returns 0 if no match found
</i></b></font><font color="#008000"><b>RETURN
</b></font><b>MatchFound</b>:
<b>UserID </b>= <b>Record </b>/ <b>5 </b>+ <b>1 </b><font color="#0000FF"><b><i>; returns UserID starting at 1
</i></b></font><font color="#008000"><b>RETURN
</b></font>
<br>
Bookmarks