18 lines
320 B
Plaintext
18 lines
320 B
Plaintext
Procedure.s Strip_comments(Str$)
|
|
Protected result$=Str$, l, l1, l2
|
|
l1 =FindString(Str$,"#",1)
|
|
l2 =FindString(Str$,";",1)
|
|
;
|
|
; See if any comment sign was found, prioritizing '#'
|
|
If l1
|
|
l=l1
|
|
ElseIf l2
|
|
l=l2
|
|
EndIf
|
|
l-1
|
|
If l>0
|
|
result$=Left(Str$,l)
|
|
EndIf
|
|
ProcedureReturn result$
|
|
EndProcedure
|