Function prototype: Difference between revisions
Content added Content deleted
m (→{{header|jq}}: Corrected syntax highlighting.) |
m (Incorrect description: changed from 'no arguments' to 'two arguments') |
||
Line 347:
=={{header|D}}==
Beside function prototypes similar to the ones available in C (plus templates, D-style varargs), you can define class method prototypes in abstract classes and interfaces. The exact rules for this are best explained by the [//http://dlang.org/interface.html documentation]
<syntaxhighlight lang="d">
/// Declare a function with no arguments that returns an integer.
int noArgs();
/// Declare a function with
int twoArgs(int a, int b);
|