Return without a gosub

Robert T. Repko (R Squared Consultants) rtr at rsquared.com
Wed Mar 2 05:04:32 PST 2011


Believe it or not at 3/1/2011 10:46 PM, Richard Kreiss said:
>I have a routine that is activated by @keyA.
>
>It does some lookup before initiating the main portion of the routine with a
>gosub.
>
>The program executes a popup update-,"pop_memo",ad;clearP;clears;GOTO f_stat
>
>Once the screen opens with dummy fields, @wefad, @wlfad, at wefae and @wlfad
>occur.
>
>When the processing for the 2 fields ends, there is an input popup y, to
>confirm if the information entered is correct.  The information is then
>posted.
>
>The program hits a save and then executes the balance of the popup update
>line.  This ends with the GOTO f_stat.  (22 line of code)
>
>1350: if:@keyA
>   Then: Return
>
>Here is the point my client called this afternoon saying he got a return
>with no gosub.
>
>Question: how many lines of code with some gotos before filePro loses track
>of a label used on the if line.
>
>I have tested this routine a number of time before today and have never
>gotten this error.
>
>This routine starts at line 346 and executes the GOSUB at line 360. The
>subroutine starts at 1324 and ends at 1350.
>
>The reason for the return here is that this same routine for adding a
>comment is also used from a browse lookup using @bk="A"
>
>
>Richard Kreiss
>GCC Consulting
>rkreiss at gccconsulting.net
>

It sounds as though you have a routine that is entered using goto and 
is also entered using gosub:

'The reason for the return here is that this same routine for adding a
comment is also used from a browse lookup using @bk="A"'

If that's the case then you would have to set a flag so you either 
'end' or 'return' based on how you entered the routine.


***************************
* Robert T. Repko         *
* R Squared Consultants   *
* 4 Juniper Ave.          *
* Easton, PA 18045        *
* (610) 360-1117 (mobile) *
* (610) 253-0725 (fax)    *
*************************** 



More information about the Filepro-list mailing list