Function prototype: Difference between revisions

m
Incorrect description: changed from 'no arguments' to 'two arguments'
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.
/// Declare a function with no arguments that returns an integer.
int noArgs();
 
/// Declare a function with notwo arguments that returns an integer.
int twoArgs(int a, int b);
 
57

edits