Re:Why Use Pascal?
by unnouinceput on Sunday July 09, 2023 @03:27PM
(#36657980)
Please do another "for" right after this one, identical, and then revisit this comment (hint: you'll get a syntax error).
Re:Why Use Pascal?
by clouddrover on Sunday July 09, 2023 @07:13PM
(#36660062)
> hint: you'll get a syntax error
No. You won't. You didn't even try it, did you.
Read the documentation, use inline variables, and be happy.
You should at least use it in for loops. It's a useful improvement, and especially handy in combination with type inference. For example:
i is declared inline, it's only in scope inside the for loop, and the type is inferred from the bounds of the loop. You could of course use "for var i : Integer := 1 to 10 do" if you wanted to be explicit about the type.Documentation: https://docwiki.embarcadero.com/RADStudio/Alexandria/en/Inli...