Watch, Follow, &
Connect with Us
Public Report
Report From: Delphi-BCB/IDE/Structure Pane/Error Insight    [ Add a report in this area ]  
Report #:  59048   Status: Open
Strings with ^<char> mix gives incorrect Errors in Structures
Project:  Delphi Build #:  11.0.2902.10471
Version:    11.2 Submitted By:   Lars Fosdal
Report Type:  Basic functionality failure Date Reported:  3/4/2008 8:22:21 AM
Severity:    Infrequently encountered problem Last Updated: 3/20/2012 2:24:39 AM
Platform:    All platforms Internal Tracking #:   258287
Resolution: None (Resolution Comments) Resolved in Build: : None
Duplicate of:  None
Voting and Rating
Overall Rating: No Ratings Yet
0.00 out of 5
Total Votes: None
Description
If you have strings that include characters in the escaped format ^<char> - > ^G = BELL,  ^I = Tab, ^M = CR, etc., the structures pain will incorrectly show an error message "Expected ; but receoved a string literal ... at line ...."

All these constructs are valid and will compile without hints, warnings or errors (apart from value not used etc on variable level)

See Example code in "Steps".
Steps to Reproduce:
procedure Test;
const
  Fails = 'Test'+^I'test';
  IsOK =  'Test'+^I+'test';
  IsOK2 = 'Test'^I'test';
var
  Error, Error2, Ok, Ok2 : string;
begin
  Error  := IsOK+' '+^I'looted '^I + IsOK2;
  Ok     := IsOK+' '^I'looted '^I + IsOK2;

  Error2 := IsOK + ^I'Text'^I'has'^I'Tabs';
  Ok2    := IsOK + ^I +'Text'^I'has'^I'Tabs';
end;

Workarounds
None
Attachment
None
Comments

Uwe Schuster at 3/5/2008 3:15:32 PM -
This is repeatable.

Sysop note: I've lowered the severity of this report (from 2 to 3).

Server Response from: ETNACODE01