J. David Bryan wrote:
On Thursday, August 5, 2010 at 9:51, Frank Heckenbach wrote:
The section is a bit brief.
A more complete discussion of Ada for programmers experienced with other languages is here:
http://www.adaic.org/docs/distilled/adadistilled.pdf
This may prove helpful in understanding features, although again it is based on the older 1995 Ada revision.
The current (2005) Ada Language Reference Manual is available here:
http://www.adaic.com/standards/ada05.html
...although the LRM is a precise description of the language and is less accessible than a tutorial (though it is far more readable than ISO 10206!).
Thanks.
Can it also be used, say, to convert any data type to an "array of char" (in C/Pascal notation) and back, to do "untyped memory block" operations?
There are no untyped values in Ada :-), but it can convert to an equivalent array of bytes or words, for example. Basically, Unchecked_Conversion can convert idempotently between any two objects of the same size, and will convert with implementation-defined results between objects of differing sizes.
That's what I meant (therefore the quotes around "untyped" -- strictly speaking, also in C and BP there are no untyped objects, just e.g. arrays of char which are often treated as untyped blocks of memory; though C has "void", there are no objects of type void, it's used to indicate "functions that don't return anything", i.e. what we call procedures; untyped pointers "void *" ("Pointer" in BP) are type-cast to some other pointer type for operating on their targets).
OK, though I'm still no Ada expert, I'd guess that Ada would also be a suitable target language, so if we'd choose to go for a converter, the choice of target language might now depend on who's most familiar with it or prefers it personally. So far it seems to be only one for Ada (you) and only one for C++ (me).
Frank