can i still sort it out in order without erasing the writing?
If by "without erasing the writing" you meant without 'deleting' the characters from your console-output, then the answer to that question would be yes.
Remember that using Write and WriteLn is only meant to help you "the programmer" to print out and validate the current state of your program and/or variables. That, and informing the end-user if that would be required for your application/program (ask for input, show progress etc).
So, for instance and as a simple example, it would be perfectly fine to print out the following lines in order to verify your progress when sorting:
Before sorting: 6 5 3 1 8 7 2 4
iteration 1: 5 6 3 1 8 7 2 4
iteration 2: 3 5 6 1 8 7 2 4
iteration 3: 1 3 5 6 8 7 2 4
iteration 4: 1 3 5 6 7 8 2 4
iteration 5: 1 2 3 5 6 7 8 4
iteration 6: 1 2 3 4 5 6 7 8
after sorting: 1 2 3 4 5 6 7 8
That way you are able to see what your program does before, after and on/for each iteration of your sorting loop.