The code is not a valid C++ program unfortunately. It uses variables that have not been declared. It doesn't close the class definition. A lot of the code would have to be put inside a function (but would still not be entirely valid).
Things like
is simply not correct syntax.
It should look more like
|
cin >> PC >> PH >> PX >> PN >> PS;
|
but for that to work the variables would have to be declare first.
This code doesn't make sense to me
|
for(i_tmp = 0; i_tmp <= (26][5); i_tmp++){
|
What is (26][5) supposed to mean? It's not C++, that's for sure.
This code
makes me suspect that they originally had a conversion tool to C that used printf for output and then tried (and failed miserably) to turn it into C++.
In C, with printf, it might look something like:
But in C++, using cout, it should look like:
The way they call
strcmp and
substr they can't be using std::string (std::string doesn't even have a strcmp function and substr only takes 2 arguments, not 3). They must be using some custom string class. Either that or they have just got it all wrong like so many other things.
Line 456 says:
implicit variables declared in this module |
The rest of the file (more than 5000 lines) are not actually C++ code. It seems to be just a list of all the variables that have been used, but haven't been declared, but would have to be declared for the code to work.
To me it looks almost hopeless to try and piece it together into something that works. Probably easier to look at the original PL/I code and rewrite it in C++ by hand.