RE: [fpc-pascal] single application instance

2005-10-05 Thread Jose Pascual
any example of implementation for semaphore in linux which I can use to
know if there is
some instance of my program already running?

> -Mensaje original-
> De: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] En nombre de 
> Matt Emson
> Enviado el: viernes, 23 de septiembre de 2005 18:53
> Para: FPC-Pascal users discussions
> Asunto: Re: [fpc-pascal] single application instance
> 
> 
> > Semaphores <> Mutexes. Semaphores do not always have names 
> and are not 
> > system-wide.
> 
> In my experience, its the other way round. Semaphores are 
> system wide/cross process. Admittedly, they are not always 
> named though.
> 
> ___
> fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org 
> http://lists.freepascal.org/mailman/listinfo/fp> c-pascal
> 
> 
> __ Información de NOD32, revisión 1.1230 
> (20050922) __
> 
> Este mensaje ha sido analizado con  NOD32 antivirus system 
http://www.nod32.com


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] Runetime errors

2005-10-05 Thread Carsten Bager
When a runtime error happens, I would like to display all
possible information
The compiler we are using today can give a message like
this
Runtime error 27
Index out of range
The value -4 is not in the range o 0 .. 3000.
Near line 103
Procedure Test

Would it be possible to do something like this if I write a new
exit procedure?

If this is not possible how about the Turbo Pascal way using the
map file to track the Procedure Name and the source code line
number. I do not think this is possible with FPC because of the
separate assembler and linker, but maybe there is a way around
this.
I am running the FPC code on an embedded ARM platform
without any operating system.
--
Carsten Bager
Bøvlingbjerg El-automatik
Brørupvænget 10
7650 Bøvlingbjerg
Tlf. +4597885222 Fax +4597885434
http://www.beas.dk

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


re: [fpc-pascal] Runetime errors

2005-10-05 Thread David Emerson
Put into your fpc.cfg file:

-gl

to generate the line numbers (that's the really relevant one, right?) It will 
also say what procedure it's inside, as well as a backtrace of calling 
procedures, and their line numbers.

You can also find in fpc.cfg a number of other flags to generate debugging info.

I don't know if it's possible to generate a line like "the number -4 is not 
between 0 and 3000" ... although that would be kind of nice, come to think of 
it.

~David.


  Original Message 
> From: "Carsten Bager" <[EMAIL PROTECTED]>
> Sent: Wednesday, October 05, 2005 8:13 AM
> To: FPC-Pascal users discussions 
> Subject: [fpc-pascal] Runetime errors
> 
> When a runtime error happens, I would like to display all 
> possible information
> The compiler we are using today can give a message like 
> this
> Runtime error 27
> Index out of range
> The value -4 is not in the range o 0 .. 3000.
> Near line 103
> Procedure Test
> 
> Would it be possible to do something like this if I write a new 
> exit procedure?
> 
> If this is not possible how about the Turbo Pascal way using the 
> map file to track the Procedure Name and the source code line 
> number. I do not think this is possible with FPC because of the 
> separate assembler and linker, but maybe there is a way around 
> this. 
> I am running the FPC code on an embedded ARM platform 
> without any operating system.
> -- 
> Carsten Bager
> Bøvlingbjerg El-automatik
> Brørupvænget 10
> 7650 Bøvlingbjerg
> Tlf. +4597885222 Fax +4597885434
> http://www.beas.dk
> 
> ___
> fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal 




___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal