[fpc-pascal] ReadLine history works in windows/cmd.exe but not in bash/linux

2010-09-01 Thread Dusan Halicky
Hi. I have simple console application: program test; var s : string; begin while s 'q' do readln(s); end. I compiled it in windows (FPC 2.4.0), run it in cmd.exe and I was surprised that history of commands is working out of the box (by pressing arrow UP). I thought it is done

Re: [fpc-pascal] ReadLine history works in windows/cmd.exe but not in bash/linux

2010-09-01 Thread Dusan Halicky
I compiled it in windows (FPC 2.4.0), run it in cmd.exe and I was surprised that history of commands is working out of the box (by pressing arrow UP). That is standard behaviour for most modern shells. The readln() function has nothing to do with libreadline. The problem you are seeing is

Re: [fpc-pascal] ReadLine history works in windows/cmd.exe but not in bash/linux

2010-09-01 Thread Dusan Halicky
If you run the program twice, you'll see that you can scroll back even to what you typed in the first run of the program; This is clear proof that it is not the program itself which does that. Ok. This somehow convinced me. Can I achieve the same thing in bash?

[fpc-pascal] re: Cannot run mplayer with TProcess when options is poUsePipes in Windows

2008-11-10 Thread Dusan Halicky
is there an mplayer.exe in a directory on the path (or windows directory)? yes. (when I remove poUsePipes the video plays normally) Maybe you need to add poNoConsole? I still can't see a video (nor audio) with this option, however it helps a little (application dont freeze after end with this

Re: [fpc-pascal] re: Cannot run mplayer with TProcess when options is poUsePipes in Windows

2008-11-10 Thread Dusan Halicky
, it appears only on windows. Any ideas? 2008/11/10 Vincent Snijders [EMAIL PROTECTED]: Dusan Halicky schreef: is there an mplayer.exe in a directory on the path (or windows directory)? yes. (when I remove poUsePipes the video plays normally) Maybe you need to add poNoConsole? I still

Re: [fpc-pascal] re: Cannot run mplayer with TProcess when options is poUsePipes in Windows

2008-11-10 Thread Dusan Halicky
You can check if there is output using NumBytesAvailable: Ok, This thing now works (I've also try this but I accidentaly checked NumBytesAvailable after read, it must be checked before read) Thanks, It works now !!! ___ fpc-pascal maillist -

[fpc-pascal] Cannot run mplayer with TProcess when options is poUsePipes in Windows

2008-11-10 Thread Dusan Halicky
Following code works in linux, but not in windows. In windows program freeze, or I don't see mplayer. Thanks. program bug; {$mode objfpc}{$H+} uses Classes, SysUtils, Process; begin with TProcess.Create(nil) do try //Options := [];// this work on both Windows and Linux

[fpc-pascal] fpdoc - Is there tag for function parameters?

2008-09-09 Thread Dusan Halicky
Hi. I use fpdoc to generate documentation. I want to be function parameters documented also, But I affraid fpdoc doesn't support it yet. Here is what I have in html documentation function FooBar( a: integer; b: boolean ):variant; Here is what I want: function FooBar( a: integer;

[fpc-pascal] function now shows bad date (-2 hours)

2008-04-06 Thread Dusan Halicky
Hi. I have this simple demo (in ubuntu, using fpc 2.2.0, locale is sk_SK.utf8): program test; uses SysUtils; begin writeln(DateTimeToStr(now)); end. When I compile it and run it it print 13:44: $ ./test 6-4-08 13:44:32 But the actual date is 15:44: $ date Ne apr 6 15:44:35 CEST 2008

Re: [fpc-pascal] function now shows bad date (-2 hours)

2008-04-06 Thread Dusan Halicky
Is there any function which gives me local time depending on system locale settings? I assume that the problem is that your main clock is set to GMT, so then you have 1 hour timezone + 1 hour summer time difference. IOW, you need to correct that result for time differences.

[fpc-pascal] How to turn on case sensitive identifiers in FPC?

2007-10-05 Thread Dusan Halicky
. Is there any way how to turn on case sensitivity in FPC? Thanks. Dusan Halicky ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal