where is my error with array?

Posted on 2006-05-18
Last Modified: 2010-04-05
   Mes : array of string = ['janeiro','fevereiro','março','abril','maio'];

Question by:hidrau
    1 Comment
    LVL 26

    Accepted Solution

    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:

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


    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
    Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.
    Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now