[fpc-pascal] Array clearing

Ryan Joseph ryan at thealchemistguild.com
Wed Apr 12 15:46:52 CEST 2017

> On Apr 12, 2017, at 8:05 PM, noreply at z505.com wrote:
> Since fillchar is not a general way to clear an item it almost seems like pascal needs a way to clear things generically, such as Array.clear
> But I guess this would be reinventing OOP, or Ruby where everything is an object and can have .Something tacked on to it.

I agree. Dynamic arrays only advantage is they are managed by the compiler but they’re missing obvious functionality like adding/removing elements so they’re usually pretty useless. Why was the functionality of appending an element to the end never added? That’s one the most basic operations for arrays.

	Ryan Joseph

More information about the fpc-pascal mailing list