|
Post by (X) on Jul 9, 2023 18:21:12 GMT 1
If you compile this code and copy the GLL file into the C:\Program Files (x86)/GFABASIC32/bin/ subdirectory, then add the GLL file into your editor extensions, (Ctrl+M, remove the old version if it exists, add the new version, press OK) now, you can press App-L and out pops a list of Funcs, Procs and Subs in the Debug window.
'################################################################################# ' ' DISCLAIMER: THIS CODE IS OFFERED AS IS FOR EDUCATIONAL PURPOSES. ' YOU ARE FREE TO USE, COPY AND DISTRIBUTE. ' THE USE OF THIS CODE IS AT YOUR OWN RISK. ' I ACCEPT NO LIABILITY NOR MAKE ANY CLAIM OF ' CORRECTNESS OR SUITABILITY IN PART OR IN WHOLE. ' '################################################################################# ' ' FILENAME GFA_APP_L__List_Subs_Procs_Funcs.G32 ' ' DESCRIPTION I want a list of all Subs, Procs and Funcs in the program. ' ' AUTHOR (X) ' EMAIL xman.gb32@gmail.com ' WEBSITE https://gfabasic32.blogspot.com/ ' FORUM https://gb32.proboards.com/ ' STARTED 2023-06-03 ' UPDATED 2023-07-09 '
Sub Gfa_App_L ' List all Subs, Procs and Funcs in the app. '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' The selection is the area between: ' Gfa_Line & Gfa_Col and ' Gfa_SelLine & Gfa_SelCol. ' ' Every change made to Gfa_Line or Gfa_Col automatically resets Gfa_SelLine and ' Gfa_SelCol to the value in Gfa_Line and Gfa_Col. So, invoking Gfa_Left on a ' selection will remove the selection. ' ' When after changing Gfa_Line and/or Gfa_Col the range values Gfa_SelLine ' and/or Gfa_SelCol are newly set, the range between them is the new selection. ' Debug Debug "Start of search for Subroutines, Procedures and Functions." P_List_Lines_Starting_With("Sub") P_List_Lines_Starting_With("Pro") P_List_Lines_Starting_With("Fun") Debug "End of search." EndSub
Proc P_List_Lines_Starting_With(ss$) Debug "List of: " & #34 & ss$ & #34 Gfa_Line = 1 Gfa_FindText = ss$ Do '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' A FindNext places the caret on the line where the search string is found ' but it does not select anything. ' Gfa_FindNext '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' To select the whole line, first place the caret at the 0th column and set the ' Gfa_SelCol to the line length or greater. ' Gfa_Col = 0 // Places caret at start of Gfa_Line and clears selection. Gfa_SelCol = _maxInt // Makes selection from Gfa_Col to Gfa_SelCol. If Gfa_IsSelection If Left(Gfa_Selection, 3) == ss$ Debug Space(4) & Gfa_Selection EndIf If (Gfa_Line < Gfa_LineCnt) Gfa_Line = Gfa_Line + 1 Else Exit Do EndIf Else Exit Do EndIf Loop EndProc
|
|
|
Post by Roger Cabo on Jul 10, 2023 13:22:31 GMT 1
Cool! Would love to display all variables and types as well and being able to refactoring a variable/type name, as long they are in any func/procsub or globally. Done: What is the Key: App+L ?
Can I found out if the cursor is inside a proc/sub/func? + if the cursor is between any proc/sub/func? + if the cursor is prior any proc/sub/func? + if the cursor is after the last proc/sub/func? (in most end area where I can delete the complete forms, simply in the editor with the key DEL)
|
|
|
Post by Roger Cabo on Jul 10, 2023 13:54:59 GMT 1
This does not work when using variables that start with: ProcessTerm .. PropertiesStatement ... FunnyValue| .. SubString$ ...
Start of search for Subroutines, Procedures and Functions. List of: "Sub" SubString$ = "303" Sub Gfa_App_L ' List all Subs, Procs and Funcs in the app. List of: "Pro" Property$ = "909" PropertiesStatement Proc P_List_Lines_Starting_With(ss$) List of: "Fun" Funny% = 707 End of search.
|
|
|
Post by dragonjim on Jul 10, 2023 14:44:45 GMT 1
It may help to use "Proc ", "Procedure ", "Func ", "Function " and "Sub " (note the following space) as these are all protected GFA keywords and can not be variables.
The only problem you may then have is confusion between "Sub" for sub routine and "Sub" the subtraction command; however, unless there is a subtraction command "Sub" in the main part of the program, the fact that you check from the beginning of each line should rule that out.
I hope that is helpful.
|
|
|
Post by dragonjim on Jul 10, 2023 14:50:38 GMT 1
Cool! Would love to display all variables and types as well and being able to refactoring a variable/type name, as long they are in any func/procsub or globally. You could do this by using similar code to look for Local, Global and Dim commands (and Public and Private can also be used) and then parsing the the text that follows. You can find out the procedure containing the cursor using Gfa_Proc. You could then change the value of Gfa_Line up and down incrementally until the value for Gfa_Proc changes and then find the preceding and successive procedures as well. Or, even better, use 'X's useful code to create a procedure list as they appear and then, once you have the current procedure, you can then reference that list to find out where that procedure appears in the program.
|
|
|
Post by Roger Cabo on Jul 10, 2023 17:17:24 GMT 1
Okay I understand. Gfa_Text(n) returns the text of line n. The text is returned without leading spaces. Is there any way to get the leading spaces by a GFA_ command? but not Gfa_FindText! (Gfa_FindText is able to find 256 chars only. The current version of GB32 is able to use lines having < 64k) I use extensive variable and OCX name declarations with long names that describe exactly what these used for.
|
|
|
Post by dragonjim on Jul 10, 2023 21:30:13 GMT 1
Gfa_FindNext sets Gfa_Line to the line with the desired text.
With Gfa_Line, you can set Gfa_Col = 0 and Gfa_SelCol = _maxint and then retrieve the whole line of text, including leading spaces, using Gfa_Selection.
|
|
|
Post by (X) on Jul 11, 2023 1:41:51 GMT 1
This modification focuses on standard names, but, Sub as used for Subtraction would still be an issue...
'################################################################################# ' ' DISCLAIMER: THIS CODE IS OFFERED AS IS FOR EDUCATIONAL PURPOSES. ' YOU ARE FREE TO USE, COPY AND DISTRIBUTE. ' THE USE OF THIS CODE IS AT YOUR OWN RISK. ' I ACCEPT NO LIABILITY NOR MAKE ANY CLAIM OF ' CORRECTNESS OR SUITABILITY IN PART OR IN WHOLE. ' '################################################################################# ' ' FILENAME GFA_APP_L__List_Subs_Procs_Funcs.G32 ' ' DESCRIPTION I want a list of all Subs, Procs and Funcs in the program. ' ' AUTHOR (X) ' EMAIL xman.gb32@gmail.com ' WEBSITE https://gfabasic32.blogspot.com/ ' FORUM https://gb32.proboards.com/ ' STARTED 2023-06-03 ' UPDATED 2023-07-09 '
Sub Gfa_App_L ' List all Subs, Procs and Funcs in the app. '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' The selection is the area between: ' Gfa_Line & Gfa_Col and ' Gfa_SelLine & Gfa_SelCol. ' ' Every change made to Gfa_Line or Gfa_Col automatically resets Gfa_SelLine and ' Gfa_SelCol to the value in Gfa_Line and Gfa_Col. So, invoking Gfa_Left on a ' selection will remove the selection. ' ' When after changing Gfa_Line and/or Gfa_Col the range values Gfa_SelLine ' and/or Gfa_SelCol are newly set, the range between them is the new selection. ' Debug Debug "Start of search for Subroutines, Procedures and Functions." P_List_Lines_Starting_With("Sub ") P_List_Lines_Starting_With("Proc ") P_List_Lines_Starting_With("Procedure ") P_List_Lines_Starting_With("Function ") P_List_Lines_Starting_With("FunctionVar ") Debug "End of search." EndSub
Proc P_List_Lines_Starting_With(ss$) Debug "List of: " & #34 & ss$ & #34 Gfa_Line = 1 Gfa_FindText = ss$ Do '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' A FindNext places the caret on the line where the search string is found ' but it does not select anything. ' Gfa_FindNext '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' To select the whole line, first place the caret at the 0th column and set the ' Gfa_SelCol to the line length or greater. ' Gfa_Col = 0 // Places caret at start of Gfa_Line and clears selection. Gfa_SelCol = _maxInt // Makes selection from Gfa_Col to Gfa_SelCol. If Gfa_IsSelection If Left(Gfa_Selection, Len(ss$)) == ss$ Debug Space(4) & Gfa_Selection EndIf If (Gfa_Line < Gfa_LineCnt) Gfa_Line = Gfa_Line + 1 Else Exit Do EndIf Else Exit Do EndIf Loop EndProc
|
|
|
Post by dragonjim on Jul 11, 2023 9:51:06 GMT 1
Looks good. You just need to add "Func " and the one I forgot yesterday "FunctionVar " to catch all possible routines in a program.
Trying to filter out the Sub subtraction element will be more complicated: the only things I can suggest are:
1. Looking for an EndSub statement for all Subs found and trying to work out whether it refers to the 'Sub' reference found or not. 2. Assuming that all Subs found after the first procedure will be Sub-routines as, in a properly formatted listing, any Sub[traction] commands will indented and not at the beginning of the line.
|
|
|
Post by (X) on Jul 11, 2023 12:47:03 GMT 1
Looks good. You just need to add "Func " and the one I forgot yesterday "FunctionVar " to catch all possible routines in a program. Trying to filter out the Sub subtraction element will be more complicated: the only things I can suggest are: 1. Looking for an EndSub statement for all Subs found and trying to work out whether it refers to the 'Sub' reference found or not. 2. Assuming that all Subs found after the first procedure will be Sub-routines as, in a properly formatted listing, any Sub[traction] commands will indented and not at the beginning of the line.
I am working on a function to detect if a statement/line/selected text is NOT a subtraction statement. This should help with eliminating the inclusion of: Sub a,b or Sub (a, b) as a subroutine.
I am focusing on checking that what comes after 'Sub ' is not a numeric Global or Local variable in the main code using the Gfa_Vars Global and Local collections, because, if it's either, then, we'd have the start of a subtraction statement.
From Help Doc...
|
|
|
Post by (X) on Jul 11, 2023 12:57:27 GMT 1
I am trying to think when would 'Func ' be distinct from 'Function ' in a code listing? When I try to create the following the 'Func ' is auto-completed to 'Function ', or if auto-complete disabled: 'Bad assignment operator':
Unless your are talking about the function export listings in a library? But then they'd start with '$Export Func[tion] ...'
|
|
|
Post by dragonjim on Jul 11, 2023 22:47:34 GMT 1
You are right: I was thinking of EndFunc and Exit Func. Forget Func for Function.
|
|
|
Post by (X) on Jul 12, 2023 1:56:56 GMT 1
Here is the latest... The highlight is the IsNotSubtraction function that should tell us if a line of code is NOT a subtraction statement so we can eliminate it from the subroutine listing.
I am having difficulty listing any main code Local variables with: Set lvs = Gfa_Vars("-")... I will need to investigate further, but, it doesn't seem to work, even if I compile the program before hand, which should update the Gfa_Vars collection.
'################################################################################# ' ' DISCLAIMER: THIS CODE IS OFFERED AS IS FOR EDUCATIONAL PURPOSES. ' YOU ARE FREE TO USE, COPY AND DISTRIBUTE. ' THE USE OF THIS CODE IS AT YOUR OWN RISK. ' I ACCEPT NO LIABILITY NOR MAKE ANY CLAIM OF ' CORRECTNESS OR SUITABILITY IN PART OR IN WHOLE. ' '################################################################################# ' ' FILENAME GFA_APP_L__List_FunProSubs.G32 ' ' DESCRIPTION I want a list of all Subs, Procs and Funcs in the program. ' ' AUTHOR (X) ' EMAIL xman.gb32@gmail.com ' WEBSITE https://gfabasic32.blogspot.com/ ' FORUM https://gb32.proboards.com/ ' STARTED 2023-06-03 ' UPDATED 2023-07-09 ' UPDATED 2023-07-11 Almost worked out all subtraction exceptions, save if ' Local var is declared in main code and 'Sub a, b' uses a local variable for 'a'. '
Sub Gfa_App_L ' List all Functions, Procedures and Subroutines in the editor. Gfa_List_Global_Local_Main_Vars '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' The selection is the area between: ' Gfa_Line & Gfa_Col and ' Gfa_SelLine & Gfa_SelCol. ' ' Every change made to Gfa_Line or Gfa_Col automatically resets Gfa_SelLine and ' Gfa_SelCol to the value in Gfa_Line and Gfa_Col. So, invoking Gfa_Left on a ' selection will remove the selection. ' ' When after changing Gfa_Line and/or Gfa_Col the range values Gfa_SelLine ' and/or Gfa_SelCol are newly set, the range between them is the new selection. ' Debug Debug "========================================================================" Debug "Start of search for Functions, Procedures and Subroutines." Debug "Line Count:";Gfa_LineCnt Debug "------------------------------------------------------------------------" Debug "List of Functions." P_List_Lines_Starting_With("Function ") P_List_Lines_Starting_With("FunctionVar ") Debug "------------------------------------------------------------------------" Debug "List of Procedures." P_List_Lines_Starting_With("Proc ") P_List_Lines_Starting_With("Procedure ") Debug "------------------------------------------------------------------------" Debug "List of Subroutines." P_List_Lines_Starting_With("Sub ") Debug "------------------------------------------------------------------------" Debug "Line number:";Gfa_Line Debug "End of search." Debug "========================================================================" EndSub
Procedure P_List_Lines_Starting_With(ss$) Static Old_Txt$ = "" Dim L% = 1 Gfa_Line = 0 Gfa_Col = 0 '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' Sets the search string but does not move the caret. ' Gfa_FindText = ss$ Do If (Gfa_Line < Gfa_LineCnt) Gfa_Line = Gfa_Line + 1 //Gfa_Col = 0 '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' A Gfa_FindNext places the caret at the beginning of the search string on the ' line where the search string is found but it does not select anything. ' Gfa_FindNext // If the search string is found at the beginning of the line... If (Gfa_Col == 0) // Select search string... Gfa_SelCol = Gfa_Col + Len(ss$) EndIf If Gfa_IsSelection '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' To select the whole line... ' Gfa_Col = 0 Gfa_SelCol = _maxInt If (ss$ == "Sub ") If IsNotSubtraction(Gfa_Selection) If Left(Gfa_Selection, Len(ss$)) == ss$ Debug Space(4) & Gfa_Selection EndIf EndIf Else If Left(Gfa_Selection, Len(ss$)) == ss$ Debug Space(4) & Gfa_Selection EndIf EndIf EndIf Loop Until (Gfa_Line >= Gfa_LineCnt) EndProc
Function IsNotSubtraction(txt$) As Bool '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' The following is a subtraction statement. ' Sub <some_numeric_var>, <some_var or literal> ' ' I am trying to determine if a line is not a subtraction statement that: ' SUBTACTION ' 1) Starts with 'Sub ' ' 2) Followed by a Global or Local main code variable ' I tried to get the Local Main Code variables using Gfa_Vars. ' ' If I eliminate these lines, then, what's left should not be a subtraction statments: ' NON_SUBTRACTION ' 1) Starts with 'Sub ' ' 2) Not followed by a Global or Local main code variable ' If Left(txt$, 4) <> "Sub " // Not a subtraction statement for sure! Return True Else // Might be a subtraction statement... 'Debug #34 & SubStr(txt$, 5) & #34 Dim Trail$ = SubStr(txt$, 5) // What comes after the search string Dim v$ Dim gvs As Gfa_Vars Dim lvs As Gfa_Vars Set gvs = Gfa_Vars("") Set lvs = Gfa_Vars("-") Dim gv As Gfa_Var For Each gv In gvs v$ = gv.Name & " " If Left(Trail$, Len(v$)) == v$ Return False v$ = gv.Name & "," If Left(Trail$, Len(v$)) == v$ Return False Next gv Dim lv As Gfa_Var For Each lv In lvs v$ = lv.Name & " " If Left(Trail$, Len(v$)) == v$ Return False v$ = lv.Name & "," If Left(Trail$, Len(v$)) == v$ Return False Next lv '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' If we made it here, then, the line is definitely not a subtraction command ' starting with: 'Sub ' followed by a numeric variable. Unless it is a Local ' defined variable in the main code which: Set lvs = Gfa_Vars("-") does not ' seem to store or is unable to list. I will try to find out why. ' Return True EndIf EndFunc
Sub Gfa_List_Global_Local_Main_Vars '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' Gfa_DoCompile compiles the project without displaying the dialog box. However, ' when a project isn’t compiled before (Gfa_ExeName = ""), the Compile dialog ' box is shown, like in Gfa_Compile. ' Debug "Start of compilation." Gfa_DoCompile Debug "End of compilation." Dim gvs As Gfa_Vars Dim lvs As Gfa_Vars Set gvs = Gfa_Vars("") : Debug "Global Variable Count:"; gvs.Count Set lvs = Gfa_Vars("-") : Debug "Local Variable Count:"; lvs.Count Dim gv As Gfa_Var Debug "Global Main Vars" For Each gv In gvs Debug gv.Name Next gv Dim lv As Gfa_Var Debug "Local Main Vars" For Each lv In lvs Debug lv.Name Next lv EndSub
|
|
|
Post by (X) on Jul 12, 2023 2:38:51 GMT 1
It may be that Gfa_Vars won't work when launched from a GLL to list Local vars in the current program. This code shows, it does work when launched from the main code. $Library "gfawinx" $Library "UpdateRT" UpdateRuntime ' Patches GfaWin23.Ocx
Dim a = 10, b = 20 Local c, d Global f, g
Dim v As Gfa_Var Dim vs As Gfa_Vars
Set vs = Gfa_Vars("-") For Each v In vs Debug v.Name Next v
Set vs = Gfa_Vars("") For Each v In vs Debug v.Name Next v
|
|
|
Post by Roger Cabo on Jul 24, 2023 17:20:47 GMT 1
How do I get the complete GFA code simply into an string array? GenerateGFACodeArray()
Proc GenerateGFACodeArray Global GFACodeSource$(Gfa_LineCnt) MsgBox Gfa_LineCnt Dim i% For i% = 0 To Gfa_LineCnt Gfa_Line = i% Gfa_Col = 0 // Places caret at start of Gfa_Line and clears selection. Gfa_SelCol = _maxInt // Makes selection from Gfa_Col to Gfa_SelCol. Debug Gfa_Selection Stop Next i%
Gfa_LineCnt - Returns the number of lines of the program. // It's always 0 Or does it work in a GLL only? I'm confused. If I must use Gfa_FindText how will i find lines I didn't know about? EDIT: Okay.. I use Proc Gfa_App_L Gfa_SelectAll Debug Gfa_Selection EndProc But this makes sure to unfold all.. and the code is a stream without #13#10.. Perhaps I get it soon..
|
|
|
Post by dragonjim on Jul 24, 2023 18:26:19 GMT 1
As a general rule, Gfa_XXX keywords are designed to work only in a GLL and should not be used in a program, even though it may appear that they work. Gfa_lineCnt is one of these.
In addition, after looking into it, it appears that the address returned in local variables is relative to a Pointer (not THE Stack Pointer as I have tried this) so it may be that Gfa_Vars in broken for local variables unless you can find out the memory area used by the sub routine...
|
|
|
Post by Roger Cabo on Jul 24, 2023 19:39:41 GMT 1
Okay got it! All the folded F/P/S are now open, but anyway..
$Library "gfawinx" $Library "UpdateRT" UpdateRuntime ' Patches GfaWin23.Ocx Global GFASourceCode$(0)
Proc Gfa_App_L Debug.Clear Dim count% = Gfa_LineCnt, i%, GFA_LineOld%, GFA_ColOld% ReDim GFASourceCode$(count%) GFA_LineOld = Gfa_Line GFA_ColOld = Gfa_Col Gfa_Line = 0 Gfa_Col = 0 For i = 1 To count Gfa_Line = i% Gfa_SelCol = _maxInt If Gfa_IsFold Gfa_Fold 0 EndIf GFASourceCode$(i) = Gfa_Selection Debug GFASourceCode$(i) Next i // --- here the fun begins // --- here the fun ends // Could be possible the result has more or less lines.. anyway Gfa_Line = GFA_LineOld Gfa_Col = GFA_ColOld EndProc
At first I will start to find all, Procs, Functions, Sub, VarFunction.. correctly with and without End_XXX / EndXXX + GFA_Line Then compare my results with GFA_Proc in a second pass. This will make sure I do not false find variables with Sub, Proc, or whatever.. Then same with Vars,Types and Strings, all Global and Local and Ocx names.
|
|
|
Post by Roger Cabo on Jul 24, 2023 19:54:53 GMT 1
As a general rule, Gfa_XXX keywords are designed to work only in a GLL and should not be used in a program, even though it may appear that they work. Gfa_lineCnt is one of these. In addition, after looking into it, it appears that the address returned in local variables is relative to a Pointer (not THE Stack Pointer as I have tried this) so it may be that Gfa_Vars in broken for local variables unless you can find out the memory area used by the sub routine... Thank you.. I will read local and static vars by my self. That's not a difficultly task.
Is there a way to change SUB OCX.name in GB32 ? The command OCXOCX is able to rename existing Controls by code? I had in mind: It's possible to read through all Editor Forms, create a some custom type including the most used default .Methods, delete the editor Forms by Set Form = Nothing, the reuse OCXOCX to renew with new names. On the other hand: For sure I would love to have anything like Control.name = "new name".. Control(x).name = "new name" if possible. That would make all the stuff a lot easier. Forgot to ask: Is there any chance to get the all .Methods or .Options from a control by code? The drop down menu can do.
|
|
|
Post by Roger Cabo on Jul 24, 2023 22:40:34 GMT 1
There is another thing can be done in the editor and it's fully legal! FunctionVar/*A+B(FunctionVarExtention(PI)){ELEMENT+adr%.Long}*/c_(a_, /*__s__*/__x__/*__+__)(*/) I must admit that I use this tactics to describe parameter in functions. But not that extensive, but I use.
|
|
|
Post by dragonjim on Jul 24, 2023 22:42:18 GMT 1
Again, the only way to change the OCX object name and its related event sub routines is by editing the GB32 file externally using a Find and Replace routine. However, if you are using OCX's created using the Form Editor, then it is not possible to do it even this way as they object name is not stored in plain text.
Not of which I am aware. Sorry.
|
|
|
Post by Roger Cabo on Jul 24, 2023 22:51:22 GMT 1
Again, the only way to change the OCX object name and its related event sub routines is by editing the GB32 file externally using a Find and Replace routine. However, if you are using OCX's created using the Form Editor, then it is not possible to do it even this way as they object name is not stored in plain text. You can get any control name by .name OpenW # 1 OcxOcx Win_1 TextBox fguiuenfggn = "skfhkjk", 0, 0 MsgBox fguiuenfggn.Name EDIT: This is also possible /**//**//**//**//**//**//**//**//**//**//**//**/Procedure/**//**//**//**/uff() /**//**//**//**//**//**//**//**//**//**//**//**/EndProc/**//**//**//**/
|
|
|
Post by Roger Cabo on Jul 25, 2023 13:04:14 GMT 1
// ---------------- ouchy!
/**//**//**//**/ _ /**//**//**//**//**//**//**//**/ _ Procedure _ /**//**//**//**/pipi()
/**//**//**//**//**//**//**//**//**//**//**//**/End _ Proc _ /**//**//**//**/
|
|
|
Post by (X) on Jul 25, 2023 14:29:18 GMT 1
I'm off on another tangent much along these lines.
I call it a Program Inventory Registry.
With a PIR, one should be able to tell the PIR what you want and it will generate the application code for GFA-BASIC 32 for Windows or any other programming language.
|
|
|
Post by Roger Cabo on Jul 26, 2023 0:50:00 GMT 1
Interesting.. can you explain some more about?
|
|
|
Post by (X) on Jul 27, 2023 1:46:03 GMT 1
I'll post a Demo asap.
|
|
|
Post by Roger Cabo on Jul 27, 2023 13:01:28 GMT 1
|
|
|
Post by Roger Cabo on Jul 27, 2023 13:28:31 GMT 1
Here are some further pitfalls searching for Subs. Procs. Funcs on legal code
Sub _ i, a Sub/**/i, a //<--- extremely ugly if you want to remove single comments Sub/*(i, a)*/i, a Sub _ /**/x(i, a) Sub/**/x(i, a)
|
|
|
Post by (X) on Jul 27, 2023 14:06:59 GMT 1
I guess I am just thinking big to pehaps come up with something that might be useful. I am thinking of an app called: nXs as in: Nexus (the central and most important point or place.)
|
|
|
Post by Roger Cabo on Jul 29, 2023 14:09:11 GMT 1
Did you know that this is also a legal comment? (*_*) After 30 years I learned some basic stuff.
|
|
|
Post by Roger Cabo on Jul 30, 2023 16:35:25 GMT 1
Here is a short code that performs manual analysis. The reason for this approach is that I have no control while developing for the Obfuscator. None of the GFA_ commands worked in the real interpreter. It takes too long for me to use the "trial and error" method on complex tasks, such as compiling, unloading, loading, opening the menu, and adding as a gll. Additionally, I believe I can control all possible quirks with multiple lines, comments, and math operations (Sub a, b). The program loads a code.txt file from the internal "Dateien" Then, it creates a type database and stores all subroutines, procedures, and functions with their respective start and end line numbers and types. This will be perfect for passing all local variables into as well, later on.
|
|