15 lines
530 B
Plaintext
15 lines
530 B
Plaintext
100 DECLARE EXTERNAL FUNCTION FNstripcomment$
|
|
110 LET marker$="#;"
|
|
120 PRINT """";FNstripcomment$("apples, pears # and bananas", marker$);""""
|
|
130 PRINT """";FNstripcomment$("apples, pears ; and bananas", marker$);""""
|
|
140 PRINT """";FNstripcomment$(" apples, pears ", marker$);""""
|
|
150 END
|
|
160 !
|
|
170 EXTERNAL FUNCTION FNstripcomment$(text$, delim$)
|
|
180 FOR I=1 TO LEN(delim$)
|
|
190 LET D = POS(text$, delim$(I:I))
|
|
200 IF D>0 THEN LET text$ = text$(1:D-1)
|
|
210 NEXT I
|
|
220 LET FNstripcomment$=RTRIM$(text$)
|
|
230 END FUNCTION
|