Re: [fpc-pascal] meta data of files

2016-12-14 Thread Lars
On Wed, December 14, 2016 11:57 am, Marc Santhoff wrote: > Hi, > > > I'd like to read out meta data from files. is there any pascal code > supporting this task? > > This is about reading the comment of zip files, the author and > description of word processor files (open document format) and so

Re: [fpc-pascal] file identification using libmagic

2016-12-14 Thread José Mejuto
El 14/12/2016 a las 19:53, Marc Santhoff escribió: Hi, I have made a header port of libmagic which is used by the file(1) command to identify the type of files. Usage examples are availble, too. Hello, Just a note, I was using magic.dll for Windows a few years ago and I was being forced to

Re: [fpc-pascal] List of integers? Any class available in RTL or FCL to help?

2016-12-14 Thread Graeme Geldenhuys
On 2016-12-14 17:01, Jonas Maebe wrote: > The first > commit for FPC generics support was on 21 December 2005 (r2020). Dito :) I was just about to say the same. You can't look at the FPC release date, you need to look at the generics commit date - those two dates could be far part - and in this

[fpc-pascal] meta data of files

2016-12-14 Thread Marc Santhoff
Hi, I'd like to read out meta data from files. is there any pascal code supporting this task? This is about reading the comment of zip files, the author and description of word processor files (open document format) and so on. TIA, Marc ___

[fpc-pascal] file identification using libmagic

2016-12-14 Thread Marc Santhoff
Hi, I have made a header port of libmagic which is used by the file(1) command to identify the type of files. Usage examples are availble, too. Since it could be of general interest, I'm posting it here. Test it, stick it in LCCR or whatever. Have fun, Marc unit libmagic; interface { Made by

Re: [fpc-pascal] List of integers? Any class available in RTL or FCL to help?

2016-12-14 Thread Jonas Maebe
On 14/12/16 17:46, Marco van de Voort wrote: In our previous episode, Sven Barth said: The thing is it's not even Delphi-compatibility as we had the syntax before Delphi implemented its own (that's why we have "generic" and "specialize" keywords). - FPC 2.2.0 release September 2007 - Delphi

Re: [fpc-pascal] List of integers? Any class available in RTL or FCL to help?

2016-12-14 Thread Marco van de Voort
In our previous episode, Sven Barth said: > > Out of curiosity, if there was a blank slate -- no Delphi-compatibility > > to worry about -- what syntax would you have chosen? > > The thing is it's not even Delphi-compatibility as we had the syntax before > Delphi implemented its own (that's why

Re: [fpc-pascal] List of integers? Any class available in RTL or FCL to help?

2016-12-14 Thread Sven Barth
Am 14.12.2016 14:31 schrieb "Lars" : > I think I once thought, can I make an "array of array of const" to try to > expand on the power of array of const. Which seems like a silly idea, but > academically interesting. Also, Varients are related to general > programming (generic).

Re: [fpc-pascal] List of integers? Any class available in RTL or FCL to help?

2016-12-14 Thread Graeme Geldenhuys
On 2016-12-14 12:55, Lars wrote: > Sorry, FPS --> FPC. My MacOs laptop that I'm on, testing it out, keeps > automatically spell checking stuff... and made fps become fps ^^^ LOL. You can't win with a Mac. ;-) Regards, Graeme

Re: [fpc-pascal] List of integers? Any class available in RTL or FCL to help?

2016-12-14 Thread Lars
On Wed, December 14, 2016 12:35 am, I previously wrote: > But I don't know enough about fps generics to know if stuff needs to be > forced into a class, as I have to start using generics and testing it out > to really know. Sorry, FPS --> FPC. My MacOs laptop that I'm on, testing it out, keeps

Re: [fpc-pascal] List of integers? Any class available in RTL or FCL to help?

2016-12-14 Thread Lars
On Wed, December 14, 2016 12:09 am, I previously wrote: > similar to freepascal's VARARGS > Correction: I really meant ARRAY of CONST, but varargs is kind of related. i.e.: http://www.freepascal.org/docs-html/3.0.0/ref/refsu70.html#x181-20300014.4.6 is a simple way of generically programming,

Re: [fpc-pascal] List of integers? Any class available in RTL or FCL to help?

2016-12-14 Thread Sven Barth
Am 14.12.2016 12:59 schrieb "Graeme Geldenhuys" < mailingli...@geldenhuys.co.uk>: > > On 2016-12-14 10:14, Sven Barth wrote: > >> > enough in HTML enough. But that's not really a real point, that's just a > >> > pet peeve to deal with... > > I'm not a fan of the <> syntax for generics either,

Re: [fpc-pascal] List of integers? Any class available in RTL or FCL to help?

2016-12-14 Thread Graeme Geldenhuys
On 2016-12-14 10:14, Sven Barth wrote: >> > enough in HTML enough. But that's not really a real point, that's just a >> > pet peeve to deal with... > I'm not a fan of the <> syntax for generics either, cause it's a PITA to Out of curiosity, if there was a blank slate -- no Delphi-compatibility to

Re: [fpc-pascal] TFileStream.WriteBuffer() and RAM used ?

2016-12-14 Thread fredvs
Hello Jose. Huh, of course, your code is more logical. OK, I understand what you mean. I will commit your idea asap. Many thanks. Fre;D - Many thanks ;-) -- View this message in context:

Re: [fpc-pascal] List of integers? Any class available in RTL or FCL to help?

2016-12-14 Thread Sven Barth
Am 14.12.2016 08:35 schrieb "Lars" : > But I don't know enough about fps generics to know if stuff needs to be > forced into a class, as I have to start using generics and testing it out > to really know. From what I've seen though, I'm certainly not and have > never been a fan

Re: [fpc-pascal] List of integers? Any class available in RTL or FCL to help?

2016-12-14 Thread Sven Barth
Am 14.12.2016 08:09 schrieb "Lars" : > A general purpose function that handles multiple types of arrays without > rewriting the code for each array type looks like this: > > procedure AddItemToArray( > const item: {$I T.inc}; var arr: {$I TArr.inc}); overload; > var