New to code.

if someone could show me an example code. Are the functions set up like this --
void pingread()
{
ping read code here;
}

then call it with

pingread(xx,stuff);