Strip block comments: Difference between revisions

Content added Content deleted
m (→‎{{header|ALGOL W}}: Added note)
m (→‎{{header|ALGOL W}}: corrected comments)
Line 161: Line 161:
% strips block comments from a source %
% strips block comments from a source %
% the source is read from standard input and the result written to %
% the source is read from standard input and the result written to %
% stabndard outpout, The comment start text is in cStart and the ending %
% standard output, The comment start text is in cStart and the ending %
% is in cEnd. %
% is in cEnd. %
% As strings are fixed length in Algol W, the first space in cStart/cEnd %
% As strings are fixed length in Algol W, the first space in cStart/cEnd %
% is assumed to terminate the delimiter, i.e. the comment start/end %
% is assumed to terminate the delimiter, i.e. the comment start/end %
% delimiters cannot contain spaces. %
% delimiters cannot contain spaces. %
% If non-blcnk, quote1 and quote2 are the string quote characters. %
% If non-blank, quote1 and quote2 are the string quote characters. %
% If escape is non-blank it indicates that quotes can be embedded in %
% If escape is non-blank it indicates that quotes can be embedded in %
% string literals by preceeding them with escape (as in C, java, etc.). %
% string literals by preceding them with escape (as in C, java, etc.). %
procedure stripBlockComments( string(32) value cStart, cEnd
procedure stripBlockComments( string(32) value cStart, cEnd
; string(1) value quote1, quote2, escape
; string(1) value quote1, quote2, escape