Newbie question ..... silly?

What is the purpose or history behind the use of the word 'void' before some statements in programming?

fdastoor: What is the purpose or history behind the use of the word 'void' before some statements in programming?

void before a function for the result of a function that returns normally, but does not provide a result value to its caller.

fdastoor: What is the purpose or history behind the use of the word 'void' before some statements in programming?

'void' has the meaning of 'nothing'.

I think the expression 'void' for 'nothing' goes back in time to the early fifth century BC and the Greek philosopher Leucippus. At that time the natural philosophy of atomism was developed.

Some time later in the 20th century AD the developers of the C language found it useful to use that expression as a keyword in the programming language, used for functions that return "no return value" to the caller of the function.

thank you

In terms of computer languages- in the very early days there where two things, the function and the procedure. Take a look at Algol60 (the very first of the block structured languages.

The function comes from pure maths (let there be a function f() such that ....) its a thing that lets you get a result think sin(x) or log(y), in maths its a kind of shorthand.

There was also the procedure this works just like a function but does not return a result.

I'm not sure if C was the first language to drop the use of procedures and substitute the void function - a function that does not return a result.

Mark