IMHO that's not bad programming practice. If ask() is supposed to always or never ask the user, then it makes sense to have ask() deal with whether it should do so or not. If you want some sort of mixture, i.e. ask some things all the time regardless, then it's probably not the best approach.
The potential of good/bad practice would have more to do with using a global vs passing it in all the time. Again, if it's *always* passed in, then it makes some sense to make it global (or a field in the calling object if you're using OOP). At the same time, it's good practice to avoid globals whenever possible since they lead to unforeseen interactions, spaghetti code, and the like. How important avoiding them is depends on the project in question: smaller projects (which are not anticipated to grow substantially) are more forgiving about allowing them. Of course depending on the project, you could just ask inline rather than hiding code in a subroutine. Granted that you're not calling ask() more than once, natch. -- Live well, ~wren __________________________________________ Yahoo! DSL Something to write home about. Just $16.99/mo. or less. dsl.yahoo.com