|
Post by George on Oct 25, 2022 8:29:07 GMT -5
Stefan: I'm sorry your initial report on all these just 'fell through the cracks'. In addition to what's visible in the forums, Robert and I have been hassling quite a bit over EFT stuff.
Yes, Get_Profile now relies quite heavily on the cmd-name ? support. And the problem with those is that they were all written at different times, and because they were simple output messages, standard format wasn't all that important.
I will take your list here and 'clean things up'
George
[UPDATE]
Completed.
[/UPDATE
|
|
|
Post by George on Oct 24, 2022 15:35:51 GMT -5
I'll move the indexes around.
|
|
|
Post by George on Oct 24, 2022 14:05:07 GMT -5
The PUSH / POP options of the SET command were created way back in SPFLite pre-history, and neither Robert nor I can recall exactly what they were intended to accomplish.
So ... is anyone actually using them?
If so, how about telling us how? What support do they provide you?
It would be nice to eliminate the complex code currently in place to support them.
NOTE: We are NOT talking about removing SET support, just the PUSH / POP options of SET.
George
|
|
|
Post by George on Oct 24, 2022 13:22:20 GMT -5
Yes, I'm looking at what it does in testing, and then at the code, and saying "What IS the correct action here?" It's not just tricky code, it's tricky even defining just what it SHOULD do.
And then trying to keep it all in your head as you walk through the code logic (which has forks for "Is this CHANGE DS or CS mode) - Man! My head hurts!
George
|
|
|
Post by George on Oct 24, 2022 12:55:18 GMT -5
Stefan: I tried a test version of a new function - Set_LCsr(line, col) (set Logical Cursor) to set the logical line/col position.
It seems to do what I think you want, you'll have to confirm it. If it doesn't then I'll yank it. I guess it will depend on how 'tricky' your macro is after the SET as to whether it will work for you. If it seems fine, I'll leave it in and document it with a caveat that it MAY not do what's wanted.
George
|
|
|
Post by George on Oct 24, 2022 11:27:25 GMT -5
Robert: OK, I'll start working on getting out a Beta, we can add your quickstart Doc when it's ready.
George
|
|
|
Post by George on Oct 24, 2022 11:02:34 GMT -5
I made a stab at correcting this. Next Beta give it a try. It's another hairy area where I'm not sure even how it's supposed to work.
George
|
|
|
Post by George on Oct 24, 2022 10:13:33 GMT -5
Get_Session_Type$ will return EFT-Edit. It's already in there.
Stuff like Get_Profile$("NAME") not working, or no fetching LOCK are basically just bugs.
And once the EFT version is out officially, I will start on yanking everything to do with Prof USING. That will be 'fun'.
George
[UPDATE] Get_Profile$ has been corrected.
NAME will return the active Profile name - no mention of USING anymore as it's going away soon anyway. LOCK will return LOCKED | UNLOCKED Get_UseProfName is also gone - it never should have been put in.
These will be in the EFT Beta whenever it comes out.
[/UPDATE]
|
|
|
Post by George on Oct 24, 2022 10:03:49 GMT -5
Get_Trk_Pos$ returns TOS, line and column numbers.
|
|
|
Post by George on Oct 23, 2022 15:52:11 GMT -5
Good, I was going to add the line range, but got tied up doing other stuff.
George
|
|
|
Post by George on Oct 23, 2022 10:43:14 GMT -5
Robert: Certainly you can cut/paste NOTE line data.
George
|
|
|
Post by George on Oct 23, 2022 10:40:31 GMT -5
Stefan: This is getting into some very tricky areas, especially if you are resetting the cursor in preparation for some FIND type commands. The main search routine has to set the starting line/col position based on a large number of factors. - Is this a FIND or RFIND?
- Was the last search successful or not?
- What direction was the previous search? Is this a 'rollover' from Top to Bottom or visa versa.
- Where is the physical cursor on the screen? Is it even within the text area?
- Where did the last Search set the resume position?
- Is it an ALL request?
- Any specific NEXT, PREV, FIRST, LAST?
- Is it using variable length search strings (REGEX or Delimited literals)?
So I can easily create a new function to set the internal line and column, but depending on the conditions above, it may not end up being honored.
George
|
|
|
Post by George on Oct 23, 2022 10:07:06 GMT -5
Robert: OK, clearer. It seemed like a simple macro would do it, so here's a HX macro to use as a Line Command. It just inserts the display as NOTE lines following the selected line. No real error checking in there, it's just a demo.
George
' HX.macro ' Display a line's data in horizontal hex as NOTE lines ' DIM OLine, WLine, HLine, CLine, cnum AS STRING DIM i, j, k, LPtr as long if Is_Primary_Cmd then Halt(fail,"HX is Only available as a line command") LPtr = Get_Src1_LPtr ' Get LPtr OLine = Get_Line$(Lptr) ' Get actual text
'----- Build the display lines CLine = repeat$(len(OLine), "- ") ' Start COLS line for i = 1 to len(OLine) ' Char by char WLine += mid$(OLine, i, 1) + " " ' Wide version of line HLine += Hex$(asc(mid$(OLine, i, 1)), 2) ' Hex version of line IF MOD(i, 10) = 0 THEN ' Add + and Column indexes cnum = FORMAT$(i, "#####") ' MID$(CLine, (i * 2) - 1, LEN(cnum)) = cnum ' ELSEIF MOD(i, 5) = 0 THEN ' MID$(CLine, (i * 2) - 1, 1) = "+" ' END IF ' next i '
SPF_CMD("LINE Note !" + tstr$(LPtr)) ' Insert result as NOTE lines Set_Line(LPtr + 1, HLine) ' SPF_CMD("LINE Note !" + tstr$(LPtr)) ' Set_Line(LPtr + 1, WLine) ' SPF_CMD("LINE Note !" + tstr$(LPtr)) ' Set_Line(LPtr + 1, CLine) ' Halt(0) ' Done
|
|
|
Post by George on Oct 21, 2022 15:28:47 GMT -5
Robert: OK then, mark me confused.
Are you asking for an alternative HEX display (like HEX DATA)?
Or are you asking for some new literal type string?
The example in your previous post is still confusing. It is a "how to simulate a new display"? Is it "this is what I want SPFLite to do for me if I do xxx"?
I've really no idea what you're asking for.
George
|
|
|
Post by George on Oct 21, 2022 14:44:18 GMT -5
Yes, "it was decided that U was an abbreviation for USER". As in RESET USER
That's because I was convinced by someone to add a whole bunch of aliases for various commands and operands, many of them totally obscure. e.g. did you know BR and BRO are aliases for BROWSE? Have you ever in your life used them?
The parse routine handles all the aliases by creating a token for each parsed item. The command routines then only check for the token and not for each of the possible KW aliases.
The parse routine will be left unchanged. I have corrected the operand hi-lighting to at least hi-light the word.
George
|
|