[fpc-pascal] ExtractFilePath(GetModuleName(0)) problem

2009-04-10 Thread lloyd thomas
Need Help please "confini := ExtractFilePath(GetModuleName(0))+'\myfile.ini';" returns C:Program FilesMyApp\myfile.ini should be C:\Program Files\MyApp\myfile.ini . Am I doing something wrong? The Problem is intermitent {$IFDEF Windows} confini := ExtractFilePath(GetModuleName(0))+'\Myfile.i

Re: [fpc-pascal] CTRL-Break and asynchronous exec

2009-04-10 Thread Tomas Hajny
On Fri, April 10, 2009 18:10, Jürgen Hestermann wrote: > > Marco van de Voort schrieb: >> However in such cases >> it is easiest to look how FPC's biggest console app (the textmode IDE) >> does >> it. > > Thanks Marco for the quick answer. I tried to find where the IDE does > the keyboard input bu

Re: [fpc-pascal] Return Statement

2009-04-10 Thread Mattias Gaertner
On Fri, 10 Apr 2009 12:57:20 -0400 Richard Ward wrote: > My last post got me thinking about weaning myself from macpas > mode. One of the statements I have found quite useful is the macpas > defined "return" statement which is used to return the function value > and exits immediately from inside

[fpc-pascal] Return Statement

2009-04-10 Thread Richard Ward
My last post got me thinking about weaning myself from macpas mode. One of the statements I have found quite useful is the macpas defined "return" statement which is used to return the function value and exits immediately from inside any nested block. Has there been any thought or discu

Re: [fpc-pascal] FPC : MacMode more info

2009-04-10 Thread Tomas Hajny
On Fri, April 10, 2009 15:01, Joost van der Sluis wrote: > Op donderdag 09-04-2009 om 20:33 uur [tijdzone -0400], schreef Pierre > Paré: > >> I know Pascal well enough but have no prior knowledge on the "Mac >> Dialect" > > Then don't use it. The compiler-modes are there to make it easier for > pe

[fpc-pascal] Re: MacMode More Info / Beginning Mac Dev

2009-04-10 Thread Richard Ward
Pierre Paré wrote: If not the appropriate list for this question, would you redirect the request -- Also, check out the MacPascal List, the Lazarus list and the FPC/ Lazarus Wiki PAges I installed FPC with XCode on an iMac OS X 10.5 I am not a developer , I want to get back at programmi

Re: [fpc-pascal] CTRL-Break and asynchronous exec

2009-04-10 Thread Jürgen Hestermann
> Marco van de Voort schrieb: However in such cases it is easiest to look how FPC's biggest console app (the textmode IDE) does it. Thanks Marco for the quick answer. I tried to find where the IDE does the keyboard input but without success. Where in these 97 files could it be? It seems that

Re: [fpc-pascal] getting system time in linux

2009-04-10 Thread Jan De Bleser
Thanks Rainer, In the end I solved it using UnixToDateTime(FpTime), which is easier of course... Rainer Stratmann schreef: Am Freitag, 10. April 2009 16:47 schrieb Jan De Bleser: You can try this. Not all uses are needed, you have to find out. Rainer uses crt, {$ifdef linux} baseunix, un

Re: [fpc-pascal] getting system time in linux

2009-04-10 Thread Jan De Bleser
Marco van de Voort schreef: In our previous episode, Jan De Bleser said: How is it possible to get the system time in linux? It used to be possible by using 'getsystemtime' of the unit oldlinux, but this unit is no longer available on my compiler... The thing I want to use it for is: I get a

Re: [fpc-pascal] getting system time in linux

2009-04-10 Thread Rainer Stratmann
Am Freitag, 10. April 2009 16:47 schrieb Jan De Bleser: You can try this. Not all uses are needed, you have to find out. Rainer uses crt, {$ifdef linux} baseunix, unix, termio, // serial linux, sysutils, dateutils, unixutil; {$else} windows; {$endif} procedure mylo_os_gettime( var ho

Re: [fpc-pascal] getting system time in linux

2009-04-10 Thread Marco van de Voort
In our previous episode, Jan De Bleser said: > > How is it possible to get the system time in linux? > It used to be possible by using 'getsystemtime' of the unit oldlinux, > but this unit is no longer available on my compiler... > > The thing I want to use it for is: I get a packet form libpcap

Re: [fpc-pascal] CTRL-Break and asynchronous exec

2009-04-10 Thread Marco van de Voort
In our previous episode, J?rgen Hestermann said: > I am trying to port some console programs to Free-Pascal(they use the > CRT unit and originaly where written for Turbo-Pascal then they were > ported to Virtual-Pascal). I use "MODE OBJFPC". Now I am stumbling over > some problems: > > 1.) I ch

[fpc-pascal] getting system time in linux

2009-04-10 Thread Jan De Bleser
Hi, How is it possible to get the system time in linux? It used to be possible by using 'getsystemtime' of the unit oldlinux, but this unit is no longer available on my compiler... The thing I want to use it for is: I get a packet form libpcap, with the time of receival in system time. I wan

[fpc-pascal] CTRL-Break and asynchronous exec

2009-04-10 Thread Jürgen Hestermann
I am trying to port some console programs to Free-Pascal(they use the CRT unit and originaly where written for Turbo-Pascal then they were ported to Virtual-Pascal). I use "MODE OBJFPC". Now I am stumbling over some problems: 1.) I check for keyboard input with the READKEY function. How can I

Re: [fpc-pascal] FPC : MacMode more info

2009-04-10 Thread Joost van der Sluis
Op donderdag 09-04-2009 om 20:33 uur [tijdzone -0400], schreef Pierre Paré: > I know Pascal well enough but have no prior knowledge on the "Mac > Dialect" Then don't use it. The compiler-modes are there to make it easier for people to switch from the dialect they are used to. So only when you a

[fpc-pascal] FPC : MacMode more info

2009-04-10 Thread Pierre Paré
Hi If not the appropriate list for this question, would you redirect the request I installed FPC with XCode on an iMac OS X 10.5 I am not a developer , I want to get back at programming for fun. I did not use C++ long enough to learn it. So I chose to use Pascal that I learned at the unive

Re: [fpc-pascal] compiling lazarus : custombitmap.inc(293, 49) Error: absolute can only be associated with a var or const

2009-04-10 Thread Vincent Snijders
leledumbo schreef: Any entry in bug tracker about this? I'd like to know a workaround since I can't have LNet installed due to this issue (or improvement?). http://wiki.lazarus.freepascal.org/User_Changes_Trunk#Absolute_variable_declarations Vincent _

Re: [fpc-pascal] Halting program without mem leaks

2009-04-10 Thread Vincent Snijders
leledumbo schreef: I need to make a program exited with an exit code other than 0, but without mem leaks. Currently, Halt seems to return control to calling program (or OS) without freeing allocated mem. Exit (called from main program) does freeing, but I can't return any value because main progr

Re: [fpc-pascal] Halting program without mem leaks

2009-04-10 Thread Marco van de Voort
In our previous episode, leledumbo said: > > I need to make a program exited with an exit code other than 0, but without > mem leaks. Currently, Halt seems to return control to calling program (or > OS) without freeing allocated mem. Exit (called from main program) does > freeing, but I can't retu

[fpc-pascal] Halting program without mem leaks

2009-04-10 Thread leledumbo
I need to make a program exited with an exit code other than 0, but without mem leaks. Currently, Halt seems to return control to calling program (or OS) without freeing allocated mem. Exit (called from main program) does freeing, but I can't return any value because main program is considered a p

Re: [fpc-pascal] sockets client server programming

2009-04-10 Thread Rainer Stratmann
Am Donnerstag, 9. April 2009 15:12 schrieb Jürgen Hestermann: > > Rainer Stratmann schrieb: > > > > Exists there a simple example for nonblocking client server programming > > which can be used in linux and windows? > > With fpsocket, fpbind, fpconnect, ... > > Rainer > > I am not sure whether thi

Re: [fpc-pascal] compiling lazarus : custombitmap.inc(293, 49) Error: absolute can only be associated with a var or const

2009-04-10 Thread leledumbo
Any entry in bug tracker about this? I'd like to know a workaround since I can't have LNet installed due to this issue (or improvement?). Marc Weustink wrote: > > You need either a svn version of Lazarus or a compiler < 2.3.1 > -- View this message in context: http://www.nabble.com/compilin