> On Oct 7, 2020, at 11:02 AM, Mattias Gaertner via fpc-pascal
> wrote:
>
> Only in FPC:
>
> {$unitpath sources}
> interface
> uses
> TOMLParser, TOMLTypes;
Some interesting stuff here, thanks. Almost there but for some reason
Scanner.pas is not found even though it's in the same directory
On Wed, 7 Oct 2020 10:53:16 -0600
Ryan Joseph via fpc-pascal wrote:
> I'm trying "uses in" which I never knew existed before.
>
> The idea is that I provide a path to TOML.pas using -Fu then use the
> "in" syntax to reference the units which are in a subdirectory. This
> makes it safe from the p
I'm trying "uses in" which I never knew existed before.
The idea is that I provide a path to TOML.pas using -Fu then use the "in"
syntax to reference the units which are in a subdirectory. This makes it safe
from the project importing the unit so any private units in the subdirectory
don't over
Here's another interesting option I considered. You can call Scandir which
returns a record with an enumerator. You can then use this to drop right into
the for loop. It doesn't allocate memory and you can break the loop to stop the
iteration. The benefit is you can avoid costly memory allocatio
> On Oct 7, 2020, at 2:19 AM, Michael Van Canneyt via fpc-pascal
> wrote:
>
> I see Delphi has something similar, so I will add an implementation. But I
> need to study the options they provide so we can make a reasonably
> compatible version :)
Excellent thanks. It looks like Lazarus has Fi
On Tue, 6 Oct 2020, Ryan Joseph via fpc-pascal wrote:
Since we're on the topic how about another one-liner for reading all the files
in directory into a dynamic array? This has the added benefit of getting
enumeration for free. This is standard stuff for working with files in
scripting lang