does anyone here know anything about ada 95 programming? this language pretty much blows compared to c, but i gotta take it for college. i need help passing an array as a parameter for a procedure. here is part of my code:
procedure get_array (x: out na; i: out integer; fv: out ada.text_io.file_type) is --42
begin --get_array
for j in 1..i loop
x(j) := 0;
end loop;
i := 1;
ada.text_io.open(file => fv, mode => ada.text_io.in_file, name => "nums.txt");
while not ada.text_io.end_of_file(file => fv) loop
ada.integer_text_io.get(file => fv, item => x(i));
i := i + 1;
end loop;
end get_array;
-------------------------------------------
type na is array (1..100) of integer;
x: na; --array to hold numbers from file
fv: ada.text_io.file_type; --file variable
choice: integer; --choice for menu
i: integer; --array index
begin --arrays11
loop
menu(choice);
if choice = 1 then
get_array(x, i, fv); --procedure to define array
end if;
exit when choice = 5;
end loop;
end arrays11;
theres some basic code before that for a menu and stuff. everytime it compiles it says na is undefined in parameter. i have the code identical to that of the example in the book and an example my professor gave us. can someone please help.
Check out my video game music blog:
http://games-and-guitars.synergize.co/
PROUD MEMBER OF THE PLAYSTATION 3 : RPG FAN CLUB
He who hesitates is lost








