RE: Anyone have a tool to list the variables in a QB64 program? - Dimster - 12-05-2024
It's a half baked idea Pete that I had a while ago, but I was thinking the Search option in the IDE could have a LIST sub option where you can select in a Key word and get a list of lines where it occurred along with a total count of the number of times it appeared in the code. The issue I was trying to solve was the multiple Sleep statements I put in my code while the program I'm writing is under construction.
But when you raised the topic of this thread and bplus mentioned the Dim, For's etc, that LIST sub option under Search would also be ideal for something like this.
SEARCH
List What ...
[ ] Dim
[ ] Dim Shared
[ ] For
[ ] Do
[ ] IF
[ ] Sleep
RE: Anyone have a tool to list the variables in a QB64 program? - FellippeHeitor - 12-05-2024
What if I told you there's an undocumented feature... when you have the F4 dialog up just hit Ctrl+C. Bang, you got your list to paste anywhere.
RE: Anyone have a tool to list the variables in a QB64 program? - PhilOfPerth - 12-06-2024
(12-05-2024, 11:59 PM)FellippeHeitor Wrote: What if I told you there's an undocumented feature... when you have the F4 dialog up just hit Ctrl+C. Bang, you got your list to paste anywhere.
Great!
Is there an option somehow to alpha-sort them?
RE: Anyone have a tool to list the variables in a QB64 program? - FellippeHeitor - 12-06-2024
Not as is. Variables are output in the order they are created by your code, but you can easily do so in a text editor after it's spit out. here's what it'll look like. Since the columns are fixed-length, you can even import/paste them directly into excel or google sheets and do your sorting.
Code: (Select All) QB64 - Variable List Report: 2048_1-2.BAS
Tabuleiro() ControleTabuleiro GLOBAL
CelulasLivres() Coordenadas GLOBAL
TotalCelulasLivres% INTEGER GLOBAL
Linhas%() INTEGER GLOBAL
Colunas%() INTEGER GLOBAL
Pontos& LONG GLOBAL
UltimoMovimento% INTEGER GLOBAL
Cheat$ STRING GLOBAL
x% INTEGER GLOBAL
y% INTEGER GLOBAL
Tecla$ STRING GLOBAL
Linha% INTEGER SUB_BOX
Coluna% INTEGER SUB_BOX
Largura% INTEGER SUB_BOX
Altura% INTEGER SUB_BOX
CorDeFundo% INTEGER SUB_BOX
i! SINGLE SUB_BOX
Inicio% INTEGER SUB_BOXCENTER
Largura% INTEGER SUB_BOXCENTER
Altura% INTEGER SUB_BOXCENTER
CorDeFundo% INTEGER SUB_BOXCENTER
i! SINGLE SUB_BOXCENTER
Linha% INTEGER SUB_CENTER
Texto$ STRING SUB_CENTER
Tempo! SINGLE SUB_ESPERA
Quantos% INTEGER SUB_GERANUMERONOVO
NovaCelula% INTEGER SUB_GERANUMERONOVO
Inicial% INTEGER SUB_GERANUMERONOVO
i% INTEGER SUB_GERANUMERONOVO
x! SINGLE SUB_GERANUMERONOVO
y! SINGLE SUB_GERANUMERONOVO
x% INTEGER SUB_LIMPATABULEIRO
y% INTEGER SUB_LIMPATABULEIRO
x% INTEGER SUB_MOSTRATABULEIRO
y% INTEGER SUB_MOSTRATABULEIRO
i% INTEGER SUB_MOSTRATABULEIRO
Direcao% INTEGER SUB_MOVETABULEIRO
x% INTEGER SUB_MOVETABULEIRO
y% INTEGER SUB_MOVETABULEIRO
i% INTEGER SUB_MOVETABULEIRO
Movimentos! SINGLE SUB_MOVETABULEIRO
Soma! SINGLE SUB_MOVETABULEIRO
Texto$ STRING SUB_MSGBOX
CorDeFundo% INTEGER SUB_MSGBOX
LinhasTexto$() STRING SUB_MSGBOX
TotalLinhas% INTEGER SUB_MSGBOX
LinhaOuColuna% INTEGER SUB_REMOVEVAZIOS
Direcao% INTEGER SUB_REMOVEVAZIOS
Celulas%() INTEGER SUB_REMOVEVAZIOS
TotalValores% INTEGER SUB_REMOVEVAZIOS
i% INTEGER SUB_REMOVEVAZIOS
LimiteInicial% INTEGER SUB_REMOVEVAZIOS
LimiteFinal% INTEGER SUB_REMOVEVAZIOS
x% INTEGER SUB_REMOVEVAZIOS
y% INTEGER SUB_REMOVEVAZIOS
LinhaOuColuna% INTEGER SUB_SOMACELULAS
Direcao% INTEGER SUB_SOMACELULAS
Celulas%() INTEGER SUB_SOMACELULAS
TotalValores% INTEGER SUB_SOMACELULAS
i% INTEGER SUB_SOMACELULAS
VetorX% INTEGER SUB_SOMACELULAS
VetorY% INTEGER SUB_SOMACELULAS
LimiteInicial% INTEGER SUB_SOMACELULAS
LimiteFinal% INTEGER SUB_SOMACELULAS
x% INTEGER SUB_SOMACELULAS
y% INTEGER SUB_SOMACELULAS
x% INTEGER SUB_VERIFICAMOVIMENTOSPOSSIVEIS
y% INTEGER SUB_VERIFICAMOVIMENTOSPOSSIVEIS
Ah, to be able to copy the variable report, make sure the actual variable list has focus in the Watch dialog before you hit ctrl+c.
RE: Anyone have a tool to list the variables in a QB64 program? - PhilOfPerth - 12-06-2024
(12-06-2024, 12:24 AM)FellippeHeitor Wrote: Not as is. Variables are output in the order they are created by your code, but you can easily do so in a text editor after it's spit out. here's what it'll look like. Since the columns are fixed-length, you can even import/paste them directly into excel or google sheets and do your sorting.
Code: (Select All) QB64 - Variable List Report: 2048_1-2.BAS
Tabuleiro() ControleTabuleiro GLOBAL
CelulasLivres() Coordenadas GLOBAL
TotalCelulasLivres% INTEGER GLOBAL
Linhas%() INTEGER GLOBAL
Colunas%() INTEGER GLOBAL
Pontos& LONG GLOBAL
UltimoMovimento% INTEGER GLOBAL
Cheat$ STRING GLOBAL
x% INTEGER GLOBAL
y% INTEGER GLOBAL
Tecla$ STRING GLOBAL
Linha% INTEGER SUB_BOX
Coluna% INTEGER SUB_BOX
Largura% INTEGER SUB_BOX
Altura% INTEGER SUB_BOX
CorDeFundo% INTEGER SUB_BOX
i! SINGLE SUB_BOX
Inicio% INTEGER SUB_BOXCENTER
Largura% INTEGER SUB_BOXCENTER
Altura% INTEGER SUB_BOXCENTER
CorDeFundo% INTEGER SUB_BOXCENTER
i! SINGLE SUB_BOXCENTER
Linha% INTEGER SUB_CENTER
Texto$ STRING SUB_CENTER
Tempo! SINGLE SUB_ESPERA
Quantos% INTEGER SUB_GERANUMERONOVO
NovaCelula% INTEGER SUB_GERANUMERONOVO
Inicial% INTEGER SUB_GERANUMERONOVO
i% INTEGER SUB_GERANUMERONOVO
x! SINGLE SUB_GERANUMERONOVO
y! SINGLE SUB_GERANUMERONOVO
x% INTEGER SUB_LIMPATABULEIRO
y% INTEGER SUB_LIMPATABULEIRO
x% INTEGER SUB_MOSTRATABULEIRO
y% INTEGER SUB_MOSTRATABULEIRO
i% INTEGER SUB_MOSTRATABULEIRO
Direcao% INTEGER SUB_MOVETABULEIRO
x% INTEGER SUB_MOVETABULEIRO
y% INTEGER SUB_MOVETABULEIRO
i% INTEGER SUB_MOVETABULEIRO
Movimentos! SINGLE SUB_MOVETABULEIRO
Soma! SINGLE SUB_MOVETABULEIRO
Texto$ STRING SUB_MSGBOX
CorDeFundo% INTEGER SUB_MSGBOX
LinhasTexto$() STRING SUB_MSGBOX
TotalLinhas% INTEGER SUB_MSGBOX
LinhaOuColuna% INTEGER SUB_REMOVEVAZIOS
Direcao% INTEGER SUB_REMOVEVAZIOS
Celulas%() INTEGER SUB_REMOVEVAZIOS
TotalValores% INTEGER SUB_REMOVEVAZIOS
i% INTEGER SUB_REMOVEVAZIOS
LimiteInicial% INTEGER SUB_REMOVEVAZIOS
LimiteFinal% INTEGER SUB_REMOVEVAZIOS
x% INTEGER SUB_REMOVEVAZIOS
y% INTEGER SUB_REMOVEVAZIOS
LinhaOuColuna% INTEGER SUB_SOMACELULAS
Direcao% INTEGER SUB_SOMACELULAS
Celulas%() INTEGER SUB_SOMACELULAS
TotalValores% INTEGER SUB_SOMACELULAS
i% INTEGER SUB_SOMACELULAS
VetorX% INTEGER SUB_SOMACELULAS
VetorY% INTEGER SUB_SOMACELULAS
LimiteInicial% INTEGER SUB_SOMACELULAS
LimiteFinal% INTEGER SUB_SOMACELULAS
x% INTEGER SUB_SOMACELULAS
y% INTEGER SUB_SOMACELULAS
x% INTEGER SUB_VERIFICAMOVIMENTOSPOSSIVEIS
y% INTEGER SUB_VERIFICAMOVIMENTOSPOSSIVEIS
Ah, to be able to copy the variable report, make sure the actual variable list has focus in the Watch dialog before you hit ctrl+c.
Yep, thank you.
RE: Anyone have a tool to list the variables in a QB64 program? - Pete - 12-06-2024
Undocumented??? Well I better snag that one fast before Trump deports it!
Thanks Fell,
Pete
RE: Anyone have a tool to list the variables in a QB64 program? - RhoSigma - 12-06-2024
I've added that informations to the $DEBUG wiki page, so no worries @Pete, Trump has no legitimation to deport it anymore
RE: Anyone have a tool to list the variables in a QB64 program? - FellippeHeitor - 12-06-2024
Thanks, Rho!
RE: Anyone have a tool to list the variables in a QB64 program? - TempodiBasic - 12-07-2024
@Fellippe
Great, you're always on top of the wave
@RhoSigma
yeah, you don't lose a took
I'm sure with you around
|