4b.sno (790B)
1 &TRIM = 1 2 COUNT = 0 3 DIGITS = '0123456789' 4 INPUT('IN', 1, , 'input') :S(START) 5 OUTPUT = "Couldn't open input" :(FINISH) 6 START LINE = IN :F(FINISH) 7 LINE SPAN(DIGITS) . S1START '-' SPAN(DIGITS) . S1END ',' SPAN(DIGITS) . S2START '-' SPAN(DIGITS) . S2END :F(START) 8 EQ(S1START, S2START) :S(COUNT) 9 LT(S1START, S2START) :S(S1ENDINS2) 10 GE(S2END, S1START) :S(COUNT) F(START) 11 S1ENDINS2 GE(S1END, S2START) :F(START) 12 COUNT COUNT = COUNT + 1 :(START) 13 FINISH OUTPUT = COUNT 14 END