Yeah the parsing for some of the BASICs was weird at times. Some auto-capitalised terms whereas others would list that as a syntax error or some other error. Some even allowed you to abbreviate terms. Locomotive BASIC allowed you to use something like a question mark (I forget the exact punctuation but I think it was a question mark) in place of a PRINT command.
BCC Basic is parsing it as FOR K = ATOM and complains that "TO" is missing.
Applesoft Basic is parsing it as FOR K = A TO M, and adds spaces when you list it back.
C64 Basic is parsing it as FOR K = A TO M as well, but does not add spaces when you list it back.
QBASIC and GWBASIC are parsing "fork" and "atom" as variable names.