Oops. I blame fat fingers and an iPhone !!!

---------------------------------
Simon Verona
Director
Dealer Management Services Ltd

Sent from my iPhone

On 3 Mar 2009, at 18:05, "Mark Hogden" <[email protected]> wrote:

>
> Oh so you're the one.
>
> Did you 'debut' ALTER in COBOL as well ?
>
>
>
> -----Original Message-----
> From: [email protected] [mailto:[email protected]] On  
> Behalf Of
> Simon Verona
> Sent: Tuesday, March 03, 2009 9:54 AM
> To: [email protected]
> Subject: Re: Jbase programming query
>
>
> I think it's a case of "you're fired " if you use return to !!!
>
> I can only agree having had to historically debut code with lots of
> return to's in!
>
> Simon
>
> ---------------------------------
> Simon Verona
> Director
> Dealer Management Services Ltd
>
> Sent from my iPhone
>
> On 3 Mar 2009, at 17:38, Richard Kann <[email protected]> wrote:
>
>> You said:
>> Never, ever, ever, ever, ever, ever, ever, ever,ever, ever, ever,
>> ever,ever,ever, use RETURN TO. That's ever, ever, ever, ever, ever,
>> ever, ever, ever, ever, ever, ever, ever, ever, ever, ever, ever,
>> ever,
>> ever, ever, ever, ever, ever, ever, ever, ever ad infinitum.
>> But how do you REALLY feel about it Jim?
>>
>> Richard Kann
>> Comp-Ware Systems, Inc.
>>
>> Jim Idle wrote:
>>>
>>> Dhaya wrote:
>>>
>>>> Hi
>>>>
>>>>  I am using jbase 4.1 release with T24. I have a query regarding
>>>> the
>>>> usage of 'recursive return" statement
>>>>  in Jbase programming language. I understood we can recursive
>>>> return
>>>> to come out of subroutine to calling program. I have a requirement
>>>> where when  the recursive return is executed, program control  
>>>> should
>>>> not come out
>>>> the subroutine used. It is that is there any way to code such as
>>>>
>>>>  PROGRAM.ABORT:
>>>>
>>>>    RETURN TO (PROGRAM.ABORT - 1)
>>>>
>>>> Because, i want this recursivee return to be executed 1 level down.
>>>> Can i use (PROGRAM.ABORT - 1) in jbasic
>>>> or Is there any alternate way to use.
>>>>
>>>>
>>> Never, ever, ever, ever, ever, ever, ever, ever,ever, ever, ever,
>>> ever,ever,ever, use RETURN TO. That's ever, ever, ever, ever, ever,
>>> ever, ever, ever, ever, ever, ever, ever, ever, ever, ever, ever,
>>> ever,
>>> ever, ever, ever, ever, ever, ever, ever, ever ad infinitum.
>>>
>>> For a start you will never debug it. Wanting to do this is a sign
>>> that
>>> your design is very wrong.
>>>
>>> jBC is a compiled language, therefore the line numbers have no
>>> meaning
>>> except in the debugger. There are some compiled languages that
>>> annotate
>>> lines but they are compiling broken languages.
>>>
>>> The reason that you are wanting to do this is either that you have
>>> used
>>> GOTO elsewhere in this program, or that you have called nested
>>> subroutines, discovered an error and now want to back out of all the
>>> GOSUBs until you can  return from the subroutine. Either way, it
>>> means
>>> that you need to redesign your subroutine. Each GOSUB should check  
>>> an
>>> error return and back out accordingly. This type of thing is why  
>>> more
>>> modern languages have exceptions that can cascade back up the chain
>>> and
>>> be caught at an appropriate point. However jBC does not have this
>>> functionality so you must program accordingly.
>>>
>>> Now, personally, I think that the language should have had separate
>>> notation for subroutine vs gosub return, but it doesn't, so you are
>>> stuck with it. Review your design here - when you have to ask how
>>> to do
>>> something like this, it means the program is broken.
>>>
>>> Jim
>>>
>>>
>>>
>>>
>>>
>>
>>>
>
>
>
> >

--~--~---------~--~----~------------~-------~--~----~
Please read the posting guidelines at: 
http://groups.google.com/group/jBASE/web/Posting%20Guidelines

IMPORTANT: Type T24: at the start of the subject line for questions specific to 
Globus/T24

To post, send email to [email protected]
To unsubscribe, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/jBASE?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to