Breaking down a programme.

Im relativley new to al this.
What is the best way to segment a library please.
Im familiar with using functions but wondering when i should put them into libraries.
I have kelly and pohl book on c, but it has little in the way of library examples

I have noticed that when a function calls another function , the calling function has to be located after the called one for the compiler to find the reference.
Is there a way around this please, - public declaration ?

The usual way is to put the function prototypes in a header file.

I have noticed that when a function calls another function , the calling function has to be located after the called one for the compiler to find the reference.

Not if you use the Arduino IDE, because it creates the function prototypes behind the scenes and puts them near the start of the program for you.

I think you need prototypes in libraries though... And also if you break a sketch up
into lots of .h files those .h files you might need them.