QB64.org Forum

Active Forums => QB64 Discussion => Topic started by: doppler on May 06, 2021, 07:29:23 pm

Title: Is there a way to get a crossref list of qb64?
Post 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 ?
Title: Re: Is there a way to get a crossref list of qb64?
Post by: SpriggsySpriggs on May 06, 2021, 08:27:30 pm
This sounds like a job for NOVARSEG
Title: Re: Is there a way to get a crossref list of qb64?
Post by: bplus on May 06, 2021, 09:13:25 pm
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).
Title: Re: Is there a way to get a crossref list of qb64?
Post by: doppler on May 07, 2021, 05:56:50 am
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.