Hello,
I was writing some code that reads a record and selects speific files from that record. Now, I have a function set up to select certain records and then a function within that function that checks if record should be printed and prints it. Is this poor modularization practice? Should I just do the check and print inside the first function? Better visualization:

select_certain_record()
if record is desirable, sets bool variable print_record = true

print_certain_record(print_record)
if print_record = true, prints details of file

Is that unnecessary? Can one function do it all, or does that go against the whole point of modularization?
Also...Is it a wise idea to send a control variable from one function to another...seeing as how this makes the logic of the receiving function able to be manipulated by another function?
Thanks for any help.