To avoid this very situation, I give my loop variables very generic name (like 
XX1) and then verify that XX1 is either not used or at least will not get 
caught in a conflicting condition.  Using XX1 also suggests that it is not a 
meaningful name ("CUST.NAME" suggests it is the customer name) and makes it 
easy to find.  Using a looping variable of "X" is not great because if you 
search for it, you will find it in "NEXT", "XREF", etc.  XX1, XX2, XX3, etc. 
are unlikely to be names of anything else.  Of course, if you try hard enough, 
you can always break this, but it has served me well for many years.

John








John Israel
Senior ERP Developer

Dayton Superior Corporation
1125 Byers Rd  Miamisburg, OH 45342
Office: 937-866-0711 x44380
Fax: 937-865-9182

johnisr...@daytonsuperior.com

This message w/attachments (message) is intended solely for the use of the 
intended recipient(s) and may contain information that is privileged, 
confidential or proprietary. If you are not an intended recipient, please 
notify the sender, and then please delete and destroy all copies and 
attachments, and be advised that any review or dissemination of, or the taking 
of any action in reliance on, the information contained in or attached to this 
message is prohibited.




-----Original Message-----
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Dave Davis
Sent: Thursday, January 26, 2012 1:36 PM
To: U2 Users List
Subject: Re: [U2] Passing by Value

Perhaps you should consider making that one an external subroutine - it sounds 
like it could be used in more than one place.   External subroutines would give 
you the scope control you want.

-----Original Message-----
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson
Sent: Thursday, January 26, 2012 1:26 PM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] Passing by Value


And if your internal subroutine is called
RECONCILE.CUSTOMERS.BUDGET.BALANCE

??








-----Original Message-----
From: Dave Davis <dda...@harriscomputer.com>
To: U2 Users List <u2-users@listserver.u2ug.org>
Sent: Thu, Jan 26, 2012 10:17 am
Subject: Re: [U2] Passing by Value


By way of naming convention:
FOR PROCESS_I = 1 TO 20
-----Original Message-----
rom: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org]
n Behalf Of Wjhonson
ent: Thursday, January 26, 2012 1:09 PM
o: u2-users@listserver.u2ug.org
ubject: Re: [U2] Passing by Value

n a related note, any clever ideas to localize a variable to a local
ubroutine?
For I = 1 to 10
  GOSUB PROCESS
ext I
top
3000 Lines of code later....
PROCESS:
OR I = 1 TO 20
RINT I
EXT I
ETURN
______________________________________________
2-Users mailing list
2-us...@listserver.u2ug.org
ttp://listserver.u2ug.org/mailman/listinfo/u2-users
_______________________________

ave Davis
eam Lead, R&D
P: 614-875-4910 x108
: 614-875-4088
: dda...@harriscomputer.com
       [http://www.harriscomputer.com/images/signatures/HarrisSchools.gif]
[http://www.harriscomputer.com/images/signatures/DivisionofHarris.gif]<http://www.harriscomputer.com/>
       6110 Enterprise Parkway
rove City, OH
3123
ww.harris-schoolsolutions.com<http://www.harris-schoolsolutions.com>
This message is intended exclusively for the individual or entity to which it is
ddressed. This communication may contain information that is proprietary,
rivileged or confidential or otherwise legally exempt from disclosure. If you
re not the named addressee, you are not authorized to read, print, retain, copy
r disseminate this message or any part of it. If you have received this message
n error, please notify the sender immediately by e-mail and delete all copies
f the message.
_______________________________________________
2-Users mailing list
2-us...@listserver.u2ug.org
ttp://listserver.u2ug.org/mailman/listinfo/u2-users

_______________________________________________
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users
________________________________


Dave Davis
Team Lead, R&D

P: 614-875-4910 x108
F: 614-875-4088
E: dda...@harriscomputer.com
        [http://www.harriscomputer.com/images/signatures/HarrisSchools.gif]

[http://www.harriscomputer.com/images/signatures/DivisionofHarris.gif]<http://www.harriscomputer.com/>
        6110 Enterprise Parkway
Grove City, OH
43123
www.harris-schoolsolutions.com<http://www.harris-schoolsolutions.com>

This message is intended exclusively for the individual or entity to which it 
is addressed. This communication may contain information that is proprietary, 
privileged or confidential or otherwise legally exempt from disclosure. If you 
are not the named addressee, you are not authorized to read, print, retain, 
copy or disseminate this message or any part of it. If you have received this 
message in error, please notify the sender immediately by e-mail and delete all 
copies of the message.

_______________________________________________
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users

_______________________________________________
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users

Reply via email to