I think the 'type' could be misleading since it could be redefined with a DEF
statement; probably better to put that in the comments later if necessary.
Maybe the references could be in columns; most of the cross-references I use do
that and it does seem to make it a little easier to read...
But it's pretty good as is!
m
----- Original Message -----
From: Peter Noeth
To: Model 100 Discussion
Sent: Wednesday, May 03, 2023 5:59 PM
Subject: Re: [M100] Variable Concordance
A good idea, but since the program runs under Windows, why such a cryptic
output?
Wouldn't it be easier to use with more verbose column headers:
Variable Type Defined in Line Used in Lines
Comments
---------------------------------------------------------------------------------------------------------------------------------------------------------
B% Integer 0 1, 7(2)
C Double 1 2(3), 4,
5(2)
E Double 1 7(5)
.
.
.
The Comments column label would be generated, but used later when the output
file is edited to add notes about the variable usage, etc. This would make a
good start to proper program documentation.
Of course, since the source was provided, changes could easily be made :-)
Regards,
Peter
On Tue, May 2, 2023 at 1:15 PM <[email protected]> wrote:
----------------------------------------------------------------------
Message: 1
Date: Mon, 1 May 2023 15:31:48 -0500
From: <[email protected]>
To: <[email protected]>
Subject: [M100] Variable Concordance - MTVarConcor
Message-ID: <[email protected]>
Content-Type: text/plain; charset="utf-8"
Hello all,
I?ve written a variable concordance program for Windows that will take a
TRS-80 Model 100 BASIC program and will list the variables in alphabetical
order with the line numbers where they appear. The name of this program is
MTVarConcor. The executable, source and a pdf file describing it can be found
at www.GitHub.com/LEJ-Projects/MTVarConcor
<http://www.GitHub.com/LEJ-Projects/MTVarConcor> .
As an example, the 10 line program, drop (written by David Plass) is as
follows:
0
CLS:POKE-902,PEEK(63795):F=.25+RND(1)/4:W=-.25+RND(1)/2:X=0:Y=1:B%=5+25*RND(1)
1
C=0:PRINT@280+B%,CHR$(27)"V?"SPACE$(9-E)"?":PRINT@200,"S:"S:PRINT"L:"5-L:PRINTUSING"W:#.#";W
2 C=C+F:PRINT@C," ??":IFX<>0THENPRINT@OX+40*OY%,"
":OX=X:OY%=Y:Y=Y+.3:X=X+W:GOTO6
4 IFINKEY$=" "THENX=C+2:F=F*2:OX=0:OY%=0
5 IFC>=37THENPRINT@37," ":C=0:GOTO2ELSE2
6 IFY<7.01THENPRINT@X+40*FIX(Y),"?":GOTO4
7
IFX>=B%+1ANDX<=B%+10-ETHENPRINT@97,"Hit!":CALL4811:S=S+10*(E+1):E=E-(E<8):GOTO0
8 L=L+1:IFL<5THENPRINT@97,"MISS!":CALL4811:GOTO0ELSEPRINT@55,"Game over":END
The output from MTVarConcor when the above program is the input is:
B% 0 1 7(2)
C 1 2(3) 4 5(2)
E 1 7(5)
F 0 2 4(2)
L 1 8(3)
OX 2(2) 4
OY% 2(2) 4
S 1 7(2)
W 0 1 2
X 0 2(4) 4 6 7(2)
Y 0 2(3) 6(2)
I hope someone will find this program useful.
Lloyd