문제

I'm writing a worksheet, and want to ask students to write a function that looks like this:

isPrime(int number)

What's that line called - manifest comes to mind, but I don't think that's it...

도움이 되었습니까?

해결책

Could be called header, declaration or signature.

The first one would go well with "function declaration", "function header", "function body".

다른 팁

function prototype,declaration or signature

If you write

bool isPrime(int);

you call this declaration whereas

bool isPrime(int number) { /* code */ }

is the actual definition. (C allows a explicit distinction here)

Generally, your expression is called the (type) signature of a function.

Signature == name, number of parameters, type of parameters, but NOT the return type, whereas declaration == signature + return type

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top