Ada Programming/Pragmas/Inline

From Wikibooks, open books for an open world
Jump to: navigation, search

Ada Lovelace 1838.jpg

Contents


[edit] Summary

The pragma Inline specifies that a subprogram should be expanded inline when called in code.

[edit] Example

function My_Function return Integer is begin
  return 1+2; -- A simple function suitable for inlining
end My_Function;
pragma inline(My_Function);
...
Some_Variable := My_Function; -- Will be expanded by compiler.

[edit] See also

[edit] Wikibook

Personal tools
Namespaces
Variants
Actions
Navigation
Community
Toolbox
Sister projects
Print/export