On 13/04/12 15:56, David A. Green wrote: > That's why you would specify. > > Example: > > COMMON /SYSSTUFF/ SYSSTUFF(100) > > COMMON /MYSTUFF/ MYSTUFF.REC(100) -CLEAR.ON.LOGTO > > Then only the MYSTUFF gets cleared. This is the kind of logic that I have > to end up writing over and over again to make sure new files get opened when > a person does LOGTO to a different account. > > Programmers would make all their Account specific data into a single named > common that has the flag to initialize on LOGTO. And keep other > cross-account data in common that isn't flagged. > > Easy.
Actually, that IS easy. TODAY. Let's say you want to store a filepointer to VOC in common, you create the following INCLUDE file... COMMON /VOC/ F.VOC, D.VOC, VOC.OPEN IF VOC.OPEN NE @WHO THEN VOC.OPEN = @WHO OPEN "", "VOC" TO F.VOC ... OPEN "DICT", "VOC" TO D.VOC ... END I hope I've got the right @variable, but as soon as you LOGTO, the IF goes false, and next to you try access it, it will re-initialise itself. Cheers, Wol (Moderator moan - I've just snipped an AWFUL lot of text ...) _______________________________________________ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users