Re: [fpc-pascal] Suppressing ^C signal from stdin

2014-01-02 Thread Mark Morgan Lloyd
Tomas Hajny wrote: On Wed, January 1, 2014 20:48, Mark Morgan Lloyd wrote: When reading characters from a program's stdin using fpRead(), what's the best way of suppressing ^C so that it doesn't raise SIGTERM or whatever? I want to be able to handle signals indicating e.g. a UPS power-failure

[fpc-pascal] how to initialize a SearchRec var?

2014-01-02 Thread waldo kitty
understanding that SearchRec has different formats for different OS targets, we've tried to use fillchar to initialize it to an empty record... unfortunately that does not remove the hint... instead the hint points to the fillchar line... we do not want to turn off hints so how can we

Re: [fpc-pascal] how to initialize a SearchRec var?

2014-01-02 Thread Jonas Maebe
On 02/01/14 20:21, waldo kitty wrote: understanding that SearchRec has different formats for different OS targets, we've tried to use fillchar to initialize it to an empty record... unfortunately that does not remove the hint... instead the hint points to the fillchar line... It is virtually

Re: [fpc-pascal] how to initialize a SearchRec var?

2014-01-02 Thread Florian Klämpfl
Am 02.01.2014 20:21, schrieb waldo kitty: understanding that SearchRec has different formats for different OS targets, we've tried to use fillchar to initialize it to an empty record... unfortunately that does not remove the hint... instead the hint points to the fillchar line... we do

Re: [fpc-pascal] how to initialize a SearchRec var?

2014-01-02 Thread Sven Barth
On 02.01.2014 20:21, waldo kitty wrote: understanding that SearchRec has different formats for different OS targets, we've tried to use fillchar to initialize it to an empty record... unfortunately that does not remove the hint... instead the hint points to the fillchar line... we do not want

Re: [fpc-pascal] how to initialize a SearchRec var?

2014-01-02 Thread Sven Barth
Sorry for quoting the whole message... hit the wrong key *blush* Regards, Sven ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] how to initialize a SearchRec var?

2014-01-02 Thread Sven Barth
On 02.01.2014 20:50, Florian Klämpfl wrote: Am 02.01.2014 20:21, schrieb waldo kitty: understanding that SearchRec has different formats for different OS targets, we've tried to use fillchar to initialize it to an empty record... unfortunately that does not remove the hint... instead the hint

Re: [fpc-pascal] how to initialize a SearchRec var?

2014-01-02 Thread Mark Morgan Lloyd
Sven Barth wrote: === code begin === var dirinfo: SearchRec; begin dirinfo := Default(SearchRec); Out of curiosity, does this work: var dirinfo: SearchRec= Default(SearchRec); -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his

Re: [fpc-pascal] how to initialize a SearchRec var?

2014-01-02 Thread waldo kitty
On 1/2/2014 2:52 PM, Sven Barth wrote: Beginning with 2.7.1 you can use the new Default() intrinsic which takes a type name as first and only argument (it returns a 0 initialized value of that type): 2.7.1 which means that we still have to respond to queries with older versions... ok, i think

Re: [fpc-pascal] how to initialize a SearchRec var?

2014-01-02 Thread waldo kitty
On 1/2/2014 4:27 PM, Mark Morgan Lloyd wrote: Sven Barth wrote: === code begin === var dirinfo: SearchRec; begin dirinfo := Default(SearchRec); Out of curiosity, does this work: var dirinfo: SearchRec= Default(SearchRec); +1 ;) what i run into is porting old code and trying to

Re: [fpc-pascal] how to initialize a SearchRec var?

2014-01-02 Thread Sven Barth
On 02.01.2014 22:27, Mark Morgan Lloyd wrote: Sven Barth wrote: === code begin === var dirinfo: SearchRec; begin dirinfo := Default(SearchRec); Out of curiosity, does this work: var dirinfo: SearchRec= Default(SearchRec); Not yet. It's on my ToDo list however since I implemented

Re: [fpc-pascal] cannot read /sys/class/net/eth1/address even as root user on linux

2014-01-02 Thread Dennis Poon
Michael Van Canneyt wrote: On Thu, 5 Dec 2013, Dennis Poon wrote: I tried to read the mac address in the captioned file path. In terminal, I can simply 'cat' and display the mac address. In FPC, when I tried to use TFileStream to read it, FS :=

Re: [fpc-pascal] how to initialize a SearchRec var?

2014-01-02 Thread Mark Morgan Lloyd
Sven Barth wrote: On 02.01.2014 22:27, Mark Morgan Lloyd wrote: Sven Barth wrote: === code begin === var dirinfo: SearchRec; begin dirinfo := Default(SearchRec); Out of curiosity, does this work: var dirinfo: SearchRec= Default(SearchRec); Not yet. It's on my ToDo list however