answersLogoWhite

0


Best Answer

type

array-identifier = array[index-type] of element-type;

array-identifier : the name of your array

index-type : any scaler except real

element-type : the type of element

The index type defines the range of indices and thus the number of elements to allocate. For example, [0..41] will allocate 42 elements indexed from 0 to 41, thus creating a zero-based array. If you require a one-based array, use [1..42] instead. Regardless of the range of indices, the first element is always at the lowest address of the array (the compiler will convert your index range into a zero-based range automatically). The element-type determines the length of each element in the array. Multiplying the element length by the number of elements gives the total amount of memory allocated to the array.

User Avatar

Wiki User

8y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you declare an array on Pascal?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How do you declare an array in easytrieve?

your wish


What is the difference between array and string of array?

When we declare an array of characters it has to be terminated by the NULL , but termination by NULL in case of string is automatic.


Declare an array of 100 integers?

int array_name [100];


How do you declare an array of buttons in Java?

To declare an array of buttons in Java, you would use the following syntax: Button[] buttonArray = new Button[n]; where n is the number of buttons you want in the array. This creates an array of n buttons, where each element can hold a reference to a Button object.


How do you declare an array alpha of 10 rows and 20 columns of type int?

int array[2][10][20];


How do you declare an array of five pointers to chars?

char *p="ragav"


Is it possible to declare an array of numbers in an integer form?

Yes: int[] integerArray;


How do you declare a string array and add elements to it in C plus plus?

You cannot add elements to a fixed array in C or C++. If, however, the array is declared as a pointer to an array, you can add elements by allocating a new array, copying/adding elements as needed, reassigning the new array to the pointer, and deallocating the original array.


You can use a variable to declare an array's size true or false?

True and false in the same time, because even so you can declare array size using notation for variables you have use constwhich makes your variable basically a constant:const int arraySize = 10;In Java, you can use any expression to define the array size, when you create the array. Once you create an Array object, however, you can't redimension it - but you can create a new Array object and destroy the old one.


Define the declare statement for multi-dimension array?

<storage_class> <type> <identifer> '[ '<number1> ']' '[ '<number2> ']' ... ';'


Can Array List in java hold different data types?

No, we cant hold different data types in an Array. But using Array List we can hold any data type as a Object. But you need iterate that values as a Object and again you need to convert those values into the different data types accordingly.


What is the advantage to declare an array?

It is more convenient than other possible ways of achieving the same results.