Right. In addition to the pragma, you'd also need to tell Ada what display's parameters were, so the complete form would probably look something like this:

  procedure display(Value : Integer);
  pragma Import(C, display);

I say "something like this" because we haven't talked about how to send data types between languages. Let's do that now for C, a very common language; handling data types for other languages is handled similarly.

You may go to the next section.

You may also:

PREVIOUS Go back to the question

OUTLINE  Go up to the outline of lesson 16

David A. Wheeler (dwheeler@dwheeler.com)

The master copy of this file is at "http://www.adahome.com/Tutorials/Lovelace/s16s1r1.htm".