passwordsqbasicquickbasic

checking a line of code in a file on quickbasic


I'm trying to make my program have a dialogue box with a password that has been set in a file. I need help having it scan a line of code in a file and if the password entry is true, then proceed.


Solution

  • This code gets a password and compares it to a password in a file:

    INPUT "Password", x$
    OPEN "password.dat" FOR INPUT AS #1
    INPUT #1, y$
    IF x$ = y$ THEN PRINT "Match": ' do stuff