"Pos" is a loop too.
Copy() probably also (at least when you look at the assembler output).
And I guess writeln() also is, maybe not the asm outut of fpc, but it will call a system library of the underlying OS that definitely will use some sort of loop.
The fact that you didnt write it in your own code, but used a loop implemented in a library does not matter.
I tend to disagree.
Where does that argument stop, at the assembler level?
Pos() is in the system library, the implementation of this should not matter.
Anyway: Pos() can be replaced by a function that does not use a loop (if we define a loop to be a Pascal construct that uses either "for", "while" or "repeat").
The code was merely a proof of concept.
Bart