FW: Silly GOSUB question

Richard Kreiss rkreiss at gccconsulting.net
Wed Sep 16 12:33:51 PDT 2020



-----Original Message-----
From: Bruce Easton <bruce at stnincmd.com> 
Sent: Wednesday, September 16, 2020 11:52 AM
To: Jay R. Ashworth <jra at baylink.com>
Cc: Scott Walker <ScottWalker at RAMSystemsCorp.com>; Richard Kreiss <rkreiss at gccconsulting.net>; Fairlight <fairlite at fairlite.com>
Subject: Re: Silly GOSUB question

It appears I'm being blocked from the forum.  Hopefully this will reach someone.  Perhaps someone can share my reply there.
:)  --Bruce

"if I "screen ,0" from inside a THEN line, when I SAVE, do I come back . . . " ??

This should be your primary concern since any use, whether involving bad coding practices or not, are subject to some basic rules that answer this question.

I went to take a look at what the online manual has to say about the screen command. It describes the behavior in terms of whether or not the screen command is encountered in "input" processing" or @key processing, it behaves differently than when it's encountered in @wef or @wlf processing.  (There's also a statement "@WLF and @WEF processing are not considered Input processing".  How strange.)

But that manual entry does generally lead you in the right direction.

Upon saving*,  when encountered within any kind of when-field processing (@w?f), the screen command sets the screen and/or field and then processing is terminated. (So with regard to subsequent processing, it acts like an "end" command acts for any when-field processing.)

Upon saving*, when encountered within @update OR processing that, by default, runs from the top of the table**, processing will continue with whatever follows the screen command. (Often for @update processing, I will have used something like:  "screen 4,1; goto top", where "top" is at the top of the table to force such processing to use the code at the top of the table that is run by default when a record is saved.)

*whether saving is accomplished via the operator keying ESC ESC or programmatically.

** I sometimes call this "ESC ESC" processing, and this is likely what the manual means by "Input" processing, but to me, that is ambiguous since the entire processing table that you're in is termed "input processing" - even in Define Processing's menu.



On 9/15/20 2:48 PM, Jay R. Ashworth via Filepro-list wrote:
> If I END from inside a GOSUB, in Add Records mode, I *expect* to flush 
> the subroutine stack, and end up in a new empty record, calling 
> prc.input *from the top* when I SAVE.
>
> Is that what actually happens?  :-)
>
> Secondarily: if I "screen ,0" from inside a THEN line, when I SAVE, do 
> I come back *right to that spot in the line*, or the beginning of the 
> next line; in short, must a SCREEN command be the last thing in a 
> multi-command line?  If I then GOTO Start, how ensnared might I end up?
>
> [ Yes, I should know the things, but I haven't committed programming 
> in a few years... ]
>
> Cheers,
> -- j
>


-------------- next part --------------
A non-text attachment was scrubbed...
Name: winmail.dat
Type: application/ms-tnef
Size: 12893 bytes
Desc: not available
URL: <http://mailman.celestial.com/pipermail/filepro-list/attachments/20200916/2f23ec64/attachment.bin>


More information about the Filepro-list mailing list