home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.alaska-software.com
/
2014.06.ftp.alaska-software.com.tar
/
ftp.alaska-software.com
/
acsn
/
DecMemV.txt
< prev
next >
Wrap
Text File
|
2000-01-02
|
2KB
|
65 lines
DeclareMemvar is an ACSN tool that helps in converting
old CA-Clipper code to Xbase++ style code, that is
that you can compile with /w without getting the
following warning messages:
XBT0102: Ambiguous variable reference
XBT0103: Ambiguous variable reference, assuming MEMVAR.
NOTE: This file only helps in compiling you
applications so these warning messages will be
resolved. It's up to you to change these
variables to either FIELD, LOCAL or STATIC.
This program requires Alaska Xbase++ version 1.3
('Service Release 2') or higher.
What does the program do?
-------------------------
The program assumes you want to compile the source
files in the current directory. First, it renames all
existing .obj files to .obk. This is because compiling
with /s together with /w does not produce the expected
result.
Next, it tries to compile all .prg files in the
current directory. Note that for the best result, your
source code should be error free! DeclareMemvar then
directs all compiler output to the file
Declarememvar.out. This file will be scanned for the
two warning messages
XBT0102: Ambiguous variable reference <variable name> and
XBT0103: Ambiguous variable reference, assuming MEMVAR <variable name>
The <variable name> portion is taken out of the line
and put in an array. Next, a header file called
DeclareMemvar.ch is created. This include file will
contain all <variable name> lines uniquely, in the
format MEMVAR <variable name>.
Now all you need to do is to include DeclareMemvar.ch
in you source files like this:
#include "DeclareMemvar.ch"
Now you can compile your programs with /w, but you
don't get ambiguous variable warning messages! You
have a good insight in the variables used in your
application, and can concentrate on how to bring these
variables to either FIELD, LOCAL or STATIC, or even to
objects.
Finally all created .obj files are deleted. The .obk
files will be renamed to .obj again. The .out file
will be erased as well.
I hope you have some nasty old Summer'87 style source
code files at your disposal to test the program!
Regards,
Arno.
atolmeijer@tomorrows-world.nl
http://www.tomorrows-world.nl