You chances of stuffing up a program that INCLUDEs logic by a small change to that logic are much higher than if you CALL it as an external routine. Immediately you eliminate the risk of someone introducing a new local variable into either your main line or the INLCUDE and finding that it collides with something else which was also supposed to be local.
Did I mention that I always make sure that ALL the local variables in an included file have a unique prefix so that no two include files can have the same variables (except when passing data between them).
eg:
CROSS.SMTP.ENGINE: * ALL local variables start with SMTP
CROSS.PDF.ENGINE: * All local variables start with PDF
So another program such as CROSS.EMAILPDF can include both and be sure that the two won't clash.
Who said U2 BASIC couldn't have local and global scope!
Craig ------- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/