Tuesday, March 1, 2011

How to declare and initialize static arrays

//
// use "const" instead of "var"
// because we're creating a static array
//
const
  sArray : array [1..3] of string =
  (

    //
    // now simply insert 3 strings
    // according to the size of the
    // array as defined above
    //

    'item #1',

    'item #2',

    'item #3'
  );
Listing #1 : Delphi code. Download statarys (0.31 KB).

0 comments:

Post a Comment

Twitter Delicious Facebook Digg Stumbleupon Favorites More

 
Design by Kang Iwan K-sev | Thank's for your visit To My Site - Ridwan Mulyana | Cibeureum