You are not logged in. You can browse in the PowerBASIC Community, but you must click Login (top right) before you can post. If this is your first visit, check out the FAQ or Sign Up.
I've recently been maintaining some rather old basic code,
which was running on a Unix machine. I moved it to quickbasic,
and then to PB. But the codes almost 20 years old... it's time to
start over.
On the other hand, I disagree about the car thing My car is 24
years old, and runs and looks great.
These programs are SOTP speghetti code, with their roots in the GWBasic days....I suggested PB to my boss because several of routines have been an inch away from the string space limit for years ..
For as long as I have been working in and around the software industry, I continue to be amazed at some of the business decisions I see.
If you buy a company car, you not only maintain it, but you know in 3-6 years you'll have to bite the bullet and buy a new one.
Same with a copy machine.
Same with office furniture.
So why on earth can't bosses recognize that software, no matter how diligently maintained, has a finite useful life, and realize that every so often you just have to 'bite the bullet' and replace it?
These programs are SOTP speghetti code, with their roots in the GWBasic days. If I used Option Explicit they would explode
I suggested PB to my boss because several of routines have been an inch away from the string space limit for years and I thought Virtual Arrays would buy us some time. So far, so good.
Thanks for the help, I can take it from here.
It was the CCUR() function from QB that was being interpreted as an array.
#DIM ALL
OPTION EXPLICIT
Whichever language you are in (Microsoft or PB DOS-BASIC), use the option which forces you to declare all variables. That way the CCUR() would get flagged at compile time as "Array not dimensioned"
Thanks for the help. The three programs compiled successfully. It was the CCUR() function from QB that was being interpreted as an array.
Leave a comment:
Guest replied
Error 9 is Subscript out of bounds.
To find the line of the program where the error is happening, load the program with the PB DOS compiler, select Compile, then Find Error, put the address and press Enter.
Thanks. I was assuming that this wasn't a standard Basic error,
because the existing code has error trapping routines and runs. I
had never seen a QB error message with "pgm-ctr" followed by
a memory address. I had to experiment with different .pif
settings to allow ntvdm to run virtual arrays and was afraid I
had inadvertently caused other problems.
I am converting several recursively chained QB programs that were
originally compiled in PDS 7 to PBDos and trying to run them
in Win2000. I am encountering Error 9 at pgm-ctr with a floating
memory address-usually within +-10 lines of the same spot. I can't
find any specifics on this error, other than it is some type of memory
error. Does anyone know that the error code of 9 refers to. I am
usually an Access programmer, so I am just learning DOS memory management.
We process personal data about users of our site, through the use of cookies and other technologies, to deliver our services, and to analyze site activity. For additional details, refer to our Privacy Policy.
By clicking "I AGREE" below, you agree to our Privacy Policy and our personal data processing and cookie practices as described therein. You also acknowledge that this forum may be hosted outside your country and you consent to the collection, storage, and processing of your data in the country where this forum is hosted.
Leave a comment: