Re: [fpc-pascal] Sample unit code

2009-04-04 Thread Pete Cervasio
On Saturday 04 April 2009 11:40:03 Francisco Reyes wrote: I guess I could try one unit at a time until I find a simple one, but I figure if anyone knows of a simple unit that may be easy to read, that may be a better starting point. Here's a simple unit that may help. I have occasion to add

Re: [fpc-pascal] Re: fstat usage

2008-12-08 Thread Pete Cervasio
On Monday 08 December 2008 10:22:25 Francisco Reyes wrote: Francisco Reyes writes: Trying the fstat function and don't seem to be getting the right values for ctime, mtime and atime. Those values are Unix timestamp values. You need to convert them into TDateTime values. Look for

Re: [fpc-pascal] Windows unit and SyncObjs unit clash

2008-03-26 Thread Pete Cervasio
On Wednesday 26 March 2008 08:51:53 Graeme Geldenhuys wrote: On 26/03/2008, Marco van de Voort [EMAIL PROTECTED] wrote: Hmm, didn't older (6) versions simply have this, and did synobjs get introduced later? In that case, if Delphi can break compat, so can we. I think I still have my copy

Re: [fpc-pascal] unit system;  procedure move();

2008-03-17 Thread Pete Cervasio
On Monday 17 March 2008 06:40:51 Jonas Maebe wrote: On 17 Mar 2008, at 12:34, [EMAIL PROTECTED] wrote: Is the use of the move procedure right? The array length is Maximum-1. When I put this length on value[1], the last entry value[Maximum-1] would be deleted or would be shifted in an

Re: [fpc-pascal] syscalls and fpc

2008-02-16 Thread Pete Cervasio
On Saturday 16 February 2008 14:55:24 ik wrote: On Feb 16, 2008 10:03 PM, Florian Klaempfl [EMAIL PROTECTED] wrote: ik schrieb: 1. There is a support only for up to 6 parameters (plus the instruction itself). Which syscall has more parameters? I don't know, but then again, up until

Re: [fpc-pascal] PASCAL programming for Novice

2007-06-09 Thread Pete Cervasio
On Saturday 09 June 2007 18:46:17 Francisco Reyes wrote: Daniël Mantione writes: It doesn't look for .p by default. Rename to .pas or .pp. Ok thanks. Using .p because that is what vim checks for. Will figure out how to change vim to look for .pp for the coloring. Contents of

Re: [fpc-pascal] FPC only 32 bits?

2007-06-06 Thread Pete Cervasio
On Wednesday 06 June 2007 18:26:15 Francisco Reyes wrote: Henry Vermaak writes: also make sure that the compiler can find your binutils (put it on the path). I don't see a directory by that name. Is the directory called something other than binutils? I don't think I can help with the

Re: [fpc-pascal] How to get UTC time

2007-02-13 Thread Pete Cervasio
On Tuesday 13 February 2007 03:37, Michel Meunier wrote: I work on a program wich need the UTC time, and this program will run with Windows and Linux. So how is it possible to calculate the UTC time under these two OS. Hello, Michel. I do not program under Windows, so I cannot answer that

Re: [fpc-pascal] How to get UTC time

2007-02-13 Thread Pete Cervasio
On Tuesday 13 February 2007 14:25, Marco van de Voort wrote: for me. It needs both the SysUtils and Libc units, which I'm already using for other declarations anyway. Libc is a legacy unit, better use the proper (portable) units, and you'll spare yourself a libc dependancy, AND make it

Re: [fpc-pascal] [SYSTEM]: How detecting if run as root ?

2006-10-11 Thread Pete Cervasio
On Wednesday 11 October 2006 19:37, Andrew Haines wrote: TOUZEAU DAVID wrote: Dear I need to detect if the program is executed as root privileges on Linux system. Did somebody had developped a such function ?? Best regards. Well you can try GetEnv('USER') = 'root'; or

Re: [fpc-pascal] [SYSTEM]: How detecting if run as root ?

2006-10-11 Thread Pete Cervasio
On Wednesday 11 October 2006 20:44, Michalis Kamburelis wrote: Pete Cervasio wrote: The better way would be to use the geteuid function in the libc unit, It would be even better to use FpGetEUid function from the BaseUnix unit. See [http://www.freepascal.org/docs-html/rtl/baseunix

Re: [fpc-pascal] Re: Threads executing in sequence instead of parallel

2006-10-02 Thread Pete Cervasio
On Friday 29 September 2006 04:57, Graeme Geldenhuys wrote: Below is a text (console) thread demo. The one thread counts from 0 to 1k and the other thread counts down from 1k to 0. Again, under Linux, one thread executes and teminates, then the next thread executes and terminates.