Watch, Follow, &
Connect with Us
Public Report
Report From: Delphi-BCB/RTL/Delphi/Format + Float    [ Add a report in this area ]  
Report #:  63454   Status: Closed
Format('%*s', [-10, 'hallo'] does not work
Project:  Delphi Build #:  11.0.2804.9245
Version:    11.2 Submitted By:   Thomas Mueller
Report Type:  Basic functionality failure Date Reported:  6/18/2008 8:38:22 AM
Severity:    Commonly encountered problem Last Updated: 3/20/2012 2:24:39 AM
Platform:    All platforms Internal Tracking #:   261138
Resolution: Fixed (Resolution Comments) Resolved in Build: : 15.0.3577.25497
Duplicate of:  None
Voting and Rating
Overall Rating: No Ratings Yet
0.00 out of 5
Total Votes: None
Description
Format uses negative width specifier to left align a string within that width:

Format('%-10s', ['hallo']) -> 'hallo     '
Format('%10s', ['hallo']) -> '     hallo'

This works fine, but using the * placeholder for the width, as described in the online help, results in an access violation:

Format('%*s', [10, 'hallo']) -> '     hallo'
Format('%*s', [-10, 'hallo']) -> crashes

Steps to Reproduce:
see description
Workarounds
None
Attachment
None
Comments

None

Server Response from: ETNACODE01