up↑ |
This page contains a list of specific Ada language features, techniques, tricks, coding idioms, etc. that came up in questions asked by students. They are in reverse chronological order (newest first).
Q: How do I initialize a long String or other array variable?
A: Use an array aggregate expression, with others, e.g.
S : String (1 .. 1000) := (others => ' ');
Q: Why won't the compiler let me use "Get (C)" on the right side of an assignment statement?
A: Get is a procedure, not a function. Procedures do not return values, and so procedure calls cannot be used in expressions. The analog in the C language family is a "void" function.
T. P. Baker ($Id: adahints.html,v 1.1 2005/10/19 18:28:02 baker Exp baker $) |