Watch, Follow, &
Connect with Us

Please visit our new home
community.embarcadero.com.

Public Report
Report From: Delphi Prism/Compiler    [ Add a report in this area ]  
Report #:  93718   Status: Open
Decimal array initialization constants not converted
Project:  Embarcadero Prism Build #:  4.0.25.721
Version:    1.1 Submitted By:   Mark Tiede
Report Type:  Suggestion / Enhancement Request Date Reported:  5/9/2011 12:38:33 PM
Severity:    Infrequently encountered problem Last Updated: 3/20/2012 2:24:39 AM
Platform:    All versions Internal Tracking #:   283193
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: 1
Description
Constants to initialize Decimal arrays have to be manually cast.
Steps to Reproduce:
DecimalConstantArray = public class
  public
    property MyPredictedIncomeGrin : Array of decimal := [0.000, 0.500, 2.500, 2000, 50000, 325000, 1250000];
  end;

Won't compile and gives error.

See: https://forums.embarcadero.com/thread.jspa?threadID=53825&tstart=0
Workarounds
One can manually cast the constants.
Attachment
None
Comments

Hugo Logmans at 5/11/2011 12:41:24 AM -
VB uses the suffix 'M' to identify Decimal constants.

Server Response from: ETNACODE01