I will still stand by my statement.

I have seen code written as the top level program, where a STOP or RETURN would 
both terminate the program cleanly.  But later, a "big brother" program gets 
written that will then need to CALL the original program.  If the original 
subroutine was written with a STOP, the new parent program just got killed too.

This could be the sort of thing where you write a bunch of nightly jobs, but 
later decide you want a single controlling program/subroutine to manage them 
all.

I am not saying I never use STOP.  Far from it.  I use STOP all the time.  I 
was simply saying RETURN works to terminate the top level process.  If RETURN 
no longer works that way with jBase, I have to ask: is that a bug or a feature?

As always, your mileage may vary.

John Israel
Sr. Programmer/Analyst
Dayton Superior Corporation
721 Richard St.
Dayton, OH  45342
937-866-0711 x44380
-----Original Message-----
From: [email protected] 
[mailto:[email protected]] On Behalf Of Charlie Noah
Sent: Sunday, July 19, 2009 10:11 AM
To: U2 Users List
Subject: Re: [U2] UV and triggers

John,

I can't believe you're recommending this. The only reason Universe 
treats a RETURN as a STOP in a top-level program is that Universe tries 
to be everything to everyone, forgiving mistakes and blunders, and 
trying to determine what the user really wanted, no matter how badly the 
code is written. In 1998, we converted from Universe to Jbase, and you 
can't imagine all the problems we had fixing bad Universe code that 
worked (sort of) so that it would work in a system that requires you to 
do things correctly. When coding and breaking rules, you have to 
consider that the code may be migrated someday. This is a case of "just 
because you can, doesn't mean you should".

I'm not talking about using the strengths of your particular 
implementation even though they are unique to your implementation, just 
doing dumb things that will bite you (or your predecessor) down the road.

Just my 2 cents worth.

Regards,
Charlie Noah
Inland Truck Parts Company

On 7/13/2009 10:25 AM, Israel, John R. wrote:
> It has been my experience that you can RETURN out any program or subroutine.  
> If it is the top-level code, it simply stops.  If it was called, it simply 
> returns back to the calling routine. 
>
> John Israel
> Sr. Programmer/Analyst
> Dayton Superior Corporation
> 721 Richard St.
> Dayton, OH  45342
> 937-866-0711 x44380
>
> -----Original Message-----
> From: [email protected] 
> [mailto:[email protected]] On Behalf Of George Gallen
> Sent: Monday, July 13, 2009 11:21 AM
> To: U2 Users List
> Subject: Re: [U2] UV and triggers (ERROR -4)
>
> I can't believe it was that!
> Yes, putting in the RETURN cleared up the error.
>
> Thanks
> George
>
>   
>> -----Original Message-----
>> From: [email protected] [mailto:u2-users-
>> [email protected]] On Behalf Of Israel, John R.
>> Sent: Monday, July 13, 2009 11:04 AM
>> To: 'U2 Users List'
>> Subject: Re: [U2] UV and triggers (ERROR -4)
>>
>> Since it's a subroutine, shouldn't you RETURN to get out, not STOP?
>>
>> John Israel
>> Sr. Programmer/Analyst
>> Dayton Superior Corporation
>> 721 Richard St.
>> Dayton, OH  45342
>> 937-866-0711 x44380
>>
>>     
> _______________________________________________
> U2-Users mailing list
> [email protected]
> http://listserver.u2ug.org/mailman/listinfo/u2-users
>
> _______________________________________________
> U2-Users mailing list
> [email protected]
> http://listserver.u2ug.org/mailman/listinfo/u2-users
>
>   
_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users

_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users

Reply via email to