Read with interest knowledge base article Q1022 as referred to in response to ?VMS to Windows2000?.
I compiled the segmented_to_unix.for program on Alpha/VMS.
Noticed that the compiler warned about overflow when compiling the line
RAB1.RAB$W_USZ = SIZEOF(BUFFER1)
Still it seemed to work for the test cases that I tried.
Then I included this piece of code in a utility program that can be used to convert our two most common binary, segmented file types including conversion from VAX-floating to ?Little_Endian?.
What then happened was that I got a run-time overflow in the same location.
So I just replaced the statement above with
RAB1.RAB$W_USZ = -32766
instead. Why? Only because that was the value of it in the debugger when it stopped and then I ?continued from a severe error? and it worked?
I am very certain that this can be made in cleverer way but all my test cases have worked so far?
Is what I have done unharmful for this case?