Recent

Author Topic: strange behaviour with nested WITH statements.  (Read 1809 times)

Curt Carpenter

  • Sr. Member
  • ****
  • Posts: 417
Re: strange behaviour with nested WITH statements.
« Reply #15 on: May 22, 2024, 12:59:40 am »
No, it is _not_ correct and the reason is very simple, in an array the bounds are part of the _data type_ definition.  Simply ignoring the bounds as FPC does is like suddenly treating a string as a floating point because the compiler found it convenient and less work than to treat it as what it really is.
...

I'd add that willfully violating array bounds, even when it may be possible/useful/clever, is hardly a prescription for writing reader-friendly code.   Not that all code is written with some future maintainer in mind...

 

TinyPortal © 2005-2018