library help

Just wondering about libraries. I have a program that is starting to get a little long, and i am getting lost in it. So I was wondering are libraries in any way similar to function calls in PLC programming. For those not familiar you have a main call, and then if a certain input is reached it can trigger another function, if not then it is ignored. pretty much the same as if() statements. except they are each kept in their own file. If Libraries are done this way, are there any good tutorials out there in how to set one up?


nevermind, i found this

it answered all my questions.