Source Code - dpp/source/arraytest.dpp
Download link (right click, save as)
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
|
function main()
{
title "Array Test";
newvar num;
screenput "Enter number of elements: ";
screenin num; num--;
newvar i,myarray[num],elements;
for i = 0 to num;
myarray[i] = "I am element " & i & "!";
next i;
screen;
screenput "Here are your elements:" & dpp.crlf;
for i = 0 to num;
screenput myarray[i] & dpp.crlf;
next i;
}
|
This code is Copyright (C) 2000-2012 PageMac Programming. Reproduction of this code must adhere to the GNU General Public License.