• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 176
  • Last Modified:

where is my error with array?

Const
   Mes : array of string = ['janeiro','fevereiro','março','abril','maio'];

0
hidrau
Asked:
hidrau
1 Solution
 
Russell LibbySoftware Engineer, Advisory Commented:
You are trying to use a dyanamic array as a constant.

-- delphi help --
To declare an array constant, enclose the values of the array’s elements, separated by commas, in parentheses at the end of the declaration. These values must be represented by constant expressions. For example,

const Digits: array[0..9] of Char = ('0', '1', '2', '3', '4', '5', '6', '7', '8', '9');


So for your example, it should be:

const
  Mes:    Array [0..4] of String = ('janeiro', 'fevereiro', 'março', 'abril', 'maio');


Regards,
Russell
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now