sub-routines HELP

hello all, i am trying to make a sub-routine i am not sure how to do this. i want to have one loop main, and only call functions. i would like to be able to re-name the functions.

For example

main loop
{
call function 1
call function 2
return
}
if anyone could help me with this that would be great.

What you need is a C++ tutorial.

setup() and loop() are already subroutines (called functions in C/C++), so even if you don't know it you have written functions already.

You can call functions just abot anything you want and the code will look something like this:

int function1()
{
}

int function 2()
{
}

void loop()
{
  function1();
  function2();
}

I am sure you get the idea. You should also look at at C/C++ tutorial as already suggested.