一个小程序,QB编的.
CLS
PRINT "MASE Corporation All Reserved ."
PRINT "GALLERA 7.0 x16Bit For WinXP/98/2000"
PRINT
PRINT
PRINT " Welcome to use Mase GALLERA !"
PRINT " WARNING : This program is not registed ,so you can not use EDIT function ."
PRINT " Step 1 : Set your Password"
INPUT " Input your new PASSWORD:", password$
INPUT " Enter again:", password1$
DO WHILE password$ <> password1$
PRINT " Two password are not same ,please RETRY ."
INPUT " Input your new PASSWORD:", password$
INPUT " Enter again:", password1$
LOOP
CLS
INPUT "Log in:Enter PASSWORD:", a$
DO WHILE a$ <> password$
INPUT "ERROR.Retry:", a$
LOOP
CLS
PRINT "--------------------New Database--------------------"
DO
INPUT "\GALLERA\BIN>", a$
a$ = LCASE$(a$)
e$ = ""
lock$ = ""
SELECT CASE a$
CASE "help"
PRINT "Mase GALLERA Function Help"
PRINT "CLS:Clear screen"
PRINT "CREATE:Create file to output"
PRINT "OPEN:Open file "
PRINT "EDIT:Edit contents in someone sheet"
PRINT "CLOSE FILE:Close Someone file"
PRINT "DELETE FILE:To delete file"
PRINT "LOCK:Lock your GALLERY system"
PRINT "NEW WORD:Append someword in file"
PRINT "DIR:Display all file in \GALLERA\BIN"
PRINT "CHANGE NAME:Change file name"
PRINT "EXIT:Exit GALLERA system"
CASE "cls"
CLS
IF f$ = "" THEN
PRINT "--------------------New Database--------------------"
ELSE
PRINT "--------------------"; f$; "--------------------"
END IF
CASE "create"
INPUT " ->File Name:(example:*)", f$
f$ = UCASE$(f$) + ".DB"
OPEN f$ FOR OUTPUT AS #1
CLS
PRINT "--------------------"; f$; "--------------------"
CASE "open"
INPUT " ->File Name:(example:*.*):", f$
f$ = UCASE$(f$)
OPEN f$ FOR APPEND AS #1
CLS
PRINT "--------------------"; f$; "--------------------"
CASE "close file"
CLOSE #1
f$ = ""
CLS
PRINT "--------------------New Database--------------------"
CASE "lock"
PRINT "Sure?:LOCK means your prompt be CLEAR!"
PRINT
PRINT "[Y] to lock your GALLERY system ,[N] to continue program"
WHILE lock$ = "": lock$ = INKEY$: WEND
lock$ = UCASE$(lock$)
IF lock$ = "Y" THEN
CLS
PRINT "GALLERA Locked"
DO
INPUT "Input PASSWORD to unlock:", password1$
LOOP WHILE password1$ <> password$
CLS
IF f$ <> "" THEN
PRINT "--------------------"; f$; "--------------------"
ELSE
PRINT "--------------------New Database--------------------"
END IF
END IF
CASE "change name"
INPUT " ->Input names:(example:old$,new$)"; m$, n$
NAME m$ AS n$
f$ = n$
OPEN f$ FOR APPEND AS #1
CLS
PRINT "--------------------"; f$; "--------------------"
CASE "delete file"
INPUT " ->Input file name to DELETE:(example:name$)"; kil$
KILL kil$
CASE "edit"
PRINT "Cannot use this function:You have not install this function"
CASE "new word"
PRINT "You're being APPEND mode,input '||||' to exit "
DO
LINE INPUT nw$
IF nw$ <> "||||" THEN
PRINT #1, nw$
ELSE
EXIT DO
END IF
LOOP
CASE "dir"
FILES "*.*"
CASE "exit"
PRINT "Sure?:Do you want to SAVE and EXIT GALLERA ?"
PRINT
PRINT "[Y] to SAVE and EXIT ,[N] to CONTINUE PROGRAM"
WHILE e$ = "": e$ = INKEY$: WEND
e$ = UCASE$(e$)
IF e$ = "Y" THEN
CLOSE
END
END IF
CASE ELSE
PRINT "Cannot use this function:You have not install this function"
END SELECT
LOOP
END