Author Topic: assistance with 'subscript out of range' error  (Read 4933 times)

0 Members and 1 Guest are viewing this topic.

Offline satan165

  • Newbie
  • Posts: 7
    • View Profile
Re: assistance with 'subscript out of range' error
« Reply #15 on: April 25, 2021, 09:13:13 pm »
Quote
I include my changes to the original code below, it shows the 'I' in lower case, which was what caught my eye. I also added some comments that highlight those lines that are to be changed if altering the 1986 standards. Happy bug hunting...

Amazing - thank you so much!

Very good eye on the 'I' (pun intended).  Whatever the programmer was trying to accomplish wasn't successful, but that statement didn't crash the whole program, so I guess it is just dead weight.

After running the program about a million times, I figured out that the suitable responses for 'predicted coke stability' is a number between 1-20.  I still cannot fathom what unit of measurement that is in.  I have slightly more knowledge about coke making than programming but it still eludes me.  I spent about an hour messing with formatting to get it to output a cleaner text file, but there are still some miscalculations in there.  Some of the output is a percentage like 2400% and that doesn't make sense. But perhaps this program never actually worked and was only in the testing stages.  I think that whoever wrote this was someone who probably had a degree in chemical engineering and perhaps learned BASIC as a hobby so I'll give them kudos for creating something that sort of worked.

I think it is pretty cool that I found a hardcopy from 30 years ago in an abandoned building and got it to run.  Whatever issues it has I'm going to guess it always had, I'm thrilled that it runs and does seem to calculate some/most things correctly.

v2.0 is from 1991 and I recognize that some of the code is the same but via 48 'DATA' statements (and 48 REM statements, of course) it has all the quality data for 48 coals already written into the program so you don't have to input it.  Will be interesting to see how/if this works.  If it does I'll share the code and an output file if anyone is interested.

OldMoses - thank you so much for taking the time to look at this messy code, I really appreciate it!