[fpc-pascal] Pass open array to static array?

Ryan Joseph genericptr at gmail.com
Mon Mar 16 03:32:16 CET 2020


Ok, that makes sense now. Dynamic arrays can't be passed to static arrays. I
remember when I tried to make aligned dynamic arrays I got to look around in
the code and it seems plausible you could just make a memcpy call in the RTL
for dynamic arrays being passed to static arrays. Seems deceptively easy. :)

Shouldn't it be a constant array though? I'm not sure how the compiler works
but from the programers perspective I thought I was getting something
without runtime allocation because the array contained only constant values.



--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/


More information about the fpc-pascal mailing list