Topic: Suggested minor fix for Scribe (1 of 4), Read 13 times
Conf: VEDIT User Applications
From: Howard Goldstein
Date: Saturday, December 04, 2010 07:46 PM

Recent versions of Scribe.vdm contain the following code:

if(#52<>-1 && #53==-1) {
block_end(cur_pos) // if block_end not set, assume current position
#53=cur_pos
} // end of if

To allow for selecting in the opposite direction, I would suggest adding the following just above this:

if(#52==-1 && #53<>-1) {
block_begin(cur_pos) // if block_begin not set, assume current position
#52=cur_pos
} // end of if

There are probably more elegant ways of doing this, but my suggestion is simple and straightforward. I have tested it and know it works.

Thanks.

 


Topic: Suggested minor fix for Scribe (2 of 4), Read 14 times
Conf: VEDIT User Applications
From: Scott Lambert
Date: Monday, December 06, 2010 11:43 AM


Hi Howard,

Thank you for your suggestion, I will give your code a try. Appreciate the feedback! Scott

On 12/4/2010 7:46:59 PM, Howard Goldstein wrote:
>Recent versions of Scribe.vdm
>contain the following code:
>
>if(#52<>-1 && #53==-1) {
>block_end(cur_pos) // if
>block_end not set, assume
>current position
>#53=cur_pos
>} // end of if
>
>To allow for selecting in the
>opposite direction, I would
>suggest adding the following
>just above this:
>
>if(#52==-1 && #53<>-1) {
>block_begin(cur_pos) // if
>block_begin not set, assume
>current position
>#52=cur_pos
>} // end of if
>
>There are probably more
>elegant ways of doing this,
>but my suggestion is simple
>and straightforward. I have
>tested it and know it works.
>
>Thanks.

 


Topic: Suggested minor fix for Scribe (3 of 4), Read 11 times
Conf: VEDIT User Applications
From: Scott Lambert
Date: Monday, December 06, 2010 01:15 PM

Hi Howard,

you suggested:

if(#52==-1 && #53<>-1) {
block_begin(cur_pos) // if block_begin not set, assume current position
#52=cur_pos
} // end of if


I am unsure under what conditions your code would execute. Except in the case of a future strange bug in Vedit, when is it possible to have a block_end not equal to -1 if block_begin is -1 ? Can you create a condition manually where your code would execute? I am unable to do
so.

Even if you drop to the command line with no block set, and force block_end to another value
then -1, block begin is set to the same value.

Scott

 


Topic: Suggested minor fix for Scribe (4 of 4), Read 17 times
Conf: VEDIT User Applications
From: Howard Goldstein
Date: Monday, December 06, 2010 03:06 PM

On 12/6/2010 1:15:39 PM, Scott Lambert wrote:
>Hi Howard,
>
>you suggested:
>
>if(#52==-1 && #53<>-1) {
>block_begin(cur_pos) // if
>block_begin not set, assume
>current position
>#52=cur_pos
>} // end of if
>
>
>I am unsure under what
>conditions your code would
>execute. Except in the case of
>a future strange bug in Vedit,
>when is it possible to have a
>block_end not equal to -1 if
>block_begin is -1 ? Can you
>create a condition manually
>where your code would execute?
>I am unable to do
>so.
>
>Even if you drop to the
>command line with no block
>set, and force block_end to
>another value
>then -1, block begin is set to
>the same value.
>

Scott,

You're right. The code I suggested is completely unnecessary. I don't know what I was thinking. Your code is fine as-is.

-- Howard