if you want to learn Ada, I recommend starting out with the interactive Ada Tutor as there are no easy Ada books out http://www.adatutor.com/
Name:
Anonymous2010-10-05 20:03
>>3
I'm learning it atm. I was in 2 short lectures that covered the basics and I've read loads of tutorials. The problem is that none of them seems to cover the case I described in the OP.
Thanks tho.
Name:
Anonymous2010-10-05 20:07
>>4
actually, I'm pretty sure that I just haven't learned enough to actually get the more advanced tutorials.
I still hope that somebody can just tell me how to write that one command.
Name:
Anonymous2010-10-05 20:17
bump, still searching.
Name:
Anonymous2010-10-05 20:21
I think a record in Ada is a dictionary, meaning a variable assigned to a keyword...so I dont think dot notation will work for adding to a record
Name:
Anonymous2010-10-05 20:25
i actually tried that one because my tutorials didnt show the exact example.
type car is record
price : natural := 500;
end record;
loadsofcars : array(1..10) of car;
begin
put (loadsofcars(1).price);
end ....;
puts 500.
actually, let me paste my example. fuck it, it's 2:30 am and i'm entering full on nerd mode
WITH Ada.Text_IO, Ada.Integer_Text_IO, Ada.Strings, Ada.Strings.Unbounded, Ada.Strings.Unbounded.Text_IO;
USE Ada.Text_IO, Ada.Integer_Text_IO, Ada.Strings, Ada.Strings.Unbounded, Ada.Strings.Unbounded.Text_IO;
PROCEDURE Test IS
TYPE arecord IS RECORD
astring : Unbounded_String := To_Unbounded_String ("blatext");
apos : Positive := (500);
abool : Boolean := False;
END RECORD;
anarray : array (1..10) of arecord;
BEGIN
put (anarray(1).astring);
END Test;
Name:
Anonymous2010-10-05 20:27
oh wait, you said adding to.
what's the proper syntax then?
Name:
Anonymous2010-10-05 20:47
last bump before bed
anybody? this should be easy...