On Sat, Jan 7, 2017 at 6:53 PM, Bart <[email protected]> wrote:

> OK, I can imagine more complex examples where this may come in handy.
>
> And thanks for the rest of the explanation.


And only more complex examples should be used :)
There're much better ways to implement var-type variables.

I was always thinking that having untyped variables in Pascal is more a
syntactical advantage, whenever a Pascal need to target managed platforms
(i.e. Net or Java). These platforms don't any kind of pointers at all.
Thus a code written using pointers would not even compile on them.

Thus using open arrays (of bytes) and untyped variables would be a good
replacement for pointers whenever writing a cross-platform code (meaning a
code that would need to target both non-managed and managed platforms)

Not sure, but pascal JVM has its own means of dealing with pointers anyway.
My knowledge is poor on the subject of jvm, but it's well explained in the
wiki!

thanks,
Dmitry
_______________________________________________
fpc-pascal maillist  -  [email protected]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to