MML DATA is usually formatted like:
DATA "more MML"
This makes it easy to use BGMSETD, but since it uses string AND number data, it's hard to read it all using READ.
You can't just do something like
IF DATA$==0 THEN BREAK
However, if you use READ on an undefined variable, its type will change to whatever type of data there is.
DEF LREAD SONG$ OUT ENDED%,TEMP_
READ TEMP_ 'TEMP_ is undefined now, so you can READ any type of DATA
IF (TEMP_||0)==3 THEN 'check if TEMP_ is a string
ELSE 'if TEMP_ isn't a string, there's no more MML DATA
LREAD SONG$ OUT ENDED%,
You can now do something like: