<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.2802" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff 
size=2></FONT>&nbsp;</DIV><BR>
<BLOCKQUOTE 
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
  <DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
  <HR tabIndex=-1>
  <FONT face=Tahoma size=2><B>From:</B> 
  filepro-list-bounces+gccconsulting=comcast.net@lists.celestial.com 
  [mailto:filepro-list-bounces+gccconsulting=comcast.net@lists.celestial.com] 
  <B>On Behalf Of </B>Tyler<BR><B>Sent:</B> Friday, February 17, 2006 3:22 
  PM<BR><B>To:</B> filepro-list@lists.celestial.com<BR><B>Subject:</B> GOSUB and 
  SCREEN<BR></FONT><BR></DIV>
  <DIV></DIV>
  <DIV>This is a question more out of curiousity than anything else; I've 
  already coded around it, though it's an ugly kludge using a flag.<BR><BR>I 
  have a driver program built into a dummy file's input processing that is used 
  to mediate between various files and makes system calls to allow editing of 
  these related files.&nbsp; I was getting errors "Too many gosubs" after users 
  had used it for processing a lot of data,&nbsp; I couldn't imagine why, as I 
  impose pretty strict structure on all new processing.&nbsp; Since it was 
  structured code, it was easy if somewhat tedious to record each gosub call and 
  return - basically building a stack tracer, since the debugger doesn't seem to 
  have one (which would be REALLY handy for tracing spaghetti logic GOTOs). 
  <BR><BR>The non-returning culprit was a subroutine that had a SCREEN command 
  before the return.&nbsp; This sub was called from input processing wef/wlf 
  routines.&nbsp; This caused a slow build up of non-returned gosubs in 
  filePro's gosub counter.&nbsp; Does the screen command not clear out the gosub 
  counter/stack when the gosubs are called in the wef/wlf processing and wef/wlf 
  processing ends?&nbsp; I would think it should:&nbsp;<BR><SPAN 
  class=130340521-17022006><FONT face=Arial color=#0000ff 
  size=2>&nbsp;</FONT></SPAN></DIV>
  <DIV><SPAN class=130340521-17022006></SPAN>&nbsp;</DIV><FONT face=Arial 
  color=#0000ff size=2></FONT>
  <DIV><BR>"<FONT style="FONT-SIZE: 10pt">When a SCREEN command is encountered 
  during @WLF or @WEF processing, the user is put into update mode on the 
  designated screen. When the user presses &lt;ESC&gt; to record the input on 
  this screen, processing ends. @WLF and @WEF processing are not considered 
  Input processing. These routines run independently from Input processing, and 
  do not affect the position of the Input processing's execution pointer. Each 
  @WLF and @WEF routine has its own pointer, and processing ends for these 
  special routines only when one of the specific @WLF, @WEF "closing" commands 
  is encountered. SCREEN is one of these commands."</FONT><BR><BR>Tyler 
  Style<BR><SPAN class=130340521-17022006><FONT face=Arial color=#0000ff 
  size=2></FONT></SPAN></DIV>
  <DIV><SPAN class=130340521-17022006><FONT face=Arial color=#0000ff 
  size=2></FONT></SPAN>&nbsp;</DIV>
  <DIV><SPAN class=130340521-17022006><FONT face=Arial color=#0000ff size=2>Use 
  switchto&nbsp;"screen_name" &nbsp;instead of screen.&nbsp; Screen ends 
  processing and will leave the counter as is.&nbsp;</FONT></SPAN></DIV>
  <DIV><SPAN class=130340521-17022006><FONT face=Arial color=#0000ff 
  size=2></FONT></SPAN>&nbsp;</DIV>
  <DIV><SPAN class=130340521-17022006><FONT face=Arial color=#0000ff size=2>See 
  description below.</FONT></SPAN></DIV>
  <DIV><SPAN class=130340521-17022006><FONT face=Arial color=#0000ff 
  size=2></FONT></SPAN>&nbsp;</DIV>
  <DIV><SPAN class=130340521-17022006><!-- Converted from text/plain format -->
  <P><FONT size=2>Richard Kreiss<BR>GCC Consulting<BR>&nbsp;</FONT> 
  </P></SPAN></DIV>
  <DIV><SPAN class=130340521-17022006></SPAN>&nbsp;</DIV>
  <DIV><SPAN class=130340521-17022006>
  <H1>SWITCHTO</H1>
  <P style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px">&nbsp;</P>
  <P style="MARGIN-BOTTOM: 2.5pt"><FONT 
  style="FONT-WEIGHT: bold; COLOR: #010100; FONT-FAMILY: 'Times New Roman'">Syntax:</FONT></P>
  <P style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px">&nbsp;</P>
  <P><FONT 
  style="COLOR: #010100; FONT-FAMILY: 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Then: 
  SWITCHTO name</FONT></P>
  <P style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px">&nbsp;</P>
  <P><FONT style="COLOR: #010100; FONT-FAMILY: 'Times New Roman'">"name" is the 
  name of screen to switch to.</FONT></P>
  <P style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px">&nbsp;</P>
  <P style="MARGIN-BOTTOM: 2.5pt; TEXT-INDENT: 6pt"><FONT 
  style="FONT-WEIGHT: bold; COLOR: #010100; FONT-FAMILY: 'Times New Roman'">Version 
  Ref:</FONT><FONT 
  style="COLOR: #010100; FONT-FAMILY: 'Times New Roman'">&nbsp;4.5</FONT><FONT 
  style="FONT-WEIGHT: bold; COLOR: #010100; FONT-FAMILY: 'Times New Roman'"> 
  </FONT></P>
  <P style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px">&nbsp;</P>
  <P style="MARGIN-BOTTOM: 2.5pt"><FONT 
  style="FONT-WEIGHT: bold; COLOR: #010100; FONT-FAMILY: 'Times New Roman'">Description:</FONT></P>
  <P><FONT style="COLOR: #010100; FONT-FAMILY: 'Times New Roman'">Switch to a 
  different screen, without returning to the original screen upon ending 
  processing (which is the default operation of the SCREEN command which also 
  switches screens). Normally, when INPUT processing ends you are returned to 
  the SCREEN you were on when processing started. The SWITCHTO displays a 
  specific screen, and sets it to be the screen to be returned to, instead of 
  the original screen.</FONT></P>
  <P style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px">&nbsp;</P>
  <P style="MARGIN-BOTTOM: 2.5pt"><FONT 
  style="FONT-WEIGHT: bold; COLOR: #010100; FONT-FAMILY: 'Times New Roman'">Examples:</FONT></P>
  <P style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px">&nbsp;</P>
  <P><FONT 
  style="COLOR: #010100; FONT-FAMILY: 'Times New Roman'">@keyP&nbsp;&nbsp;&nbsp;&nbsp;If:<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Then: 
  switchto "pay";end</FONT></P>
  <P style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px">&nbsp;</P>
  <P><FONT style="COLOR: #010100; FONT-FAMILY: 'Times New Roman'">Allow only 
  certain users access to screen 9.</FONT></P>
  <P style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px">&nbsp;</P>
  <P><FONT 
  style="COLOR: #010100; FONT-FAMILY: 'Times New Roman'">@key9&nbsp;&nbsp;&nbsp;&nbsp;If: 
  "*root*kenb*ronk*lauraw*" co ("*" &amp; @id &amp; 
  "*")<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Then: switchto "9" ; 
  end<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If:<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Then: 
  errorbox "You are not authorized for screen 9." ; end<BR></FONT></P>
  <SCRIPT language=javascript1.2 type=text/javascript>
<!--
if (window.writeIntopicBar)
        writeIntopicBar(0);
//-->
</SCRIPT>
  &nbsp;</SPAN></DIV></BLOCKQUOTE></BODY></HTML>