Before I get ahead of myself and post this as a bug, I thought I would ask here first.
Consider line 8 in the code fragment below: The code uses
+=, whereas the commented assignment on line nine uses
:=When I run the code as is (with
+=) and the boolean variable,
EmptyStr on line seven is true, the debugger exits the method as if the code on lines eight and ten does not exist. But when I comment that line and uncomment line nine, then the code functions properly.
Am I simply misusing
+=? I mean
CurrentString is a variable passed to method where this code is implemented and
MIF_EmtyCharStyleMarker is a constant declared in another unit.
Case WordHTMLTag of
wht_Italics : CurrentString += MIF_ItalicMarker;
wht_Bold : CurrentString += MIF_BoldMarker ;
wht_span : If IsOpeningTag
then begin
EmptyStr := HtmlClass = '';
If EmptyStr then
CurrentString += MIF_EmptyCharStyleMarker
// CurrentString := CurrentString + MIF_EmptyCharStyleMarker
else MIF_AddStartCharaTag(HTMLClass)
end
else If MIF_HasIllegalMarker(CurrentString)
then CurrentString += MIF_EmptyCharStyleMarker
else MIF_AddEndCharaTag;
else Assert(False, 'we should not bere here!');
end;