Previous Next Edit Rename Undo Search Administration
Result = Comp ( String1 AS String , String2 AS String [ , Mode AS Integer ] ) AS Integer
Compares two strings, and returns:
- 0 if the two strings are equal.
- 1 if String1 is strictly greater than String2.
- -1 if String1 is strictly lower than String2.
parameter can be any combination defined in the Comparison methods
IF (Comp(command, "open") = 0) THEN open_file
DIM UserName AS String
PRINT "Please Enter Your User Name:";
IF Comp(UserName, "Akiti") = 0 THEN
PRINT "You Can Enter"
PRINT "Sorry, You Cannot Enter"
' This is illustrative example only.
' To actually delete the file you will need to write the proper code.
DIM answer AS String
PRINT "Do you want to delete the file? [y/n]"
IF Comp(answer, "y", gb.text) = 0 THEN
'...... (code to delete the file)
' If succesfull we print the following message
PRINT "File Deleted"
PRINT "File Not Deleted"