QB64.org Forum
Active Forums => QB64 Discussion => Topic started by: doppler on May 06, 2021, 07:29:23 pm
-
Since someone, mentioned "lint" for QB64. Got me to thinking about "Crossref" lists. Back when I played with assembler. It was possible to specify Crossref list generation at the end of the listing. The crossref would list all variables used and what line numbers contained them. As well as all labels and locations. It was convenient to find all references and impacts to code. Things like changing byte to word, became a snap. You could look at all the cross refs, and figure out things.
Anyway to get this from listing/compiles ?
Or am I barking up an old dead tree ?
-
This sounds like a job for NOVARSEG
-
I remember doing something like this for variables as an exercise in JB when I first joined and of course oh (one handed interpreter) does this because it is an interpreter though it does not track every variable on every line (and it has only one type variable unless you count multi-value a-strings).
-
I really thought this was a possibility. The first job of ALL compilers is to identify all variables and labels. During the pre-compiler phase crossref is generated. I would not want to do this on my own. I would be looking at hundreds of hours of coding. I don't play with C, so I am not sure if crossref is a thing, you can specify.