Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Arrays with a defined number of elements

Status
Not open for further replies.

77walker

Technical User
Feb 7, 2008
33
US
I am using Crystal XI and I want to know how to define an array with specified number of elements. I only need to have five elements at any one time in the array so that I can do comparisons on those elements. Can someone help me please?
 
Try,

[tt]Stringvar Array myarray;
redim myarray[5];// resizes myarray to an array of 2 elements
myarray[1]:= "Hello ";
myarray[2]:="World! ";
myarray[1]&myarray[2];[/tt]

Output
Hello World!
 
Sorry, in the second line of the code in my post above, I meant to type 2.
It should be
redim myarray[2};
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top