Re: [U2] Passing by Value

2012-01-27 Thread Symeon Breen
No - I thought we were talking about creating a **NEW** counter variable in
a large old program, call it xx1  do a search on xx1  no lines, then use it.


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


Mecki you're not paying attention.
You have an 8000 line program that uses a variable A
You didn't write it.  You need to find where that variable is assigned.
You search for A ?

That's not going to work.



-Original Message-
From: Mecki Foerthmann mec...@gmx.net
To: u2-users u2-users@listserver.u2ug.org
Sent: Thu, Jan 26, 2012 12:55 pm
Subject: Re: [U2] Passing by Value


No, you are completely wrong if you think that is only your world.
ho in our game has the luxury working only with their own code?
 have been doing what you describe for over 25 years now and probably ost of
the contributors here do the same thing for a living too and not ust since
yesterday.
nd I may have made that silly mistake once or twice as a junior but ince
then it has become second nature.
nd in those days we didn't have the luxury of 8000 line programs ecause the
limit for any item was 32K and you were forced to use very hort variable
names and couldn't even indent your code because spaces re characters too.
n one shop I worked we used X, Y, Z etc. in 'primary' code and in nternal
subroutines XX, YY, ZZ and so on for loop counters.
 personally prefer more meaningful names but can't do that always ecause I
try to follow the naming conventions of the code I'm working on.
Even the editor you use is irrelevant since I haven't seen one yet that
oesn't have a search function.
ust go to the top of the program and search for the variable name you ntend
to use.
f your search comes up negative you're safe to use it.
imple!
And OTOH how can you make 'rapid changes' to code if you don't nderstand
what it is supposed to do and where the varibles come from?
On 26/01/2012 20:16, Wjhonson wrote:
 Completely wrong :)
 You apparently have the luxury of only working on programs written by
ourself.

 In my world, we are called upon to make rapid changes in programs written
by wenty programmers over twenty years.
 You haven't specified *how* you ensure that your counters are unique, and
by he way, the issue is not just counters, but any variable.



 -Original Message-
 From: Mecki Foerthmannmec...@gmx.net
 To: u2-usersu2-users@listserver.u2ug.org
 Sent: Thu, Jan 26, 2012 12:13 pm
 Subject: Re: [U2] Passing by Value


 What has the length of the program to do with it?
   always abide to the rule that a for next counter in any internal
ubroutine has to be unique.
 hat way even if the sub is called from within a for next loop the  ounters
never conflict.
 o it doesn't make any difference whatsoever if a program is 80 or 8000
ines long.
 BTW a program with 8000 lines is usually a sign of poor design.
 On 26/01/2012 19:02, Wjhonson wrote:
   You've never worked on programs that are 8000 lines long I take it :)




   -Original Message-
   From: John Hesterjhes...@momtex.com
   To: U2 Users Listu2-users@listserver.u2ug.org
   Sent: Thu, Jan 26, 2012 10:49 am
   Subject: Re: [U2] Passing by Value


   I like to use increasing roman numerals:
   FOR I = 1 TO COUNTER
 GOSUB PROCESS
   EXT I
   PROCESS:
   OR II = 1 TO COUNTER2
 FOR III = 1 TO COUNTER3
   FOR IV = 1 TO COUNTER4

   NEXT IV
 NEXT III
   EXT II
   ETURN
   -Original Message-
   rom: u2-users-boun...@listserver.u2ug.org
   mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson
   ent: Thursday, January 26, 2012 10:09 AM
   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
   __
   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
 __
 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
__
2-Users mailing list
2-us...@listserver.u2ug.org
ttp://listserver.u2ug.org/mailman/listinfo/u2-users

Re: [U2] Passing by Value

2012-01-27 Thread Martin Phillips

Hi all,


I asked the Rocket Software guys to have LOCAL variables... but nothing...


Someone from the UV development team once told me that the Basic compiler 
has the concept of local variables for internal subroutines but it has not 
been released. I don't know why. We did it for QM and it wasn't difficult.



Martin Phillips
Ladybridge Systems Ltd
17b Coldstream Lane, Hardingstone, Northampton NN4 6DB, England
+44 (0)1604-709200 


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


Re: [U2] Passing by Value

2012-01-27 Thread Tony Gravagno
I recognized Will's troll from his first post and was tempted to
comment but thought that would just stir up more OT discussion.
And yet it continues anyway.

Don't you guys recognize the pattern here? He'll keep changing
the scenario, adding road blocks and confusing arguments that
make proposals seem inadequate, and then he won't accept common
answers anyway.  You guys have been generously providing feedback
to an enquiry that's not going anywhere.  He's just stirring the
pot.  He does this all the time.  Look back on prior threads if
you're not seeing it yet.

T

 No - I thought we were talking about creating a 
 **NEW** counter variable in a large old program, call 
 it xx1  do a search on xx1  no lines, then use it.

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


Re: [U2] Passing by Value

2012-01-27 Thread Wjhonson

Tony your comments are unprofessional.




-Original Message-
From: Tony Gravagno 3xk547...@sneakemail.com
To: u2-users u2-users@listserver.u2ug.org
Sent: Fri, Jan 27, 2012 10:13 am
Subject: Re: [U2] Passing by Value


I recognized Will's troll from his first post and was tempted to
omment but thought that would just stir up more OT discussion.
nd yet it continues anyway.
Don't you guys recognize the pattern here? He'll keep changing
he scenario, adding road blocks and confusing arguments that
ake proposals seem inadequate, and then he won't accept common
nswers anyway.  You guys have been generously providing feedback
o an enquiry that's not going anywhere.  He's just stirring the
ot.  He does this all the time.  Look back on prior threads if
ou're not seeing it yet.
T
 No - I thought we were talking about creating a 
 **NEW** counter variable in a large old program, call 
 it xx1  do a search on xx1  no lines, then use it.
___
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


Re: [U2] Passing by Value

2012-01-27 Thread Wjhonson

When I pose questions, they are actual, real life issues, that are happening 
right at the time.

The other characterizations of me you mention below, are false.



-Original Message-
From: Woodward, Bob bob_woodw...@k2sports.com
To: U2 Users List u2-users@listserver.u2ug.org
Sent: Fri, Jan 27, 2012 11:25 am
Subject: Re: [U2] Passing by Value


And yet I agree with him, too.  You take advantage of the generosity of
he folks on this list with what appears to be a main motivation of
tirring up a conversation just for the sake of seeing how many
ifferent directions you can twist things.
Your statement that Tony's comments are unprofessional has a ring of a
eflected image in a mirror.  If you want things to be professional, ask
pecific, detailed questions and forget the endless array of
ypothetical variations that MAY happen one time out of a thousand
orever's.
-Original Message-
rom: u2-users-boun...@listserver.u2ug.org
mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson
ent: Friday, January 27, 2012 10:21 AM
o: u2-users@listserver.u2ug.org
ubject: Re: [U2] Passing by Value

ony your comments are unprofessional.


Original Message-
rom: Tony Gravagno 3xk547...@sneakemail.com
o: u2-users u2-users@listserver.u2ug.org
ent: Fri, Jan 27, 2012 10:13 am
ubject: Re: [U2] Passing by Value

 recognized Will's troll from his first post and was tempted to
mment but thought that would just stir up more OT discussion.
d yet it continues anyway.
on't you guys recognize the pattern here? He'll keep changing
e scenario, adding road blocks and confusing arguments that
ke proposals seem inadequate, and then he won't accept common
swers anyway.  You guys have been generously providing feedback
 an enquiry that's not going anywhere.  He's just stirring the
t.  He does this all the time.  Look back on prior threads if
u're not seeing it yet.

 No - I thought we were talking about creating a 
**NEW** counter variable in a large old program, call 
it xx1  do a search on xx1  no lines, then use it.
__
-Users mailing list
-us...@listserver.u2ug.org
tp://listserver.u2ug.org/mailman/listinfo/u2-users
___
2-Users mailing list
2-us...@listserver.u2ug.org
ttp://listserver.u2ug.org/mailman/listinfo/u2-users
__
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


Re: [U2] Passing by Value

2012-01-27 Thread Jeff Schasny

Hear Hear! If you don't like being called a troll, don't be a troll.

Woodward, Bob wrote:

And yet I agree with him, too.  You take advantage of the generosity of
the folks on this list with what appears to be a main motivation of
stirring up a conversation just for the sake of seeing how many
different directions you can twist things.

Your statement that Tony's comments are unprofessional has a ring of a
reflected image in a mirror.  If you want things to be professional, ask
specific, detailed questions and forget the endless array of
hypothetical variations that MAY happen one time out of a thousand
forever's.

-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson
Sent: Friday, January 27, 2012 10:21 AM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] Passing by Value


Tony your comments are unprofessional.




-Original Message-
From: Tony Gravagno 3xk547...@sneakemail.com
To: u2-users u2-users@listserver.u2ug.org
Sent: Fri, Jan 27, 2012 10:13 am
Subject: Re: [U2] Passing by Value


I recognized Will's troll from his first post and was tempted to
omment but thought that would just stir up more OT discussion.
nd yet it continues anyway.
Don't you guys recognize the pattern here? He'll keep changing
he scenario, adding road blocks and confusing arguments that
ake proposals seem inadequate, and then he won't accept common
nswers anyway.  You guys have been generously providing feedback
o an enquiry that's not going anywhere.  He's just stirring the
ot.  He does this all the time.  Look back on prior threads if
ou're not seeing it yet.
T
  
No - I thought we were talking about creating a 

 **NEW** counter variable in a large old program, call 
 it xx1  do a search on xx1  no lines, then use it.

___
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
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users

  


--

Jeff Schasny - Denver, Co, USA
jschasny at gmail dot com

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


Re: [U2] Passing by Value

2012-01-27 Thread Bill Haskett

G-man:

You having a bad day?  :-)

Bill Haskett


- Original Message -
*From:* 3xk547...@sneakemail.com
*To:* u2-users@listserver.u2ug.org
*Date:* 1/27/2012 10:12 AM
*Subject:* Re: [U2] Passing by Value

I recognized Will's troll from his first post and was tempted to
comment but thought that would just stir up more OT discussion.
And yet it continues anyway.

Don't you guys recognize the pattern here? He'll keep changing
the scenario, adding road blocks and confusing arguments that
make proposals seem inadequate, and then he won't accept common
answers anyway.  You guys have been generously providing feedback
to an enquiry that's not going anywhere.  He's just stirring the
pot.  He does this all the time.  Look back on prior threads if
you're not seeing it yet.

T


No - I thought we were talking about creating a
**NEW** counter variable in a large old program, call
it xx1  do a search on xx1  no lines, then use it.

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


Re: [U2] Passing by Value

2012-01-27 Thread Tony Gravagno
 From: Bill Haskett
 G-man:
 You having a bad day?  :-)

No bro, I just don't like seeing good people being abused ...
again.  I'm just glad I'm not the only one who sees it.

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


Re: [U2] Passing by Value

2012-01-27 Thread Wjhonson

No one is forced to respond to any message Tony.
In fact no one is forced to read any of them.




-Original Message-
From: Tony Gravagno 3xk547...@sneakemail.com
To: u2-users u2-users@listserver.u2ug.org
Sent: Fri, Jan 27, 2012 1:23 pm
Subject: Re: [U2] Passing by Value


 From: Bill Haskett
 G-man:
 You having a bad day?  :-)
No bro, I just don't like seeing good people being abused ...
gain.  I'm just glad I'm not the only one who sees it.
___
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


Re: [U2] Passing by Value

2012-01-27 Thread Wols Lists

On 26/01/12 21:26, Mecki Foerthmann wrote:

What does -X do?


Sorry if this has already been answered, but I guess it's what I know as 
XREF.


It creates a listing of all the variables used, including the lines on 
which they are used.



I'd probably compile it with -Z2, run the program in debug and put a
trace on A.

On 26/01/2012 21:22, u2ug wrote:

BASIC -X !!!


Cheers,
Wol
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] Passing by Value

2012-01-27 Thread Mecki Foerthmann

Thanks, I'll try it out next time I'm chasing a variable.

On 27/01/2012 22:52, Wols Lists wrote:

On 26/01/12 21:26, Mecki Foerthmann wrote:

What does -X do?


Sorry if this has already been answered, but I guess it's what I know 
as XREF.


It creates a listing of all the variables used, including the lines on 
which they are used.



I'd probably compile it with -Z2, run the program in debug and put a
trace on A.

On 26/01/2012 21:22, u2ug wrote:

BASIC -X !!!


Cheers,
Wol
___
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


Re: [U2] Passing by Value

2012-01-27 Thread Mecki Foerthmann

I 100% agree with you Tony.
I really feel put off by the arrogant attitude in his replies.
First asking bloody beginner's questions and then accusing seasoned 
professionals when they offer a (free) solution that they don't know 
what they're talking about.

Who does this guy think he is?

I already put him in my spam filter.
Imho the only way to get rid of trolls is to ignore them.
If we do that they usually get bored and leave after a while or come 
down from their high horse.

He's not the first one and will surely not be the last one either.

Please stop feeding this troll.

Mecki

On 27/01/2012 21:23, Tony Gravagno wrote:

From: Bill Haskett
G-man:
You having a bad day?  :-)

No bro, I just don't like seeing good people being abused ...
again.  I'm just glad I'm not the only one who sees it.

___
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


Re: [U2] Passing by Value

2012-01-27 Thread Wjhonson

I never said you don't know what you're talking about.
I said your solution will not work in cases where the variable is a string that 
occurs frequently.
Create a variable called HEN and then search for it, and you hit every THEN as 
well.

Arrogance my dear is believing that when you are corrected, you were right 
anyway.



-Original Message-
From: Mecki Foerthmann mec...@gmx.net
To: u2-users u2-users@listserver.u2ug.org
Sent: Fri, Jan 27, 2012 3:40 pm
Subject: Re: [U2] Passing by Value


I 100% agree with you Tony.
 really feel put off by the arrogant attitude in his replies.
irst asking bloody beginner's questions and then accusing seasoned 
rofessionals when they offer a (free) solution that they don't know 
hat they're talking about.
ho does this guy think he is?
I already put him in my spam filter.
mho the only way to get rid of trolls is to ignore them.
f we do that they usually get bored and leave after a while or come 
own from their high horse.
e's not the first one and will surely not be the last one either.
Please stop feeding this troll.
Mecki
On 27/01/2012 21:23, Tony Gravagno wrote:
 From: Bill Haskett
 G-man:
 You having a bad day?  :-)
 No bro, I just don't like seeing good people being abused ...
 again.  I'm just glad I'm not the only one who sees it.

 ___
 U2-Users mailing list
 U2-Users@listserver.u2ug.org
 http://listserver.u2ug.org/mailman/listinfo/u2-users
__
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


Re: [U2] Passing by Value 101 ?

2012-01-27 Thread Bill Brutzman
It is not clear to me why Passing By Value is worth anything.  

I am surprised that this thread has led to so many responses... most... I did 
not read.

From here... having a variable with a name... and calling an external 
subroutine... is all the bread and butter that  I would ever need. 

 myGuzInTa = ''
   myGuzOutA = ''
  errorFlag = ''

Call *SUB.MY.THING.R1(myGuzInTa, myGuzOutA, errorFlag)

Begin case
Case myGuzOutA = ''  ;  gosub xx
 Case 1  ;  gosub yy
Endcase

Putting a thingy-poo in double parens seems to be at odds with good programming 
practice.

Perhaps I am missing something...

I promise to try to read clarifying responses...

--Bill

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


Re: [U2] Passing by Value 101 ?

2012-01-27 Thread u2ug
It gives the calling routine a way to ensure that a called routine can't
modify the variables value ( intentionally or inadvertently ).

FOR COUNTER=1 TO 10
IF IWANTTOCAUSEPROBLEMS
THEN CALL *BADSUB( @LOGNAME , COUNTER ) ;* go boom !
ELSE CALL *BADSUB( (@LOGNAME) , (COUNTER) ) ;*
everything ok
NEXT

SUBROUTINE BADSUB (ARG1,ARG2)
ARG1=XXX  ;* this will globally change the value of
@LOGNAME believe it or not
ARG2=XXX  ;* this will mess up the FOR NEXT
END


-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Bill Brutzman
Sent: Friday, January 27, 2012 7:52 PM
To: U2 Users List
Subject: Re: [U2] Passing by Value 101 ?

It is not clear to me why Passing By Value is worth anything.  

I am surprised that this thread has led to so many responses... most...
I did not read.

From here... having a variable with a name... and calling an external
subroutine... is all the bread and butter that  I would ever need. 

 myGuzInTa = ''
   myGuzOutA =
''
  errorFlag
= ''

Call *SUB.MY.THING.R1(myGuzInTa, myGuzOutA, errorFlag)

Begin case
Case myGuzOutA = ''  ;  gosub xx
 Case 1  ;  gosub yy
Endcase

Putting a thingy-poo in double parens seems to be at odds with good
programming practice.

Perhaps I am missing something...

I promise to try to read clarifying responses...

--Bill

___
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


[U2] Passing by Value

2012-01-26 Thread Kebbon Irwin

Unidata 7.1
I think this has come up before (side question: how do you search the 
archives?)...  I think it is possible to pass a parameter by value instead of 
by reference.  This, of course, means that any changes to the parameter in the 
called subroutine are localized and its original value in the calling routine 
is unchanged there.  Does anyone do this?  If so, how?Cheers,Kebbon 
 
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] Passing by Value

2012-01-26 Thread Rex Gozar
Put the variable in parentheses to pass by value, e.g.

CALL MYSUB((VAR1))

rex

On Thu, Jan 26, 2012 at 9:39 AM, Kebbon Irwin kebbon.ir...@sympatico.ca wrote:

 Unidata 7.1
 I think this has come up before (side question: how do you search the 
 archives?)...  I think it is possible to pass a parameter by value instead of 
 by reference.  This, of course, means that any changes to the parameter in 
 the called subroutine are localized and its original value in the calling 
 routine is unchanged there.  Does anyone do this?  If so, how?Cheers,Kebbon
 ___
 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


Re: [U2] Passing by Value

2012-01-26 Thread Dave Davis
Use parentheses when you call:

CALL MY.SUBR((firstval), (secondval), etc)

-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Kebbon Irwin
Sent: Thursday, January 26, 2012 9:40 AM
To: u2-users@listserver.u2ug.org
Subject: [U2] Passing by Value


Unidata 7.1
I think this has come up before (side question: how do you search the 
archives?)...  I think it is possible to pass a parameter by value instead of 
by reference.  This, of course, means that any changes to the parameter in the 
called subroutine are localized and its original value in the calling routine 
is unchanged there.  Does anyone do this?  If so, how?Cheers,Kebbon
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users



Dave Davis
Team Lead, RD

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.comhttp://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


Re: [U2] Passing by Value

2012-01-26 Thread Martin Phillips

Hi,

It is possible from the calling side, simply by enclosing the argument 
variable in parentheses, effectively making it an expression.


It is not possible from the subroutine except by copying the argument to a 
local variable.



Martin Phillips
Ladybridge Systems Ltd
17b Coldstream Lane, Hardingstone, Northampton NN4 6DB, England
+44 (0)1604-709200

-Original Message- 
From: Kebbon Irwin

Sent: Thursday, January 26, 2012 2:39 PM
To: u2-users@listserver.u2ug.org
Subject: [U2] Passing by Value


Unidata 7.1
I think this has come up before (side question: how do you search the 
archives?)...  I think it is possible to pass a parameter by value instead 
of by reference.  This, of course, means that any changes to the parameter 
in the called subroutine are localized and its original value in the calling 
routine is unchanged there.  Does anyone do this?  If so, how?Cheers,Kebbon

___
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


Re: [U2] Passing by Value

2012-01-26 Thread Tony Gravagno
CALL SUBNAME( IVAR+0 , AVAR: )

 From: Kebbon Irwin
 I think it is possible to pass a 
 parameter by value instead of by reference.

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


Re: [U2] Passing by Value

2012-01-26 Thread Wjhonson
Very sly.



-Original Message-
From: Tony Gravagno 3xk547...@sneakemail.com
To: u2-users u2-users@listserver.u2ug.org
Sent: Thu, Jan 26, 2012 7:17 am
Subject: Re: [U2] Passing by Value


CALL SUBNAME( IVAR+0 , AVAR: )
 From: Kebbon Irwin
 I think it is possible to pass a 
 parameter by value instead of by reference.
___
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


Re: [U2] Passing by Value

2012-01-26 Thread John Hester
Well, that's a neat trick I've never known about.  Once again, this list
proves it's an invaluable resource.

I've always done it on the subroutine side like so:

CALL NON.MODIFYING.SUB (THIS.VAR)

SUBROUTINE NON.MODIFYING.SUB (GLOBAL.THIS.VAR)
THIS.VAR = GLOBAL.THIS.VAR
THIS.VAR = THAT.VAR
RETURN

-John

-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Martin
Phillips
Sent: Thursday, January 26, 2012 6:47 AM
To: U2 Users List
Subject: Re: [U2] Passing by Value

Hi,

It is possible from the calling side, simply by enclosing the argument
variable in parentheses, effectively making it an expression.

It is not possible from the subroutine except by copying the argument to
a local variable.


Martin Phillips
Ladybridge Systems Ltd
17b Coldstream Lane, Hardingstone, Northampton NN4 6DB, England
+44 (0)1604-709200

-Original Message- 
From: Kebbon Irwin
Sent: Thursday, January 26, 2012 2:39 PM
To: u2-users@listserver.u2ug.org
Subject: [U2] Passing by Value


Unidata 7.1
I think this has come up before (side question: how do you search the 
archives?)...  I think it is possible to pass a parameter by value
instead 
of by reference.  This, of course, means that any changes to the
parameter 
in the called subroutine are localized and its original value in the
calling 
routine is unchanged there.  Does anyone do this?  If so,
how?Cheers,Kebbon
___
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
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] Passing by Value

2012-01-26 Thread John Hester
Hmm... Not sure why Outlook put the subroutine code all on one line.
I'll try again:

CALL NON.MODIFYING.SUB (THIS.VAR)

SUBROUTINE NON.MODIFYING.SUB (GLOBAL.THIS.VAR)
THIS.VAR = GLOBAL.THIS.VAR
THIS.VAR = THAT.VAR
RETURN

-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of John Hester
Sent: Thursday, January 26, 2012 9:56 AM
To: U2 Users List
Subject: Re: [U2] Passing by Value

Well, that's a neat trick I've never known about.  Once again, this list
proves it's an invaluable resource.

I've always done it on the subroutine side like so:

CALL NON.MODIFYING.SUB (THIS.VAR)

SUBROUTINE NON.MODIFYING.SUB (GLOBAL.THIS.VAR) THIS.VAR =
GLOBAL.THIS.VAR THIS.VAR = THAT.VAR RETURN

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


Re: [U2] Passing by Value

2012-01-26 Thread Ed Clark
Essentially, adding the () or +0 or : creates an expression. CALL then passes 
the result of the expression instead of the address of the variable. You get 
the same result by passing a dynamic array reference like IVAR1, though not a 
dimensioned array reference like A(5), because each array element is a variable 
with an address. (I don't know for a fact that all pick systems treat IVARI 
ask an expression--there might be someone who handled it as a true array--but 
u2 does).

On Jan 26, 2012, at 12:30 PM, Wjhonson wrote:

 Very sly.
 
 
 
 -Original Message-
 From: Tony Gravagno 3xk547...@sneakemail.com
 To: u2-users u2-users@listserver.u2ug.org
 Sent: Thu, Jan 26, 2012 7:17 am
 Subject: Re: [U2] Passing by Value
 
 
 CALL SUBNAME( IVAR+0 , AVAR: )
 From: Kebbon Irwin
 I think it is possible to pass a 
 parameter by value instead of by reference.
 ___
 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

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


Re: [U2] Passing by Value

2012-01-26 Thread Wjhonson

On a related note, any clever ideas to localize a variable to a local 
subroutine?

For I = 1 to 10
   GOSUB PROCESS
Next I
Stop

3000 Lines of code later

PROCESS:
FOR I = 1 TO 20
PRINT I
NEXT I
RETURN
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] Passing by Value

2012-01-26 Thread Dave Davis
By way of naming convention:

FOR PROCESS_I = 1 TO 20

-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:09 PM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] Passing by Value


On a related note, any clever ideas to localize a variable to a local 
subroutine?

For I = 1 to 10
   GOSUB PROCESS
Next I
Stop

3000 Lines of code later

PROCESS:
FOR I = 1 TO 20
PRINT I
NEXT I
RETURN
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users



Dave Davis
Team Lead, RD

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.comhttp://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


Re: [U2] Passing by Value

2012-01-26 Thread David A. Green
I always try to use meaningful variable names.

CUSTOMER.CNT = DCOUNT(CUSTOMERS, @VM)
FOR CUSTOMER.PTR = 1 TO CUSTOMER.CNT
  CUSTOMER = CUSTOMER1, CUSTOMER.PTR
  .
  .
  .
NEXT CUSTOMER.PTR

David A. Green
(480) 813-1725
DAG Consulting

-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 11:09 AM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] Passing by Value


On a related note, any clever ideas to localize a variable to a local
subroutine?

For I = 1 to 10
   GOSUB PROCESS
Next I
Stop

3000 Lines of code later

PROCESS:
FOR I = 1 TO 20
PRINT I
NEXT I
RETURN
___
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


Re: [U2] Passing by Value

2012-01-26 Thread Israel, John R.
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, RD
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.comhttp://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, RD

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.comhttp://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

Re: [U2] Passing by Value

2012-01-26 Thread John Hester
I like to use increasing roman numerals:

FOR I = 1 TO COUNTER
  GOSUB PROCESS
NEXT I

PROCESS:
FOR II = 1 TO COUNTER2
  FOR III = 1 TO COUNTER3
FOR IV = 1 TO COUNTER4

NEXT IV
  NEXT III
NEXT II
RETURN

-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 10:09 AM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] Passing by Value


On a related note, any clever ideas to localize a variable to a local
subroutine?

For I = 1 to 10
   GOSUB PROCESS
Next I
Stop

3000 Lines of code later

PROCESS:
FOR I = 1 TO 20
PRINT I
NEXT I
RETURN
___
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


Re: [U2] Passing by Value

2012-01-26 Thread Wjhonson

You've never worked on programs that are 8000 lines long I take it :)




-Original Message-
From: John Hester jhes...@momtex.com
To: U2 Users List u2-users@listserver.u2ug.org
Sent: Thu, Jan 26, 2012 10:49 am
Subject: Re: [U2] Passing by Value


I like to use increasing roman numerals:
FOR I = 1 TO COUNTER
 GOSUB PROCESS
EXT I
PROCESS:
OR II = 1 TO COUNTER2
 FOR III = 1 TO COUNTER3
   FOR IV = 1 TO COUNTER4
   
   NEXT IV
 NEXT III
EXT II
ETURN
-Original Message-
rom: u2-users-boun...@listserver.u2ug.org
mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson
ent: Thursday, January 26, 2012 10:09 AM
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
__
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


Re: [U2] Passing by Value - Found word(s) list error in the Text body

2012-01-26 Thread Garry Smith
Is Mr Davis previously graduated from ASM in 1974?

Garry L. Smith
Director Info. Systems
Charles McMurray Company
T# 559-292-5782 F# 559-346-6169
-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 10:17 AM
To: U2 Users List
Subject: Re: [U2] Passing by Value - Found word(s) list error in the
Text body

By way of naming convention:

FOR PROCESS_I = 1 TO 20

-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:09 PM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] Passing by Value


On a related note, any clever ideas to localize a variable to a local
subroutine?

For I = 1 to 10
   GOSUB PROCESS
Next I
Stop

3000 Lines of code later

PROCESS:
FOR I = 1 TO 20
PRINT I
NEXT I
RETURN
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users



Dave Davis
Team Lead, RD

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]h
ttp://www.harriscomputer.com/
6110 Enterprise Parkway
Grove City, OH
43123
www.harris-schoolsolutions.comhttp://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


Re: [U2] Passing by Value - Found word(s) list error in the Text body

2012-01-26 Thread Dave Davis
Before my time.

I don't really do the PROCESS_I thing - but if necessary I do try to 
associate the name of the index variable with the thing being indexed.

We use a lot of SB+ paragraph code so the subject of internal subroutines 
does not really present itself.

-Original Message-
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Garry Smith
Sent: Thursday, January 26, 2012 2:35 PM
To: U2 Users List
Subject: Re: [U2] Passing by Value - Found word(s) list error in the Text body

Is Mr Davis previously graduated from ASM in 1974?

Garry L. Smith
Director Info. Systems
Charles McMurray Company
T# 559-292-5782 F# 559-346-6169
-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 10:17 AM
To: U2 Users List
Subject: Re: [U2] Passing by Value - Found word(s) list error in the
Text body

By way of naming convention:

FOR PROCESS_I = 1 TO 20

-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:09 PM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] Passing by Value


On a related note, any clever ideas to localize a variable to a local
subroutine?

For I = 1 to 10
   GOSUB PROCESS
Next I
Stop

3000 Lines of code later

PROCESS:
FOR I = 1 TO 20
PRINT I
NEXT I
RETURN
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users



Dave Davis
Team Lead, RD

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]h
ttp://www.harriscomputer.com/
6110 Enterprise Parkway
Grove City, OH
43123
www.harris-schoolsolutions.comhttp://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



Dave Davis
Team Lead, RD

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.comhttp://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


Re: [U2] Passing by Value

2012-01-26 Thread Horacio Pellegrino
I asked the Rocket Software guys to have LOCAL variables... but nothing...
:-(


On Thu, Jan 26, 2012 at 2:02 PM, Wjhonson wjhon...@aol.com wrote:


 You've never worked on programs that are 8000 lines long I take it :)




 -Original Message-
 From: John Hester jhes...@momtex.com
 To: U2 Users List u2-users@listserver.u2ug.org
 Sent: Thu, Jan 26, 2012 10:49 am
 Subject: Re: [U2] Passing by Value


 I like to use increasing roman numerals:
 FOR I = 1 TO COUNTER
  GOSUB PROCESS
 EXT I
 PROCESS:
 OR II = 1 TO COUNTER2
  FOR III = 1 TO COUNTER3
   FOR IV = 1 TO COUNTER4

   NEXT IV
  NEXT III
 EXT II
 ETURN
 -Original Message-
 rom: u2-users-boun...@listserver.u2ug.org
 mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson
 ent: Thursday, January 26, 2012 10:09 AM
 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
 __
 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




-- 

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


Re: [U2] Passing by Value

2012-01-26 Thread Daniel McGrath
Hi Horacio,

Just to clarify, I sent an invite to you a few weeks ago where you can discuss 
this. If you cannot find it in your gmail account (maybe it went to spam?) I 
can resend it to you.

Regards,

Dan McGrath
U2 Product Manager | Rocket Software

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

I asked the Rocket Software guys to have LOCAL variables... but nothing...
:-(


On Thu, Jan 26, 2012 at 2:02 PM, Wjhonson wjhon...@aol.com wrote:


 You've never worked on programs that are 8000 lines long I take it :)




 -Original Message-
 From: John Hester jhes...@momtex.com
 To: U2 Users List u2-users@listserver.u2ug.org
 Sent: Thu, Jan 26, 2012 10:49 am
 Subject: Re: [U2] Passing by Value


 I like to use increasing roman numerals:
 FOR I = 1 TO COUNTER
  GOSUB PROCESS
 EXT I
 PROCESS:
 OR II = 1 TO COUNTER2
  FOR III = 1 TO COUNTER3
   FOR IV = 1 TO COUNTER4

   NEXT IV
  NEXT III
 EXT II
 ETURN
 -Original Message-
 rom: u2-users-boun...@listserver.u2ug.org
 mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson
 ent: Thursday, January 26, 2012 10:09 AM
 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
 __
 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




-- 

*hp*
___
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


Re: [U2] Passing by Value

2012-01-26 Thread Mecki Foerthmann

What has the length of the program to do with it?
I always abide to the rule that a for next counter in any internal 
subroutine has to be unique.
That way even if the sub is called from within a for next loop the 
counters never conflict.
So it doesn't make any difference whatsoever if a program is 80 or 8000 
lines long.


BTW a program with 8000 lines is usually a sign of poor design.

On 26/01/2012 19:02, Wjhonson wrote:

You've never worked on programs that are 8000 lines long I take it :)




-Original Message-
From: John Hesterjhes...@momtex.com
To: U2 Users Listu2-users@listserver.u2ug.org
Sent: Thu, Jan 26, 2012 10:49 am
Subject: Re: [U2] Passing by Value


I like to use increasing roman numerals:
FOR I = 1 TO COUNTER
  GOSUB PROCESS
EXT I
PROCESS:
OR II = 1 TO COUNTER2
  FOR III = 1 TO COUNTER3
FOR IV = 1 TO COUNTER4

NEXT IV
  NEXT III
EXT II
ETURN
-Original Message-
rom: u2-users-boun...@listserver.u2ug.org
mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson
ent: Thursday, January 26, 2012 10:09 AM
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
__
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

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


Re: [U2] Passing by Value

2012-01-26 Thread Wjhonson

Completely wrong :)
You apparently have the luxury of only working on programs written by yourself.

In my world, we are called upon to make rapid changes in programs written by 
twenty programmers over twenty years.
You haven't specified *how* you ensure that your counters are unique, and by 
the way, the issue is not just counters, but any variable.



-Original Message-
From: Mecki Foerthmann mec...@gmx.net
To: u2-users u2-users@listserver.u2ug.org
Sent: Thu, Jan 26, 2012 12:13 pm
Subject: Re: [U2] Passing by Value


What has the length of the program to do with it?
 always abide to the rule that a for next counter in any internal 
ubroutine has to be unique.
hat way even if the sub is called from within a for next loop the 
ounters never conflict.
o it doesn't make any difference whatsoever if a program is 80 or 8000 
ines long.
BTW a program with 8000 lines is usually a sign of poor design.
On 26/01/2012 19:02, Wjhonson wrote:
 You've never worked on programs that are 8000 lines long I take it :)




 -Original Message-
 From: John Hesterjhes...@momtex.com
 To: U2 Users Listu2-users@listserver.u2ug.org
 Sent: Thu, Jan 26, 2012 10:49 am
 Subject: Re: [U2] Passing by Value


 I like to use increasing roman numerals:
 FOR I = 1 TO COUNTER
   GOSUB PROCESS
 EXT I
 PROCESS:
 OR II = 1 TO COUNTER2
   FOR III = 1 TO COUNTER3
 FOR IV = 1 TO COUNTER4

 NEXT IV
   NEXT III
 EXT II
 ETURN
 -Original Message-
 rom: u2-users-boun...@listserver.u2ug.org
 mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson
 ent: Thursday, January 26, 2012 10:09 AM
 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
 __
 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
__
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


Re: [U2] Passing by Value

2012-01-26 Thread Wjhonson

Completely wrong :)
You apparently have the luxury of only working on programs written by yourself.

In my world, we are called upon to make rapid changes in programs written by 
twenty programmers over twenty years.
You haven't specified *how* you ensure that your counters are unique, and by 
the way, the issue is not just counters, but any variable.



-Original Message-
From: Mecki Foerthmann mec...@gmx.net
To: u2-users u2-users@listserver.u2ug.org
Sent: Thu, Jan 26, 2012 12:13 pm
Subject: Re: [U2] Passing by Value


What has the length of the program to do with it?
 always abide to the rule that a for next counter in any internal 
ubroutine has to be unique.
hat way even if the sub is called from within a for next loop the 
ounters never conflict.
o it doesn't make any difference whatsoever if a program is 80 or 8000 
ines long.
BTW a program with 8000 lines is usually a sign of poor design.
On 26/01/2012 19:02, Wjhonson wrote:
 You've never worked on programs that are 8000 lines long I take it :)




 -Original Message-
 From: John Hesterjhes...@momtex.com
 To: U2 Users Listu2-users@listserver.u2ug.org
 Sent: Thu, Jan 26, 2012 10:49 am
 Subject: Re: [U2] Passing by Value


 I like to use increasing roman numerals:
 FOR I = 1 TO COUNTER
   GOSUB PROCESS
 EXT I
 PROCESS:
 OR II = 1 TO COUNTER2
   FOR III = 1 TO COUNTER3
 FOR IV = 1 TO COUNTER4

 NEXT IV
   NEXT III
 EXT II
 ETURN
 -Original Message-
 rom: u2-users-boun...@listserver.u2ug.org
 mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson
 ent: Thursday, January 26, 2012 10:09 AM
 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
 __
 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
__
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


Re: [U2] Passing by Value

2012-01-26 Thread John Hester
I'm with Mecki on not seeing why the length of the program is relevant.
If I want to check for uniqueness of one of the counting variables, I'd
do this twice in the editor:

L FOR IV

If I get more than one hit, there's a problem.  If I'm looking for the
next available counter, I repeat from the top incrementing the variable
each time until I get no results.  You are correct in pointing out that
I'm only talking about for/next counting variables, though, and you
might also need to localize a more descriptive variable.  This is
typically how I'd handle that situation:

HOLD.LOCAL.VAR = LOCAL.VAR
GOSUB SOME.SUB
LOCAL.VAR = HOLD.LOCAL.VAR

Or if there are a lot of calls to the subroutine in various places and I
never want that variable to be modified by it I might do this:

GOSUB SOME.SUB

SOME.SUB:
HOLD.LOCAL.VAR = LOCAL.VAR
LOCAL.VAR = SOME.OTHER.VALUE
GOSUB SOME.OTHER.SUB
LOCAL.VAR = HOLD.LOCAL.VAR
RETURN

-John

-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 12:17 PM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] Passing by Value


Completely wrong :)
You apparently have the luxury of only working on programs written by
yourself.

In my world, we are called upon to make rapid changes in programs
written by twenty programmers over twenty years.
You haven't specified *how* you ensure that your counters are unique,
and by the way, the issue is not just counters, but any variable.



-Original Message-
From: Mecki Foerthmann mec...@gmx.net
To: u2-users u2-users@listserver.u2ug.org
Sent: Thu, Jan 26, 2012 12:13 pm
Subject: Re: [U2] Passing by Value


What has the length of the program to do with it?
 always abide to the rule that a for next counter in any internal
ubroutine has to be unique.
hat way even if the sub is called from within a for next loop the
ounters never conflict.
o it doesn't make any difference whatsoever if a program is 80 or 8000
ines long.
BTW a program with 8000 lines is usually a sign of poor design.
On 26/01/2012 19:02, Wjhonson wrote:
 You've never worked on programs that are 8000 lines long I take it :)




 -Original Message-
 From: John Hesterjhes...@momtex.com
 To: U2 Users Listu2-users@listserver.u2ug.org
 Sent: Thu, Jan 26, 2012 10:49 am
 Subject: Re: [U2] Passing by Value


 I like to use increasing roman numerals:
 FOR I = 1 TO COUNTER
   GOSUB PROCESS
 EXT I
 PROCESS:
 OR II = 1 TO COUNTER2
   FOR III = 1 TO COUNTER3
 FOR IV = 1 TO COUNTER4

 NEXT IV
   NEXT III
 EXT II
 ETURN
 -Original Message-
 rom: u2-users-boun...@listserver.u2ug.org
 mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson
 ent: Thursday, January 26, 2012 10:09 AM
 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
 __
 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
__
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
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] Passing by Value

2012-01-26 Thread Mecki Foerthmann

No, you are completely wrong if you think that is only your world.
Who in our game has the luxury working only with their own code?
I have been doing what you describe for over 25 years now and probably 
most of the contributors here do the same thing for a living too and not 
just since yesterday.
And I may have made that silly mistake once or twice as a junior but 
since then it has become second nature.
And in those days we didn't have the luxury of 8000 line programs 
because the limit for any item was 32K and you were forced to use very 
short variable names and couldn't even indent your code because spaces 
are characters too.
In one shop I worked we used X, Y, Z etc. in 'primary' code and in 
internal subroutines XX, YY, ZZ and so on for loop counters.
I personally prefer more meaningful names but can't do that always 
because I try to follow the naming conventions of the code I'm working on.


Even the editor you use is irrelevant since I haven't seen one yet that 
doesn't have a search function.
Just go to the top of the program and search for the variable name you 
intend to use.

If your search comes up negative you're safe to use it.
Simple!

And OTOH how can you make 'rapid changes' to code if you don't 
understand what it is supposed to do and where the varibles come from?


On 26/01/2012 20:16, Wjhonson wrote:

Completely wrong :)
You apparently have the luxury of only working on programs written by yourself.

In my world, we are called upon to make rapid changes in programs written by 
twenty programmers over twenty years.
You haven't specified *how* you ensure that your counters are unique, and by 
the way, the issue is not just counters, but any variable.



-Original Message-
From: Mecki Foerthmannmec...@gmx.net
To: u2-usersu2-users@listserver.u2ug.org
Sent: Thu, Jan 26, 2012 12:13 pm
Subject: Re: [U2] Passing by Value


What has the length of the program to do with it?
  always abide to the rule that a for next counter in any internal
ubroutine has to be unique.
hat way even if the sub is called from within a for next loop the
ounters never conflict.
o it doesn't make any difference whatsoever if a program is 80 or 8000
ines long.
BTW a program with 8000 lines is usually a sign of poor design.
On 26/01/2012 19:02, Wjhonson wrote:
  You've never worked on programs that are 8000 lines long I take it :)




  -Original Message-
  From: John Hesterjhes...@momtex.com
  To: U2 Users Listu2-users@listserver.u2ug.org
  Sent: Thu, Jan 26, 2012 10:49 am
  Subject: Re: [U2] Passing by Value


  I like to use increasing roman numerals:
  FOR I = 1 TO COUNTER
GOSUB PROCESS
  EXT I
  PROCESS:
  OR II = 1 TO COUNTER2
FOR III = 1 TO COUNTER3
  FOR IV = 1 TO COUNTER4

  NEXT IV
NEXT III
  EXT II
  ETURN
  -Original Message-
  rom: u2-users-boun...@listserver.u2ug.org
  mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson
  ent: Thursday, January 26, 2012 10:09 AM
  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
  __
  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
__
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

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


Re: [U2] Passing by Value

2012-01-26 Thread Wjhonson

Mecki you're not paying attention.
You have an 8000 line program that uses a variable A
You didn't write it.  You need to find where that variable is assigned.
You search for A ?

That's not going to work.



-Original Message-
From: Mecki Foerthmann mec...@gmx.net
To: u2-users u2-users@listserver.u2ug.org
Sent: Thu, Jan 26, 2012 12:55 pm
Subject: Re: [U2] Passing by Value


No, you are completely wrong if you think that is only your world.
ho in our game has the luxury working only with their own code?
 have been doing what you describe for over 25 years now and probably 
ost of the contributors here do the same thing for a living too and not 
ust since yesterday.
nd I may have made that silly mistake once or twice as a junior but 
ince then it has become second nature.
nd in those days we didn't have the luxury of 8000 line programs 
ecause the limit for any item was 32K and you were forced to use very 
hort variable names and couldn't even indent your code because spaces 
re characters too.
n one shop I worked we used X, Y, Z etc. in 'primary' code and in 
nternal subroutines XX, YY, ZZ and so on for loop counters.
 personally prefer more meaningful names but can't do that always 
ecause I try to follow the naming conventions of the code I'm working on.
Even the editor you use is irrelevant since I haven't seen one yet that 
oesn't have a search function.
ust go to the top of the program and search for the variable name you 
ntend to use.
f your search comes up negative you're safe to use it.
imple!
And OTOH how can you make 'rapid changes' to code if you don't 
nderstand what it is supposed to do and where the varibles come from?
On 26/01/2012 20:16, Wjhonson wrote:
 Completely wrong :)
 You apparently have the luxury of only working on programs written by 
ourself.

 In my world, we are called upon to make rapid changes in programs written by 
wenty programmers over twenty years.
 You haven't specified *how* you ensure that your counters are unique, and by 
he way, the issue is not just counters, but any variable.



 -Original Message-
 From: Mecki Foerthmannmec...@gmx.net
 To: u2-usersu2-users@listserver.u2ug.org
 Sent: Thu, Jan 26, 2012 12:13 pm
 Subject: Re: [U2] Passing by Value


 What has the length of the program to do with it?
   always abide to the rule that a for next counter in any internal
 ubroutine has to be unique.
 hat way even if the sub is called from within a for next loop the
 ounters never conflict.
 o it doesn't make any difference whatsoever if a program is 80 or 8000
 ines long.
 BTW a program with 8000 lines is usually a sign of poor design.
 On 26/01/2012 19:02, Wjhonson wrote:
   You've never worked on programs that are 8000 lines long I take it :)




   -Original Message-
   From: John Hesterjhes...@momtex.com
   To: U2 Users Listu2-users@listserver.u2ug.org
   Sent: Thu, Jan 26, 2012 10:49 am
   Subject: Re: [U2] Passing by Value


   I like to use increasing roman numerals:
   FOR I = 1 TO COUNTER
 GOSUB PROCESS
   EXT I
   PROCESS:
   OR II = 1 TO COUNTER2
 FOR III = 1 TO COUNTER3
   FOR IV = 1 TO COUNTER4

   NEXT IV
 NEXT III
   EXT II
   ETURN
   -Original Message-
   rom: u2-users-boun...@listserver.u2ug.org
   mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson
   ent: Thursday, January 26, 2012 10:09 AM
   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
   __
   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
 __
 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
__
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


Re: [U2] Passing by Value

2012-01-26 Thread Charlie Noah

Hi Mecki,

I remember those 32K limits. I found a way to cheat a bit, though. I 
would split a source program into pieces and INCLUDE the subsequent 
pieces into the first. As long as the object didn't exceed 32K, it 
worked. Ah, those were the days! :-)


Regards,
Charlie Noah

On 01-26-2012 2:54 PM, Mecki Foerthmann wrote:

No, you are completely wrong if you think that is only your world.
Who in our game has the luxury working only with their own code?
I have been doing what you describe for over 25 years now and probably 
most of the contributors here do the same thing for a living too and 
not just since yesterday.
And I may have made that silly mistake once or twice as a junior but 
since then it has become second nature.
And in those days we didn't have the luxury of 8000 line programs 
because the limit for any item was 32K and you were forced to use very 
short variable names and couldn't even indent your code because spaces 
are characters too.
In one shop I worked we used X, Y, Z etc. in 'primary' code and in 
internal subroutines XX, YY, ZZ and so on for loop counters.
I personally prefer more meaningful names but can't do that always 
because I try to follow the naming conventions of the code I'm working 
on.


Even the editor you use is irrelevant since I haven't seen one yet 
that doesn't have a search function.
Just go to the top of the program and search for the variable name you 
intend to use.

If your search comes up negative you're safe to use it.
Simple!

And OTOH how can you make 'rapid changes' to code if you don't 
understand what it is supposed to do and where the varibles come from?


On 26/01/2012 20:16, Wjhonson wrote:

Completely wrong :)
You apparently have the luxury of only working on programs written by 
yourself.


In my world, we are called upon to make rapid changes in programs 
written by twenty programmers over twenty years.
You haven't specified *how* you ensure that your counters are unique, 
and by the way, the issue is not just counters, but any variable.




-Original Message-
From: Mecki Foerthmannmec...@gmx.net
To: u2-usersu2-users@listserver.u2ug.org
Sent: Thu, Jan 26, 2012 12:13 pm
Subject: Re: [U2] Passing by Value


What has the length of the program to do with it?
  always abide to the rule that a for next counter in any internal
ubroutine has to be unique.
hat way even if the sub is called from within a for next loop the
ounters never conflict.
o it doesn't make any difference whatsoever if a program is 80 or 8000
ines long.
BTW a program with 8000 lines is usually a sign of poor design.
On 26/01/2012 19:02, Wjhonson wrote:
  You've never worked on programs that are 8000 lines long I take it :)




  -Original Message-
  From: John Hesterjhes...@momtex.com
  To: U2 Users Listu2-users@listserver.u2ug.org
  Sent: Thu, Jan 26, 2012 10:49 am
  Subject: Re: [U2] Passing by Value


  I like to use increasing roman numerals:
  FOR I = 1 TO COUNTER
GOSUB PROCESS
  EXT I
  PROCESS:
  OR II = 1 TO COUNTER2
FOR III = 1 TO COUNTER3
  FOR IV = 1 TO COUNTER4

  NEXT IV
NEXT III
  EXT II
  ETURN
  -Original Message-
  rom: u2-users-boun...@listserver.u2ug.org
  mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson
  ent: Thursday, January 26, 2012 10:09 AM
  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
  __
  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
__
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

___
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


Re: [U2] Passing by Value

2012-01-26 Thread Charlie Noah

I've had to do it before and it a royal PITA!

On 01-26-2012 2:58 PM, Wjhonson wrote:

Mecki you're not paying attention.
You have an 8000 line program that uses a variable A
You didn't write it.  You need to find where that variable is assigned.
You search for A ?

That's not going to work.



-Original Message-
From: Mecki Foerthmannmec...@gmx.net
To: u2-usersu2-users@listserver.u2ug.org
Sent: Thu, Jan 26, 2012 12:55 pm
Subject: Re: [U2] Passing by Value


No, you are completely wrong if you think that is only your world.
ho in our game has the luxury working only with their own code?
  have been doing what you describe for over 25 years now and probably
ost of the contributors here do the same thing for a living too and not
ust since yesterday.
nd I may have made that silly mistake once or twice as a junior but
ince then it has become second nature.
nd in those days we didn't have the luxury of 8000 line programs
ecause the limit for any item was 32K and you were forced to use very
hort variable names and couldn't even indent your code because spaces
re characters too.
n one shop I worked we used X, Y, Z etc. in 'primary' code and in
nternal subroutines XX, YY, ZZ and so on for loop counters.
  personally prefer more meaningful names but can't do that always
ecause I try to follow the naming conventions of the code I'm working on.
Even the editor you use is irrelevant since I haven't seen one yet that
oesn't have a search function.
ust go to the top of the program and search for the variable name you
ntend to use.
f your search comes up negative you're safe to use it.
imple!
And OTOH how can you make 'rapid changes' to code if you don't
nderstand what it is supposed to do and where the varibles come from?
On 26/01/2012 20:16, Wjhonson wrote:
  Completely wrong :)
  You apparently have the luxury of only working on programs written by
ourself.

  In my world, we are called upon to make rapid changes in programs written by
wenty programmers over twenty years.
  You haven't specified *how* you ensure that your counters are unique, and by
he way, the issue is not just counters, but any variable.



  -Original Message-
  From: Mecki Foerthmannmec...@gmx.net
  To: u2-usersu2-users@listserver.u2ug.org
  Sent: Thu, Jan 26, 2012 12:13 pm
  Subject: Re: [U2] Passing by Value


  What has the length of the program to do with it?
always abide to the rule that a for next counter in any internal
  ubroutine has to be unique.
  hat way even if the sub is called from within a for next loop the
  ounters never conflict.
  o it doesn't make any difference whatsoever if a program is 80 or 8000
  ines long.
  BTW a program with 8000 lines is usually a sign of poor design.
  On 26/01/2012 19:02, Wjhonson wrote:
You've never worked on programs that are 8000 lines long I take it :)




-Original Message-
From: John Hesterjhes...@momtex.com
To: U2 Users Listu2-users@listserver.u2ug.org
Sent: Thu, Jan 26, 2012 10:49 am
Subject: Re: [U2] Passing by Value


I like to use increasing roman numerals:
FOR I = 1 TO COUNTER
  GOSUB PROCESS
EXT I
PROCESS:
OR II = 1 TO COUNTER2
  FOR III = 1 TO COUNTER3
FOR IV = 1 TO COUNTER4

NEXT IV
  NEXT III
EXT II
ETURN
-Original Message-
rom: u2-users-boun...@listserver.u2ug.org
mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson
ent: Thursday, January 26, 2012 10:09 AM
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
__
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
  __
  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
__
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


___
U2-Users mailing list
U2

Re: [U2] Passing by Value

2012-01-26 Thread Wjhonson

500 lines of code
ENTER PROGRAMB

It's magic. No one uses it anymore.



-Original Message-
From: Charlie Noah cwn...@comcast.net
To: U2 Users List u2-users@listserver.u2ug.org
Sent: Thu, Jan 26, 2012 1:01 pm
Subject: Re: [U2] Passing by Value


Hi Mecki,
I remember those 32K limits. I found a way to cheat a bit, though. I 
ould split a source program into pieces and INCLUDE the subsequent 
ieces into the first. As long as the object didn't exceed 32K, it 
orked. Ah, those were the days! :-)
Regards,
harlie Noah
On 01-26-2012 2:54 PM, Mecki Foerthmann wrote:
 No, you are completely wrong if you think that is only your world.
 Who in our game has the luxury working only with their own code?
 I have been doing what you describe for over 25 years now and probably 
 most of the contributors here do the same thing for a living too and 
 not just since yesterday.
 And I may have made that silly mistake once or twice as a junior but 
 since then it has become second nature.
 And in those days we didn't have the luxury of 8000 line programs 
 because the limit for any item was 32K and you were forced to use very 
 short variable names and couldn't even indent your code because spaces 
 are characters too.
 In one shop I worked we used X, Y, Z etc. in 'primary' code and in 
 internal subroutines XX, YY, ZZ and so on for loop counters.
 I personally prefer more meaningful names but can't do that always 
 because I try to follow the naming conventions of the code I'm working 
 on.

 Even the editor you use is irrelevant since I haven't seen one yet 
 that doesn't have a search function.
 Just go to the top of the program and search for the variable name you 
 intend to use.
 If your search comes up negative you're safe to use it.
 Simple!

 And OTOH how can you make 'rapid changes' to code if you don't 
 understand what it is supposed to do and where the varibles come from?

 On 26/01/2012 20:16, Wjhonson wrote:
 Completely wrong :)
 You apparently have the luxury of only working on programs written by 
 yourself.

 In my world, we are called upon to make rapid changes in programs 
 written by twenty programmers over twenty years.
 You haven't specified *how* you ensure that your counters are unique, 
 and by the way, the issue is not just counters, but any variable.



 -Original Message-
 From: Mecki Foerthmannmec...@gmx.net
 To: u2-usersu2-users@listserver.u2ug.org
 Sent: Thu, Jan 26, 2012 12:13 pm
 Subject: Re: [U2] Passing by Value


 What has the length of the program to do with it?
   always abide to the rule that a for next counter in any internal
 ubroutine has to be unique.
 hat way even if the sub is called from within a for next loop the
 ounters never conflict.
 o it doesn't make any difference whatsoever if a program is 80 or 8000
 ines long.
 BTW a program with 8000 lines is usually a sign of poor design.
 On 26/01/2012 19:02, Wjhonson wrote:
   You've never worked on programs that are 8000 lines long I take it :)




   -Original Message-
   From: John Hesterjhes...@momtex.com
   To: U2 Users Listu2-users@listserver.u2ug.org
   Sent: Thu, Jan 26, 2012 10:49 am
   Subject: Re: [U2] Passing by Value


   I like to use increasing roman numerals:
   FOR I = 1 TO COUNTER
 GOSUB PROCESS
   EXT I
   PROCESS:
   OR II = 1 TO COUNTER2
 FOR III = 1 TO COUNTER3
   FOR IV = 1 TO COUNTER4

   NEXT IV
 NEXT III
   EXT II
   ETURN
   -Original Message-
   rom: u2-users-boun...@listserver.u2ug.org
   mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson
   ent: Thursday, January 26, 2012 10:09 AM
   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
   __
   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
 __
 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
 ___
 U2-Users mailing list
 U2-Users@listserver.u2ug.org
 http://listserver.u2ug.org/mailman/listinfo/u2-users

__
2-Users mailing list
2-us...@listserver.u2ug.org
ttp://listserver.u2ug.org

Re: [U2] Passing by Value

2012-01-26 Thread John Hester
One of these searches should eventually work:

L  A=
L  A =
L A=
L A =

Unless the original author used some kind of ridiculous syntaxt like:

A   = 500

Granted, you're also going to get results for any IF/THEN equality tests
in the mix, but you'd have the exact same issue if the variable were
named I.LIKE.TO.USE.VERY.LOOONG.VARIABLE.NAMES.  You might get more
false positives with A if you also have variables like AA, AAA, BA,
etc., but one can only hope any programmer that incompetent would get
fired before they could leave behind too much code like that.

-John

-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 12:59 PM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] Passing by Value


Mecki you're not paying attention.
You have an 8000 line program that uses a variable A
You didn't write it.  You need to find where that variable is assigned.
You search for A ?

That's not going to work.
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] Passing by Value

2012-01-26 Thread Mecki Foerthmann

Are you trying to be funny?
Who in his or her right mind would use 1 letter variables in a 8000 line 
program except maybe as loop counter or as throw away variables?

And you have just explained why that is a stupid idea.
And if you have a program like that?
Tough luck, sounds like hard earned money to me.
Happy hunting.

But I guess I better stop feeding the troll.:-X

On 26/01/2012 20:58, Wjhonson wrote:

Mecki you're not paying attention.
You have an 8000 line program that uses a variable A
You didn't write it.  You need to find where that variable is assigned.
You search for A ?

That's not going to work.



-Original Message-
From: Mecki Foerthmannmec...@gmx.net
To: u2-usersu2-users@listserver.u2ug.org
Sent: Thu, Jan 26, 2012 12:55 pm
Subject: Re: [U2] Passing by Value


No, you are completely wrong if you think that is only your world.
ho in our game has the luxury working only with their own code?
  have been doing what you describe for over 25 years now and probably
ost of the contributors here do the same thing for a living too and not
ust since yesterday.
nd I may have made that silly mistake once or twice as a junior but
ince then it has become second nature.
nd in those days we didn't have the luxury of 8000 line programs
ecause the limit for any item was 32K and you were forced to use very
hort variable names and couldn't even indent your code because spaces
re characters too.
n one shop I worked we used X, Y, Z etc. in 'primary' code and in
nternal subroutines XX, YY, ZZ and so on for loop counters.
  personally prefer more meaningful names but can't do that always
ecause I try to follow the naming conventions of the code I'm working on.
Even the editor you use is irrelevant since I haven't seen one yet that
oesn't have a search function.
ust go to the top of the program and search for the variable name you
ntend to use.
f your search comes up negative you're safe to use it.
imple!
And OTOH how can you make 'rapid changes' to code if you don't
nderstand what it is supposed to do and where the varibles come from?
On 26/01/2012 20:16, Wjhonson wrote:
  Completely wrong :)
  You apparently have the luxury of only working on programs written by
ourself.

  In my world, we are called upon to make rapid changes in programs written by
wenty programmers over twenty years.
  You haven't specified *how* you ensure that your counters are unique, and by
he way, the issue is not just counters, but any variable.



  -Original Message-
  From: Mecki Foerthmannmec...@gmx.net
  To: u2-usersu2-users@listserver.u2ug.org
  Sent: Thu, Jan 26, 2012 12:13 pm
  Subject: Re: [U2] Passing by Value


  What has the length of the program to do with it?
always abide to the rule that a for next counter in any internal
  ubroutine has to be unique.
  hat way even if the sub is called from within a for next loop the
  ounters never conflict.
  o it doesn't make any difference whatsoever if a program is 80 or 8000
  ines long.
  BTW a program with 8000 lines is usually a sign of poor design.
  On 26/01/2012 19:02, Wjhonson wrote:
You've never worked on programs that are 8000 lines long I take it :)




-Original Message-
From: John Hesterjhes...@momtex.com
To: U2 Users Listu2-users@listserver.u2ug.org
Sent: Thu, Jan 26, 2012 10:49 am
Subject: Re: [U2] Passing by Value


I like to use increasing roman numerals:
FOR I = 1 TO COUNTER
  GOSUB PROCESS
EXT I
PROCESS:
OR II = 1 TO COUNTER2
  FOR III = 1 TO COUNTER3
FOR IV = 1 TO COUNTER4

NEXT IV
  NEXT III
EXT II
ETURN
-Original Message-
rom: u2-users-boun...@listserver.u2ug.org
mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson
ent: Thursday, January 26, 2012 10:09 AM
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
__
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
  __
  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
__
2

Re: [U2] Passing by Value

2012-01-26 Thread Wjhonson

I have another solution.  Interesting no one has mentioned it yet.




-Original Message-
From: John Hester jhes...@momtex.com
To: U2 Users List u2-users@listserver.u2ug.org
Sent: Thu, Jan 26, 2012 1:16 pm
Subject: Re: [U2] Passing by Value


One of these searches should eventually work:
L  A=
  A =
 A=
 A =
Unless the original author used some kind of ridiculous syntaxt like:
A   = 500
Granted, you're also going to get results for any IF/THEN equality tests
n the mix, but you'd have the exact same issue if the variable were
amed I.LIKE.TO.USE.VERY.LOOONG.VARIABLE.NAMES.  You might get more
alse positives with A if you also have variables like AA, AAA, BA,
tc., but one can only hope any programmer that incompetent would get
ired before they could leave behind too much code like that.
-John
-Original Message-
rom: u2-users-boun...@listserver.u2ug.org
mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson
ent: Thursday, January 26, 2012 12:59 PM
o: u2-users@listserver.u2ug.org
ubject: Re: [U2] Passing by Value

ecki you're not paying attention.
ou have an 8000 line program that uses a variable A
ou didn't write it.  You need to find where that variable is assigned.
ou search for A ?
That's not going to work.
__
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


Re: [U2] Passing by Value

2012-01-26 Thread Mecki Foerthmann

We used CHAIN on ADDS Mentor to combine 2 or more programs.
Like INCLUDE a real bastard to debug, though.

On 26/01/2012 21:01, Charlie Noah wrote:

Hi Mecki,

I remember those 32K limits. I found a way to cheat a bit, though. I 
would split a source program into pieces and INCLUDE the subsequent 
pieces into the first. As long as the object didn't exceed 32K, it 
worked. Ah, those were the days! :-)


Regards,
Charlie Noah

On 01-26-2012 2:54 PM, Mecki Foerthmann wrote:

No, you are completely wrong if you think that is only your world.
Who in our game has the luxury working only with their own code?
I have been doing what you describe for over 25 years now and 
probably most of the contributors here do the same thing for a living 
too and not just since yesterday.
And I may have made that silly mistake once or twice as a junior but 
since then it has become second nature.
And in those days we didn't have the luxury of 8000 line programs 
because the limit for any item was 32K and you were forced to use 
very short variable names and couldn't even indent your code because 
spaces are characters too.
In one shop I worked we used X, Y, Z etc. in 'primary' code and in 
internal subroutines XX, YY, ZZ and so on for loop counters.
I personally prefer more meaningful names but can't do that always 
because I try to follow the naming conventions of the code I'm 
working on.


Even the editor you use is irrelevant since I haven't seen one yet 
that doesn't have a search function.
Just go to the top of the program and search for the variable name 
you intend to use.

If your search comes up negative you're safe to use it.
Simple!

And OTOH how can you make 'rapid changes' to code if you don't 
understand what it is supposed to do and where the varibles come from?


On 26/01/2012 20:16, Wjhonson wrote:

Completely wrong :)
You apparently have the luxury of only working on programs written 
by yourself.


In my world, we are called upon to make rapid changes in programs 
written by twenty programmers over twenty years.
You haven't specified *how* you ensure that your counters are 
unique, and by the way, the issue is not just counters, but any 
variable.




-Original Message-
From: Mecki Foerthmannmec...@gmx.net
To: u2-usersu2-users@listserver.u2ug.org
Sent: Thu, Jan 26, 2012 12:13 pm
Subject: Re: [U2] Passing by Value


What has the length of the program to do with it?
  always abide to the rule that a for next counter in any internal
ubroutine has to be unique.
hat way even if the sub is called from within a for next loop the
ounters never conflict.
o it doesn't make any difference whatsoever if a program is 80 or 8000
ines long.
BTW a program with 8000 lines is usually a sign of poor design.
On 26/01/2012 19:02, Wjhonson wrote:
  You've never worked on programs that are 8000 lines long I take it :)




  -Original Message-
  From: John Hesterjhes...@momtex.com
  To: U2 Users Listu2-users@listserver.u2ug.org
  Sent: Thu, Jan 26, 2012 10:49 am
  Subject: Re: [U2] Passing by Value


  I like to use increasing roman numerals:
  FOR I = 1 TO COUNTER
GOSUB PROCESS
  EXT I
  PROCESS:
  OR II = 1 TO COUNTER2
FOR III = 1 TO COUNTER3
  FOR IV = 1 TO COUNTER4

  NEXT IV
NEXT III
  EXT II
  ETURN
  -Original Message-
  rom: u2-users-boun...@listserver.u2ug.org
  mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson
  ent: Thursday, January 26, 2012 10:09 AM
  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
  __
  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
__
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

___
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

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


Re: [U2] Passing by Value

2012-01-26 Thread Wjhonson

Unfortunately, we don't all get to choose the environment into which we're 
plopped by the gods.

There are ways to address it, but I'm just not sure the way I use is the best 
one yet.
Still collecting responses.



-Original Message-
From: Mecki Foerthmann mec...@gmx.net
To: u2-users u2-users@listserver.u2ug.org
Sent: Thu, Jan 26, 2012 1:16 pm
Subject: Re: [U2] Passing by Value


Are you trying to be funny?
ho in his or her right mind would use 1 letter variables in a 8000 line 
rogram except maybe as loop counter or as throw away variables?
nd you have just explained why that is a stupid idea.
nd if you have a program like that?
ough luck, sounds like hard earned money to me.
appy hunting.
But I guess I better stop feeding the troll.:-X
On 26/01/2012 20:58, Wjhonson wrote:
 Mecki you're not paying attention.
 You have an 8000 line program that uses a variable A
 You didn't write it.  You need to find where that variable is assigned.
 You search for A ?

 That's not going to work.



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


Re: [U2] Passing by Value

2012-01-26 Thread u2ug
BASIC -X  !!!

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

One of these searches should eventually work:

L  A=
L  A =
L A=
L A =

Unless the original author used some kind of ridiculous syntaxt like:

A   = 500

Granted, you're also going to get results for any IF/THEN equality tests
in the mix, but you'd have the exact same issue if the variable were
named I.LIKE.TO.USE.VERY.LOOONG.VARIABLE.NAMES.  You might get more
false positives with A if you also have variables like AA, AAA, BA,
etc., but one can only hope any programmer that incompetent would get
fired before they could leave behind too much code like that.

-John

-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 12:59 PM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] Passing by Value


Mecki you're not paying attention.
You have an 8000 line program that uses a variable A
You didn't write it.  You need to find where that variable is assigned.
You search for A ?

That's not going to work.
___
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


Re: [U2] Passing by Value

2012-01-26 Thread Mecki Foerthmann

What does -X do?
I'd probably compile it with -Z2, run the program in debug and put a 
trace on A.


On 26/01/2012 21:22, u2ug wrote:

BASIC -X  !!!

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

One of these searches should eventually work:

L  A=
L  A =
L A=
L A =

Unless the original author used some kind of ridiculous syntaxt like:

A   = 500

Granted, you're also going to get results for any IF/THEN equality tests
in the mix, but you'd have the exact same issue if the variable were
named I.LIKE.TO.USE.VERY.LOOONG.VARIABLE.NAMES.  You might get more
false positives with A if you also have variables like AA, AAA, BA,
etc., but one can only hope any programmer that incompetent would get
fired before they could leave behind too much code like that.

-John

-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 12:59 PM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] Passing by Value


Mecki you're not paying attention.
You have an 8000 line program that uses a variable A
You didn't write it.  You need to find where that variable is assigned.
You search for A ?

That's not going to work.
___
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

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


Re: [U2] Passing by Value

2012-01-26 Thread Doug Averch
This is exactly the reason we created a outline in our Eclipse editor.
 When you click on the variable like A you would see:
A
-- Line 33
-- Line 34
-- Line 53
-- Line 571
-- Line 820

Regards,
Doug
www.u2logic.com

Then you can click on each line to see what those lines are doing with that
variable.  So when we are looking at a program written by a long since gone
company, we can see if the variable is just referenced or updated.

On Thu, Jan 26, 2012 at 1:58 PM, Wjhonson wjhon...@aol.com wrote:


 Mecki you're not paying attention.
 You have an 8000 line program that uses a variable A
 You didn't write it.  You need to find where that variable is assigned.
 You search for A ?

 That's not going to work.



 -Original Message-
 From: Mecki Foerthmann mec...@gmx.net
 To: u2-users u2-users@listserver.u2ug.org
 Sent: Thu, Jan 26, 2012 12:55 pm
 Subject: Re: [U2] Passing by Value


 No, you are completely wrong if you think that is only your world.
 ho in our game has the luxury working only with their own code?
  have been doing what you describe for over 25 years now and probably
 ost of the contributors here do the same thing for a living too and not
 ust since yesterday.
 nd I may have made that silly mistake once or twice as a junior but
 ince then it has become second nature.
 nd in those days we didn't have the luxury of 8000 line programs
 ecause the limit for any item was 32K and you were forced to use very
 hort variable names and couldn't even indent your code because spaces
 re characters too.
 n one shop I worked we used X, Y, Z etc. in 'primary' code and in
 nternal subroutines XX, YY, ZZ and so on for loop counters.
  personally prefer more meaningful names but can't do that always
 ecause I try to follow the naming conventions of the code I'm working on.
 Even the editor you use is irrelevant since I haven't seen one yet that
 oesn't have a search function.
 ust go to the top of the program and search for the variable name you
 ntend to use.
 f your search comes up negative you're safe to use it.
 imple!
 And OTOH how can you make 'rapid changes' to code if you don't
 nderstand what it is supposed to do and where the varibles come from?
 On 26/01/2012 20:16, Wjhonson wrote:
  Completely wrong :)
  You apparently have the luxury of only working on programs written by
 ourself.

  In my world, we are called upon to make rapid changes in programs written
 by
 wenty programmers over twenty years.
  You haven't specified *how* you ensure that your counters are unique, and
 by
 he way, the issue is not just counters, but any variable.



  -Original Message-
  From: Mecki Foerthmannmec...@gmx.net
  To: u2-usersu2-users@listserver.u2ug.org
  Sent: Thu, Jan 26, 2012 12:13 pm
  Subject: Re: [U2] Passing by Value


  What has the length of the program to do with it?
   always abide to the rule that a for next counter in any internal
  ubroutine has to be unique.
  hat way even if the sub is called from within a for next loop the
  ounters never conflict.
  o it doesn't make any difference whatsoever if a program is 80 or 8000
  ines long.
  BTW a program with 8000 lines is usually a sign of poor design.
  On 26/01/2012 19:02, Wjhonson wrote:
   You've never worked on programs that are 8000 lines long I take it :)




   -Original Message-
   From: John Hesterjhes...@momtex.com
   To: U2 Users Listu2-users@listserver.u2ug.org
   Sent: Thu, Jan 26, 2012 10:49 am
   Subject: Re: [U2] Passing by Value


   I like to use increasing roman numerals:
   FOR I = 1 TO COUNTER
 GOSUB PROCESS
   EXT I
   PROCESS:
   OR II = 1 TO COUNTER2
 FOR III = 1 TO COUNTER3
   FOR IV = 1 TO COUNTER4

   NEXT IV
 NEXT III
   EXT II
   ETURN
   -Original Message-
   rom: u2-users-boun...@listserver.u2ug.org
   mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson
   ent: Thursday, January 26, 2012 10:09 AM
   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
   __
   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
  __
  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

Re: [U2] Passing by Value

2012-01-26 Thread Mecki Foerthmann

Not to mention L ;A= and L ;A =

On 26/01/2012 21:15, John Hester wrote:

One of these searches should eventually work:

L  A=
L  A =
L A=
L A =

Unless the original author used some kind of ridiculous syntaxt like:

A   = 500

Granted, you're also going to get results for any IF/THEN equality tests
in the mix, but you'd have the exact same issue if the variable were
named I.LIKE.TO.USE.VERY.LOOONG.VARIABLE.NAMES.  You might get more
false positives with A if you also have variables like AA, AAA, BA,
etc., but one can only hope any programmer that incompetent would get
fired before they could leave behind too much code like that.

-John

-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 12:59 PM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] Passing by Value


Mecki you're not paying attention.
You have an 8000 line program that uses a variable A
You didn't write it.  You need to find where that variable is assigned.
You search for A ?

That's not going to work.
___
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


Re: [U2] Passing by Value

2012-01-26 Thread Doug Averch
I posted a partial copy of a program written many 25 years ago that we
still maintain with a wonderful variables named like BIT.  Not sure what it
does except you set it zero or one and it referenced all over the place.
 This program has other gems like ATT which are screen positions
and plethora of GOTO's and their labels:  Enjoy:
http://www.u2logic.com/images1/XLr8EditorOutline.jpg

Regards,
Doug
www.u2logic.com

On Thu, Jan 26, 2012 at 2:56 PM, Mecki Foerthmann mec...@gmx.net wrote:

 Not to mention L ;A= and L ;A =
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] Passing by Value

2012-01-26 Thread Wjhonson
Line 1154 will never be hit.







-Original Message-
From: Doug Averch dave...@gmail.com
To: U2 Users List u2-users@listserver.u2ug.org
Sent: Thu, Jan 26, 2012 2:11 pm
Subject: Re: [U2] Passing by Value


I posted a partial copy of a program written many 25 years ago that we
till maintain with a wonderful variables named like BIT.  Not sure what it
oes except you set it zero or one and it referenced all over the place.
This program has other gems like ATT which are screen positions
nd plethora of GOTO's and their labels:  Enjoy:
ttp://www.u2logic.com/images1/XLr8EditorOutline.jpg
Regards,
oug
ww.u2logic.com
On Thu, Jan 26, 2012 at 2:56 PM, Mecki Foerthmann mec...@gmx.net wrote:
 Not to mention L ;A= and L ;A =
__
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


Re: [U2] Passing by Value

2012-01-26 Thread u2ug
It generates a variable cross reference listing which gives you a list
of all variables and labels in your program along with and the lines on
which they are referenced in your program, I believe it even identifies
lines where the variables are assigned to ( as opposed to just being
referenced )

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

What does -X do?
I'd probably compile it with -Z2, run the program in debug and put a 
trace on A.

On 26/01/2012 21:22, u2ug wrote:
 BASIC -X  !!!

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

 One of these searches should eventually work:

 L  A=
 L  A =
 L A=
 L A =

 Unless the original author used some kind of ridiculous syntaxt like:

 A   = 500

 Granted, you're also going to get results for any IF/THEN equality
tests
 in the mix, but you'd have the exact same issue if the variable were
 named I.LIKE.TO.USE.VERY.LOOONG.VARIABLE.NAMES.  You might get more
 false positives with A if you also have variables like AA, AAA, BA,
 etc., but one can only hope any programmer that incompetent would get
 fired before they could leave behind too much code like that.

 -John

 -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 12:59 PM
 To: u2-users@listserver.u2ug.org
 Subject: Re: [U2] Passing by Value


 Mecki you're not paying attention.
 You have an 8000 line program that uses a variable A
 You didn't write it.  You need to find where that variable is
assigned.
 You search for A ?

 That's not going to work.
 ___
 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
___
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


Re: [U2] Passing by Value

2012-01-26 Thread John Hester
We still maintain some AR code written in 1979 which I will put up
against anything as one of the best examples of a poorly written
maintenance minefield.  Here's a snippet:

0150: 100:  Z=1
0151:   CALL INPUT.VERIFY(Q,PCD(1))
0152: 110:  IF Q='' THEN
0153:  IF CUST='END' THEN RETURN
0154:  Q=CUST
0155:   END
0156:   IF Q='END' THEN RETURN
0157:   IF LEN(Q) = '11' THEN
0158:  READV Q FROM FILE.SI,Q,1 ELSE NULL
0159:   END
0160: *
0161: * 
0162: * Added locked clause for CR read
0163: *
0164: * READU CR.ITEM FROM FILE.CR, Q ELSE
0165: 115: *
0166:   READU CR.ITEM FROM FILE.CR, Q LOCKED
0167:  CALL PGMDP0940('AR1245','CR',Q,FILE.CR) ; GO 115
0168:   END ELSE
0169:  RELEASE FILE.CR, Q
0170:  LOCATE(Q,EXCEPTIONS;POSN) ELSE
0171: IF NUM(Q) THEN INPUTCLEAR ; PRINTERR CHAR(7):Q:ERR(13)
; GO 100
0172: LENGTH=3
0173: AMC=CR$S.NM
0174: K=CR$ADDR1
0175: CALL PGMAR3245(K,X)
0176: CUST='' ; SAVE.NAME='' ; CR.ITEM=''
0177: GOSUB 9
0178: IF Q='END' OR Q='' THEN GO 100
0179: GO 110
0180:  END
0181:  GOSUB 99900
0182:  GO 100
0183:   END
0184:   RELEASE FILE.CR, Q

Need to figure out where Q, Z, X, or K get assigned or what they're for?
No need to bother.  They get used over and over again throughout 5
different subroutines and never for the same thing twice.  The original
author dared to sign his name at the top of the code, but I'm too nice a
guy to post it.  Hopefully he got out of the business long ago.
Fortunately these 5 were the only programs on our system he wrote.

-John

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

I posted a partial copy of a program written many 25 years ago that we
still maintain with a wonderful variables named like BIT.  Not sure what
it does except you set it zero or one and it referenced all over the
place.
 This program has other gems like ATT which are screen positions and
plethora of GOTO's and their labels:  Enjoy:
http://www.u2logic.com/images1/XLr8EditorOutline.jpg

Regards,
Doug
www.u2logic.com

On Thu, Jan 26, 2012 at 2:56 PM, Mecki Foerthmann mec...@gmx.net
wrote:

 Not to mention L ;A= and L ;A =
___
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


Re: [U2] Passing by Value

2012-01-26 Thread Wjhonson





No RETURN TOs !!!
So I think you'd get beat.




-Original Message-
From: John Hester jhes...@momtex.com
To: U2 Users List u2-users@listserver.u2ug.org
Sent: Thu, Jan 26, 2012 2:56 pm
Subject: Re: [U2] Passing by Value


We still maintain some AR code written in 1979 which I will put up
gainst anything as one of the best examples of a poorly written
aintenance minefield.  Here's a snippet:
0150: 100:  Z=1
151:   CALL INPUT.VERIFY(Q,PCD(1))
152: 110:  IF Q='' THEN
153:  IF CUST='END' THEN RETURN
154:  Q=CUST
155:   END
156:   IF Q='END' THEN RETURN
157:   IF LEN(Q) = '11' THEN
158:  READV Q FROM FILE.SI,Q,1 ELSE NULL
159:   END
160: *
161: * 
162: * Added locked clause for CR read
163: *
164: * READU CR.ITEM FROM FILE.CR, Q ELSE
165: 115: *
166:   READU CR.ITEM FROM FILE.CR, Q LOCKED
167:  CALL PGMDP0940('AR1245','CR',Q,FILE.CR) ; GO 115
168:   END ELSE
169:  RELEASE FILE.CR, Q
170:  LOCATE(Q,EXCEPTIONS;POSN) ELSE
171: IF NUM(Q) THEN INPUTCLEAR ; PRINTERR CHAR(7):Q:ERR(13)
 GO 100
172: LENGTH=3
173: AMC=CR$S.NM
174: K=CR$ADDR1
175: CALL PGMAR3245(K,X)
176: CUST='' ; SAVE.NAME='' ; CR.ITEM=''
177: GOSUB 9
178: IF Q='END' OR Q='' THEN GO 100
179: GO 110
180:  END
181:  GOSUB 99900
182:  GO 100
183:   END
184:   RELEASE FILE.CR, Q
Need to figure out where Q, Z, X, or K get assigned or what they're for?
o need to bother.  They get used over and over again throughout 5
ifferent subroutines and never for the same thing twice.  The original
uthor dared to sign his name at the top of the code, but I'm too nice a
uy to post it.  Hopefully he got out of the business long ago.
ortunately these 5 were the only programs on our system he wrote.
-John
-Original Message-
rom: u2-users-boun...@listserver.u2ug.org
mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Doug Averch
ent: Thursday, January 26, 2012 2:12 PM
o: U2 Users List
ubject: Re: [U2] Passing by Value
I posted a partial copy of a program written many 25 years ago that we
till maintain with a wonderful variables named like BIT.  Not sure what
t does except you set it zero or one and it referenced all over the
lace.
This program has other gems like ATT which are screen positions and
lethora of GOTO's and their labels:  Enjoy:
ttp://www.u2logic.com/images1/XLr8EditorOutline.jpg
Regards,
oug
ww.u2logic.com
On Thu, Jan 26, 2012 at 2:56 PM, Mecki Foerthmann mec...@gmx.net
rote:
 Not to mention L ;A= and L ;A =
__
2-Users mailing list
2-us...@listserver.u2ug.org
ttp://listserver.u2ug.org/mailman/listinfo/u2-users
__
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


Re: [U2] Passing by Value

2012-01-26 Thread Richard A. Wilson

I think that code started out in Either Bellevue or Denver right?

any calls to the PCD (prompt control definition)

yep, still supporting and actively enhancing for a couple of clients

Rich

John Hester wrote:

We still maintain some AR code written in 1979 which I will put up
against anything as one of the best examples of a poorly written
maintenance minefield.  Here's a snippet:

0150: 100:  Z=1
0151:   CALL INPUT.VERIFY(Q,PCD(1))
0152: 110:  IF Q='' THEN
0153:  IF CUST='END' THEN RETURN
0154:  Q=CUST
0155:   END
0156:   IF Q='END' THEN RETURN
0157:   IF LEN(Q) = '11' THEN
0158:  READV Q FROM FILE.SI,Q,1 ELSE NULL
0159:   END
0160: *
0161: * 
0162: * Added locked clause for CR read

0163: *
0164: * READU CR.ITEM FROM FILE.CR, Q ELSE
0165: 115: *
0166:   READU CR.ITEM FROM FILE.CR, Q LOCKED
0167:  CALL PGMDP0940('AR1245','CR',Q,FILE.CR) ; GO 115
0168:   END ELSE
0169:  RELEASE FILE.CR, Q
0170:  LOCATE(Q,EXCEPTIONS;POSN) ELSE
0171: IF NUM(Q) THEN INPUTCLEAR ; PRINTERR CHAR(7):Q:ERR(13)
; GO 100
0172: LENGTH=3
0173: AMC=CR$S.NM
0174: K=CR$ADDR1
0175: CALL PGMAR3245(K,X)
0176: CUST='' ; SAVE.NAME='' ; CR.ITEM=''
0177: GOSUB 9
0178: IF Q='END' OR Q='' THEN GO 100
0179: GO 110
0180:  END
0181:  GOSUB 99900
0182:  GO 100
0183:   END
0184:   RELEASE FILE.CR, Q

Need to figure out where Q, Z, X, or K get assigned or what they're for?
No need to bother.  They get used over and over again throughout 5
different subroutines and never for the same thing twice.  The original
author dared to sign his name at the top of the code, but I'm too nice a
guy to post it.  Hopefully he got out of the business long ago.
Fortunately these 5 were the only programs on our system he wrote.

-John

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

I posted a partial copy of a program written many 25 years ago that we
still maintain with a wonderful variables named like BIT.  Not sure what
it does except you set it zero or one and it referenced all over the
place.
 This program has other gems like ATT which are screen positions and
plethora of GOTO's and their labels:  Enjoy:
http://www.u2logic.com/images1/XLr8EditorOutline.jpg

Regards,
Doug
www.u2logic.com

On Thu, Jan 26, 2012 at 2:56 PM, Mecki Foerthmann mec...@gmx.net
wrote:

  

Not to mention L ;A= and L ;A =


___
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

  


--
Richard A Wilson
Lakeside Systems
Smithfield, RI, USA
Voice 401-231-3959
Fax   206-202-2064

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


Re: [U2] Passing by Value

2012-01-26 Thread John Hester
Wow, you're right.  I'm guessing Bellevue.  We used to be a division of
big conglomerate and inherited a lot of their legacy code.

-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Richard A.
Wilson
Sent: Thursday, January 26, 2012 3:03 PM
To: U2 Users List
Subject: Re: [U2] Passing by Value

I think that code started out in Either Bellevue or Denver right?

any calls to the PCD (prompt control definition)

yep, still supporting and actively enhancing for a couple of clients

Rich

John Hester wrote:
 We still maintain some AR code written in 1979 which I will put up 
 against anything as one of the best examples of a poorly written 
 maintenance minefield.  Here's a snippet:

 0150: 100:  Z=1
 0151:   CALL INPUT.VERIFY(Q,PCD(1))
 0152: 110:  IF Q='' THEN
 0153:  IF CUST='END' THEN RETURN
 0154:  Q=CUST
 0155:   END
 0156:   IF Q='END' THEN RETURN
 0157:   IF LEN(Q) = '11' THEN
 0158:  READV Q FROM FILE.SI,Q,1 ELSE NULL
 0159:   END
 0160: *
 0161: *
 0162: * Added locked clause for CR read
 0163: *
 0164: * READU CR.ITEM FROM FILE.CR, Q ELSE
 0165: 115: *
 0166:   READU CR.ITEM FROM FILE.CR, Q LOCKED
 0167:  CALL PGMDP0940('AR1245','CR',Q,FILE.CR) ; GO 115
 0168:   END ELSE
 0169:  RELEASE FILE.CR, Q
 0170:  LOCATE(Q,EXCEPTIONS;POSN) ELSE
 0171: IF NUM(Q) THEN INPUTCLEAR ; PRINTERR
CHAR(7):Q:ERR(13)
 ; GO 100
 0172: LENGTH=3
 0173: AMC=CR$S.NM
 0174: K=CR$ADDR1
 0175: CALL PGMAR3245(K,X)
 0176: CUST='' ; SAVE.NAME='' ; CR.ITEM=''
 0177: GOSUB 9
 0178: IF Q='END' OR Q='' THEN GO 100
 0179: GO 110
 0180:  END
 0181:  GOSUB 99900
 0182:  GO 100
 0183:   END
 0184:   RELEASE FILE.CR, Q

 Need to figure out where Q, Z, X, or K get assigned or what they're
for?
 No need to bother.  They get used over and over again throughout 5 
 different subroutines and never for the same thing twice.  The 
 original author dared to sign his name at the top of the code, but I'm

 too nice a guy to post it.  Hopefully he got out of the business long
ago.
 Fortunately these 5 were the only programs on our system he wrote.

 -John

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

 I posted a partial copy of a program written many 25 years ago that we

 still maintain with a wonderful variables named like BIT.  Not sure 
 what it does except you set it zero or one and it referenced all over 
 the place.
  This program has other gems like ATT which are screen positions and 
 plethora of GOTO's and their labels:  Enjoy:
 http://www.u2logic.com/images1/XLr8EditorOutline.jpg

 Regards,
 Doug
 www.u2logic.com

 On Thu, Jan 26, 2012 at 2:56 PM, Mecki Foerthmann mec...@gmx.net
 wrote:

   
 Not to mention L ;A= and L ;A =
 
 ___
 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

   

--
Richard A Wilson
Lakeside Systems
Smithfield, RI, USA
Voice 401-231-3959
Fax   206-202-2064

___
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


Re: [U2] Passing by Value

2012-01-26 Thread Richard A. Wilson

Probably Escom MRP or one of the offshoots

and yes back then 32k was an issue Q stands for Question

:-)  Ricy

John Hester wrote:

Wow, you're right.  I'm guessing Bellevue.  We used to be a division of
big conglomerate and inherited a lot of their legacy code.

-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Richard A.
Wilson
Sent: Thursday, January 26, 2012 3:03 PM
To: U2 Users List
Subject: Re: [U2] Passing by Value

I think that code started out in Either Bellevue or Denver right?

any calls to the PCD (prompt control definition)

yep, still supporting and actively enhancing for a couple of clients

Rich

John Hester wrote:
  
We still maintain some AR code written in 1979 which I will put up 
against anything as one of the best examples of a poorly written 
maintenance minefield.  Here's a snippet:


0150: 100:  Z=1
0151:   CALL INPUT.VERIFY(Q,PCD(1))
0152: 110:  IF Q='' THEN
0153:  IF CUST='END' THEN RETURN
0154:  Q=CUST
0155:   END
0156:   IF Q='END' THEN RETURN
0157:   IF LEN(Q) = '11' THEN
0158:  READV Q FROM FILE.SI,Q,1 ELSE NULL
0159:   END
0160: *
0161: *
0162: * Added locked clause for CR read
0163: *
0164: * READU CR.ITEM FROM FILE.CR, Q ELSE
0165: 115: *
0166:   READU CR.ITEM FROM FILE.CR, Q LOCKED
0167:  CALL PGMDP0940('AR1245','CR',Q,FILE.CR) ; GO 115
0168:   END ELSE
0169:  RELEASE FILE.CR, Q
0170:  LOCATE(Q,EXCEPTIONS;POSN) ELSE
0171: IF NUM(Q) THEN INPUTCLEAR ; PRINTERR


CHAR(7):Q:ERR(13)
  

; GO 100
0172: LENGTH=3
0173: AMC=CR$S.NM
0174: K=CR$ADDR1
0175: CALL PGMAR3245(K,X)
0176: CUST='' ; SAVE.NAME='' ; CR.ITEM=''
0177: GOSUB 9
0178: IF Q='END' OR Q='' THEN GO 100
0179: GO 110
0180:  END
0181:  GOSUB 99900
0182:  GO 100
0183:   END
0184:   RELEASE FILE.CR, Q

Need to figure out where Q, Z, X, or K get assigned or what they're


for?
  
No need to bother.  They get used over and over again throughout 5 
different subroutines and never for the same thing twice.  The 
original author dared to sign his name at the top of the code, but I'm



  

too nice a guy to post it.  Hopefully he got out of the business long


ago.
  

Fortunately these 5 were the only programs on our system he wrote.

-John

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

I posted a partial copy of a program written many 25 years ago that we



  
still maintain with a wonderful variables named like BIT.  Not sure 
what it does except you set it zero or one and it referenced all over 
the place.
 This program has other gems like ATT which are screen positions and 
plethora of GOTO's and their labels:  Enjoy:

http://www.u2logic.com/images1/XLr8EditorOutline.jpg

Regards,
Doug
www.u2logic.com

On Thu, Jan 26, 2012 at 2:56 PM, Mecki Foerthmann mec...@gmx.net
wrote:

  


Not to mention L ;A= and L ;A =

  

___
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

  



--
Richard A Wilson
Lakeside Systems
Smithfield, RI, USA
Voice 401-231-3959
Fax   206-202-2064

___
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

  


--
Richard A Wilson
Lakeside Systems
Smithfield, RI, USA
Voice 401-231-3959
Fax   206-202-2064

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