QB / QB64 Discussion Forum      Other Subforums, Links and Downloads

Respond to this messageReturn to Index
Original Message
  • Here goes:
    • AlGoreIthm (Login AlGoreIthm)
      Posted Feb 16, 2012 11:56 AM

      t% = 0
      DO
      INPUT "Player Name:"; nm$
      INPUT "Player Number:"; nr$
      IF nm$ = "" OR nr$ = "" THEN EXIT DO
      z% = INSTR(nm$, " ")
      t% = t% + 1
      n$(t%) = LEFT$(nm$, z% - 1) + nr$ + RIGHT$(nm$, LEN(nm$) - z%)
      LOOP

      DO
      PRINT
      INPUT "Search for / ENTER to quit"; s$
      IF LEN(s$) = 1 AND s$ > "/" AND s$ < ":" THEN sn% = 1 ELSE sn% = 0
      FOR l% = 1 TO t%
      IF INSTR(n$(l%), s$) THEN
      c% = 0
      DO
      c% = c% + 1
      z% = ASC(MID$(n$(l%), c%, 1))
      LOOP WHILE z% < 48 OR z% > 57
      nr$ = MID$(n$(l%), c%, 2 + (MID$(n$(l%), c% + 1) > "9"))
      IF LEN(s$) > 0 AND sn% = 0 OR sn% = 1 AND LEN(nr$) = 1 THEN
      PRINT nr$ + " " + LEFT$(n$(l%), c% - 1) + " " + MID$(n$(l%), c% + LEN(nr$)): ok% = 1
      ELSE ok% = 0
      END IF
      END IF
      NEXT
      IF ok% = 0 AND LEN(s$) > 0 THEN PRINT "No Match(es) for this search."
      LOOP WHILE LEN(s$) > 0
      END
    Login Status
  • You are not logged in
    • Login
      Password
       

      Optional
      Provides additional benefits such as notifications, signatures, and user authentication.


      Create Account
    Your Name
    Message Title
    Message Text
    Options