Re: [fpc-pascal] Blockread blockwrite var vs out parameters

2015-12-16 Thread Bart
On 12/16/15, Jonas Maebe wrote: > As far as I know, Delphi only has errors and warnings. It does not have > separate categories such as notes and hints, unlike FPC. I hardly ever use Delphi anymore for many years now, so you might be right. Let's stop this discussion, it's getting a bit OT and a

Re: [fpc-pascal] Blockread blockwrite var vs out parameters

2015-12-16 Thread Jonas Maebe
On 16/12/15 23:16, Bart wrote: On 12/16/15, Jonas Maebe wrote: But D7 does not give me a warning on FillChar(). We don't give a warning either. The category of hints was created exactly for those messages that have a high chance of being a false positive. That should have been: My D7 does

Re: [fpc-pascal] Blockread blockwrite var vs out parameters

2015-12-16 Thread Bart
On 12/16/15, Jonas Maebe wrote: >> But D7 does not give me a warning on FillChar(). > > We don't give a warning either. The category of hints was created > exactly for those messages that have a high chance of being a false > positive. That should have been: My D7 does not give me a warning or h

[fpc-pascal] unit for PHostEnt definition

2015-12-16 Thread Andreas Klausmann
Hi, after a whole night of unsuccessful googling I'm still wondering, which unit(s) I have to use to find a type definition of PHostEnt in linux. I need it for the gethostbyname function. In Windows it's defined in winsock and there should be an equivalent record in linux according to systems "ma

Re: [fpc-pascal] specialize, identifier not found

2015-12-16 Thread Sven Barth
On 16.12.2015 18:09, Santiago A. wrote: El 16/12/2015 a las 17:57, Santiago A. escribió: Which FPC version? Which language mode? Sorry, I have forgotten version. {$mode Delphi} FPC 2.6.4 Same result on Win XP 32bits and Linux Gtk 64bits I'd suggest you to switch to FPC 3.0.0. While not relat

Re: [fpc-pascal] specialize, identifier not found

2015-12-16 Thread Sven Barth
On 16.12.2015 17:57, Santiago A. wrote: El 16/12/2015 a las 17:25, Sven Barth escribió: Am 16.12.2015 16:12 schrieb "Santiago A." <s...@ciberpiula.net>: > > Type > TRegAlias=record >AliasName:string > ... > end; > > TArrayAlias=specialize TArray; // <=

Re: [fpc-pascal] specialize, identifier not found

2015-12-16 Thread leledumbo
> {$mode Delphi} > > I've just tried {$mode objfpc} and compiles type declaration, (Delphi mode > can't understand generics?) Delphi mode follows Delphi generics syntax. -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/specialize-identifier-not-found-tp57233

Re: [fpc-pascal] Blockread blockwrite var vs out parameters

2015-12-16 Thread Jonas Maebe
On 16/12/15 18:14, Bart wrote: On 12/16/15, Jonas Maebe wrote: We could, but that would be an extremely ugly hack. Yes I know it's very ugly. But D7 does not give me a warning on FillChar(). We don't give a warning either. The category of hints was created exactly for those messages that

Re: [fpc-pascal] Blockread blockwrite var vs out parameters

2015-12-16 Thread Bart
On 12/16/15, Jonas Maebe wrote: > We could, but that would be an extremely ugly hack. Yes I know it's very ugly. But D7 does not give me a warning on FillChar(). But agreed, we should avoid being ugly ;-) Bart ___ fpc-pascal maillist - fpc-pascal@l

Re: [fpc-pascal] specialize, identifier not found

2015-12-16 Thread Santiago A.
El 16/12/2015 a las 17:57, Santiago A. escribió: > Which FPC version? Which language mode? Sorry, I have forgotten version. {$mode Delphi} FPC 2.6.4 Same result on Win XP 32bits and Linux Gtk 64bits -- Saludos Santiago A. ___ fpc-pascal maillist -

Re: [fpc-pascal] specialize, identifier not found

2015-12-16 Thread Santiago A.
El 16/12/2015 a las 17:25, Sven Barth escribió: > > Am 16.12.2015 16:12 schrieb "Santiago A." >: > > > > Type > > TRegAlias=record > >AliasName:string > > ... > > end; > > > > TArrayAlias=specialize TArray; // < Error here > > > > defconexion.pas(71,1

Re: [fpc-pascal] Blockread blockwrite var vs out parameters

2015-12-16 Thread Frederic Da Vitoria
2015-12-16 16:19 GMT+01:00 Jonas Maebe : > > Santiago A. wrote on Wed, 16 Dec 2015: > > El 16/12/2015 a las 11:55, Jonas Maebe escribió: >> >>> while with "out", they are first finalised >>> >> Sorry, what does this mean? >> > > http://www.freepascal.org/docs-html/rtl/system/finalize.html > Not i

Re: [fpc-pascal] specialize, identifier not found

2015-12-16 Thread Sven Barth
Am 16.12.2015 16:12 schrieb "Santiago A." : > > Type > TRegAlias=record > ... > end; > > TArrayAlias=specialize TArray; // < Error here > > defconexion.pas(71,14) Error: Identifier not found "specialize" > defconexion.pas(71,25) Error: Error in type definition > defconexion.pas(71,25) Fa

Re: [fpc-pascal] Blockread blockwrite var vs out parameters

2015-12-16 Thread Jonas Maebe
Bart wrote on Wed, 16 Dec 2015: Can't we hardcode the compiler to not give a hint on FillChar and related? Especially since these are used to initialize (null) variables. We could, but that would be an extremely ugly hack. You can always write and use your own wrapper if you know that you w

Re: [fpc-pascal] Blockread blockwrite var vs out parameters

2015-12-16 Thread Bart
On 12/16/15, Jonas Maebe wrote: > The result parameters can be changed. The BlockRead buffer parameter > cannot be changed for the same reason that the parameters of fillchar > and move cannot be changed: Can't we hardcode the compiler to not give a hint on FillChar and related? Especially

Re: [fpc-pascal] Blockread blockwrite var vs out parameters

2015-12-16 Thread Jonas Maebe
Santiago A. wrote on Wed, 16 Dec 2015: El 16/12/2015 a las 11:55, Jonas Maebe escribió: while with "out", they are first finalised Sorry, what does this mean? http://www.freepascal.org/docs-html/rtl/system/finalize.html Jonas ___ fpc-pascal mail

Re: [fpc-pascal] Blockread blockwrite var vs out parameters

2015-12-16 Thread Santiago A.
El 16/12/2015 a las 11:55, Jonas Maebe escribió: > while with "out", they are first finalised Sorry, what does this mean? -- Saludos Santi s...@ciberpiula.net ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-

[fpc-pascal] specialize, identifier not found

2015-12-16 Thread Santiago A.
Type TRegAlias=record ... end; TArrayAlias=specialize TArray; // < Error here defconexion.pas(71,14) Error: Identifier not found "specialize" defconexion.pas(71,25) Error: Error in type definition defconexion.pas(71,25) Fatal: Syntax error, ";" expected but "identifier TARRAY" foun

Re: [fpc-pascal] Blockread blockwrite var vs out parameters

2015-12-16 Thread Frederic Da Vitoria
2015-12-16 11:55 GMT+01:00 Jonas Maebe : > > Santiago A. wrote on Wed, 16 Dec 2015: > > In functions blockread and blockwrite, the result parameter is "var". >> And in blockread buffer is also "var". >> >> Couldn't they be marked as "out" instead of "var"?. >> > > The result parameters can be chan

Re: [fpc-pascal] Blockread blockwrite var vs out parameters

2015-12-16 Thread Jonas Maebe
Santiago A. wrote on Wed, 16 Dec 2015: In functions blockread and blockwrite, the result parameter is "var". And in blockread buffer is also "var". Couldn't they be marked as "out" instead of "var"?. The result parameters can be changed. The BlockRead buffer parameter cannot be changed for

[fpc-pascal] Blockread blockwrite var vs out parameters

2015-12-16 Thread Santiago A.
In functions blockread and blockwrite, the result parameter is "var". And in blockread buffer is also "var". Couldn't they be marked as "out" instead of "var"?. It's not an aesthetic or academic change, I would save a lot of "not initialized" warnings that flood the message window. Of course I