Sunday, January 01, 2006

Functions

Well, I'm back from the holidays. Hope yours were fun. This week: shell functions.

Macros, subroutines, procedures, functions ..., a programming language needs some way a way to encapsulate repeated actions.

The shell calls 'em functions. An academic might say a function should return a value, while a subroutine works through its side-effects. Unfortunately, shell functions mostly work through their side effects. Oh well.

They're still very useful little things, and you can use them a lot, to good effect.

0 Comments:

Post a Comment

<< Home