[fpc-pascal] Return value of StrToHostAddr and StrToHostAddr6 in sockets unit
Michael Van Canneyt
michael at freepascal.org
Wed May 13 14:36:58 CEST 2020
On Wed, 13 May 2020, Noel Duffy via fpc-pascal wrote:
> On 13/05/20 9:24 pm, Bart via fpc-pascal wrote:
>> On Wed, May 13, 2020 at 10:40 AM Noel Duffy via fpc-pascal
>
>>> As I've already learned the hard way, the sockets unit is compiled in
>>> "fpc" mode, so there's no "out" parameters. Otherwise I would definitely
>>> have used one.
>>
>> {$modeswicth out} perhaps?
>>
>
> I didn't know this existed. I'm not sure of the implications of its use,
> though, so I would like to get the opinion of more experienced FPC
> developers before I use it.
It's OK to use this.
It just enables the use of the out keyword for the current unit, nothing more.
It's safest to add it before the 'interface' keyword.
Michael.
More information about the fpc-pascal
mailing list