|
Post by mueh on Oct 26, 2023 2:33:18 GMT -5
Hi George ! Some point you might consider . I use MINLEN 80 and PRESERVE OFF . When there are colored blank at end of line now with 23298 they are lost on restart . Before 23298 they are kept on restart . On second picture with 23298 they are lost . From my understanding PRESERVE OFF should only trim down to MINLEN . Does it mean that i now must use PRESERVE ON ? My suggestion would be to keep old function with PRESERVE MIN . Thanks Attachments:
|
|
|
Post by Stefan on Oct 26, 2023 4:59:20 GMT -5
mueh If PRESERVE OFF only trims down to the MINLEN value, all blanks added by MINLEN would be retained forever (or at least until the file is re-edited with MINLEN 0), making it a file of fixed length records. That's not desirable either.
Is it only the highlight that is missing, or are the actual blank characters missing?
Totally Unrelated, but... Why do you specify "IMACRO im_BV ON" in the profile? Assuming this is related to BACKVIEW, it was never needed "in a profile", even in early versions of BACKVIEW. The latest version of BACKVIEW - see Contributed Macros - uses a separate macro (BVTidy.MACRO) to perform the action of the old im_BV.MACRO which is now redundant.
|
|
|
Post by mueh on Oct 26, 2023 7:52:36 GMT -5
Stefan ! If PRESERVE OFF only trims down to the MINLEN value . This isn't longer true with 23298 . All blanks at end are removed when writing the file back on SAVE . STATE file for line 2 is 2/R/8/8/0,2/R/73/5/0 . Col 73 is RED for 5 bytes . On RELOAD or restart the file color is then different also the record is MINLEN . MINLEN doesn't mean that it is a file of fixed length records . You can have records longer than MINLEN in file which get blanks rtrimmed off .
Thanks for notice on IMACRO . It's some old residual value from early testing of BACKVIEW . Removed it from profiles . Thanks
|
|
|
Post by George on Oct 26, 2023 10:23:27 GMT -5
MUEH: I can see the hilight difference. But, as Stefan described, a PRESERVE MIN is needed to do this properly, PRESERVE OFF doesn't.
The problem really is that MINLEN was intended to add temporary blanks to avoid problems in various search combinations, therefore removing them should be transparent
You have HiLighted these blanks, making them significant. Maybe I can use that fact, let me review it and see if we can avoid creating PRESERVE MIN.
George
[UPDATE]
OK, that works, with PRESERVE OFF, if any of the spaces being removed contain special attributes (e.g. HILITE) then that LINE will be handled as PRESERVE ON. It is not dependent on the MINLEN value, solely on whether an attribute exists anywhere in the chopped off spaces.
Example, (using - to indicate blanks) if you had MINLEN 100, and the line contained only "ABC---" (with a HILITE on the --- portion) then the line would be written as a 100 char. string.
I believe this should handle it.
[/UPDATE]
|
|
|
Post by Robert on Oct 26, 2023 10:33:00 GMT -5
It seems clear that we got ourselves into this problem because we never said from the start what the interaction of these two settings should be. Now, you are talking about changing the semantics based on colorization.
I am concerned where this is all leading. George, I know how much you hate systems analysis and documentation ahead of time, but if there was ever a case for it, I think it's now.
There needs to be a clear statement of EXACTLY what these commands mean. Come up with a bullet-point list, it can't take more than one page. Changing specs off the top of your head like this, it just won't end well.
Please.
R
|
|
|
Post by George on Oct 26, 2023 10:59:15 GMT -5
Robert: My update above overlapped your post.
Sorry, I know how you love analysis, but for this thing, it's not needed. We're all pretty clear on what's needed. I've added the whole 4-5 lines of code and tested it. The doc will be updated to clarify all this.
Both MINLEN and PRESERVE will be made to do what they're supposed to, and to clear up this 'collision'.
Systems analysis to fix what is basically a bug is overkill.
George
|
|
|
Post by Stefan on Oct 26, 2023 16:35:42 GMT -5
George, Your example Example, (using - to indicate blanks) if you had MINLEN 100, and the line contained only "ABC---" (with a HILITE on the --- portion) then the line would be written as a 100 char. string.
seems odd to me. If the 3 blanks following the ABC have a color attribute associate with them, I would have expected PRESERVE OFF to leave the line as "ABC---", ie as 6 character in length, not 100 chars in length. Afterall, if the line was loaded as 6 chars in length (ABC plus three blanks made 'significant' by the coloring), it should not gain 94 blanks when being saved because MINLEN padded all lines to 100 bytes in length.
|
|
|
Post by Robert on Oct 26, 2023 19:35:29 GMT -5
George, I know a lost battle when I see one. However, I want to point out your comment, "We're all pretty clear on what's needed" and Stefan's reaction, "Your example ... seems odd to me" and what follows.
That is the very point I am trying to make. We're NOT all pretty clear on what's needed. Between me, you and Stefan, I see 3 different conclusions being drawn.
You said, "MINLEN and PRESERVE will be made to do what they're supposed to". But, just WHAT are they supposed to do?
Bugs happen when the problem that code is supposed to solve has not been (properly) defined, as is the case here. Systems analysis, or at least systems design, is supposed to define the set of rules that you are then to code against. Without those rules defined, you're just coding as you go. That might be more fun, but the aftermath - more bugs - is less fun.
I am not trying to change your mind, but I am telling you in all honesty and all sincerity, if you don't define what you intend to accomplish, you will have merely delayed the onset of yet more bugs down the road.
Believe me, or not, as you will.
R
|
|
|
Post by George on Oct 27, 2023 10:15:59 GMT -5
Robert: So what will analysis show? That there are multiple ways of handling this. And multiple users will have multiple ideas as to which way is "right". There is no single solution that will make everyone happy. And I would certainly appreciate it if you would refrain from pushing the analyst process at me. You well know that just doesn't work.
Like I said - the judges decision is final. Best I can offer is that I'll try to only extend the line enough to hold the attribute chars. This has gone around more than enough.
George
|
|
|
Post by mueh on Oct 28, 2023 8:55:11 GMT -5
Hi George ! Severe error with 23300 . Record like below and google colored RED www.google.comis written as www.googlethe Data after the color is lost . Thanks
|
|
|
Post by George on Oct 28, 2023 9:35:00 GMT -5
MUEH: Ick! Very stupid of me.
George
[UPDATE]
Even stupider, a simple typo.
[/UPDATE]
|
|