Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Help: range check error (201) in Pascal

David NovakDavid Novak Member Posts: 1

Greetings, fellow Pascal enthusiasts.

I have an issue with my program to find the next lexicographical permutation to a permutation given as input.
I uploaded my code to an online submission system (which uses a Free Pascal compiler). The result: in 1/5 cases, the compiler returns Error 201 (range check error). (The compiler tests the program by entering different inputs. I don't know what the inputs are.)

If any of you were so kind as to scan through my code and suggest where the problem might be, I'd be delighted.

The code is available here: https://github.com/davnovak/pascalProj/blob/master/nextPerm.PAS

Sign In or Register to comment.