[Tutor] Useing Functions

Jeff Shannon jeff at ccvcorp.com
Fri Aug 20 20:40:30 CEST 2004

Chad Crabtree wrote:

> Use Functions.  Very Very Important, it's the product of millions of 
> years of evolution.  So yes use functions.

At work, I do a lot of programming in a very old dialect of Basic that 
doesn't *have* proper functions, or any concept of variable scope. 
(You can create "external subroutines", a separate program file that 
acts as a function, and which can only return values through the use 
of its (by-reference) parameters, but that's fairly awkward.)

After years of working in an environment where a longish program is 
loaded with gotos, gosubs, and page after page of deeply nested 
if/then/else statements...  Trust me, you *want* to use functions as 
much as practical.  Oh, how I wish I could use functions here!  (Let's 
be honest, I wish I could use Python instead of Basic, but somehow I 
don't expect a port of Python to the Pick database virtual OS anytime 
soon... :P )

Anyhow, yes.  Functions good.  OO and classes even better.  Use them 
and appreciate them, for life without them is ugly and scary.

Jeff Shannon
Credit International

More information about the Tutor mailing list