At 12:19 AM 6/5/2002 +0100, Alastair Burr wrote:

>Can anyone tell me how it is possible to run an application through TRACE
>and consistently have no errors and yet R:Base crashes EVERY time I start
>the app via an icon?


Alastair,

Looks like the WHILE loop optimization issue!

SET WHILEOPT OFF at the mighty R> prompt and try it again. If it runs
then you know there is a problem with an optimized command and the
problem is most likely with a variable used in that command.

FYI, TRACE does not use the WHILE loop optimization.

WHILE loops were always considered one of the faster ways to process
code because R:BASE read the WHILE loop code into memory and parsed
it before beginning execution. R:BASE did not need to do line-by-line reading
and parsing of the code for each iteration of the WHILE loop. As it is read 
into
memory the WHILE loop code was parsed in tokens (4-byte segments). But
R:BASE still needed to figure out what was what -- parse the expressions,
find variable names and values etc. It was faster than reading and parsing
line-by-line, but not as fast as it could be.

Tips:

01. Datatype variables at the beginning of a command file or before the
     WHILE loop is executed. Don't datatype variables inside the WHILE
     loop, they won't be optimized.

02. The variables used in any optimized command can change values as
     the WHILE loop iterations are executed, but they cannot change data
     types and cannot be cleared (with the CLEAR VAR command).

03. The value can be reset to NULL (SET VAR vname = NULL) but not
     cleared.

04. If you determine that the problem is with an optimized command, review
     the rules above, you may be clearing, retyping or not data typing a 
variable.

Well, that should give you pretty good idea.

Very Best Regards,

Razzak.

P.S.  After the Inside R:BASE 7.0 for Windows training session this week,
I'll post more details at: htp://www.razzak.com/fte



================================================
TO SEE MESSAGE POSTING GUIDELINES:
Send a plain text email to [EMAIL PROTECTED]
In the message body, put just two words: INTRO rbase-l
================================================
TO UNSUBSCRIBE: send a plain text email to [EMAIL PROTECTED]
In the message body, put just two words: UNSUBSCRIBE rbase-l
================================================
TO SEARCH ARCHIVES:
http://www.mail-archive.com/rbase-l%40sonetmail.com/

Reply via email to