>-----Original Message----- >From: [EMAIL PROTECTED] >[mailto:[EMAIL PROTECTED] Behalf Of Anthony >Dzikiewicz >Sent: Friday, June 24, 2005 9:40 AM >To: u2-users@listserver.u2ug.org >Subject: RE: [U2] Custom Functions > > >Something I did in some subroutines which makes them more of a multi >tasker (I-descriptors) and flexible, is to pass file variables as >parameters - when you can. So, the subroutine would look something >like; > ><snip> >SUBROUTINE GET.NEXT.IJKEY(FILE.CN, ERR, F.STAT, IJKEY) > >$INCLUDE HEADERS STD.EQUATES >$INCLUDE HEADERS ERRCODES.EQUATES >$INCLUDE HEADERS IM.CTRL.EQUATES >$INCLUDE SYSCOM FILEINFO.INS.IBAS >* >* THE FILE(S) MAY OR MAY NOT BE OPENED >* >* > OPENED.CN = FALSE > NEED.TO.OPEN = FILEINFO(FILE.CN,0) > IF NEED.TO.OPEN = 0 THEN > OPEN '','CN' TO FILE.CN ELSE > ERR = ERR$CODE.OPENERR > F.STAT = STATUS() > GO STOP.RUN > END > OPENED.CN = TRUE > END > </snip> > >We are using Universe. You never know what need you might have in the >future and this can make things much easier. Actually, I thought 2 >dynamic array params (passed and returned) and a headers file as >pointers is probably more ideal. Then you can do any of this sort of >thing on the fly and you wouldn't have too much code to
If you pass 3 dimensioned arrays would be ideal. 1 array for incoming variables (you can store an entire dynamic array inside one cell of a dimensioned array), 1 array for outgoing varibles, and 1 array for file headers since you store multiple fileheaders in a dimensioned array, but not in a dynamic array. George >change/recompile >when needs arise. > >Anthony ------- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/