Re: [fpc-pascal] Longstrings

2012-07-04 Thread Bart
On 7/4/12, Rainer Stratmann wrote: > Next question is how to put asmmode intel global on? Type fpc -h (in a console) to see all commandine parameters. Then take a look at the -R switch. Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.

Re: [fpc-pascal] Re: Initialization of class field

2012-08-01 Thread Bart
/fpc-pascal > [OT] Ideal programming Language (ObjectPascal 10.1?), reduced typing. Program AnyProgram; begin MyPrgram := TMyProgram.Create(ReadMyMindAndCreateWhatIWantNow); end. Write Once, Build Different Things Any Time, Any OS, Any Platform... Bart _

[fpc-pascal] Possible RTFM question: is there something like an IsRootPath() function?

2012-08-19 Thread Bart
ich we would like to avoid if possible. (See: http://svn.freepascal.org/cgi-bin/viewvc.cgi/trunk/converter/convertdelphi.pas?root=lazarus&r1=38276&r2=38275&pathrev=38276 ) Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org htt

Re: [fpc-pascal] Possible RTFM question: is there something like an IsRootPath() function?

2012-08-20 Thread Bart
D := ExtractFileDrive(APath); Len := Length(D); System.Delete(APath, 1, Len); Result := (Length(APath) = 1) and (APath[1] in AllowDirectorySeparators); end; Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.

Re: [fpc-pascal] Possible RTFM question: is there something like an IsRootPath() function?

2012-08-20 Thread Bart
Given your comments, I can see it's unlikely we will have such a general function, given all the possible exceptions mentioned above. Thanks everybody for your input. Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Searching for files all over the disk

2012-08-20 Thread Bart
s no good reason for doing so. As explained above, there is. > Only paths specified by the user (i.e. in config) should be searched. A valid suggestion on how to improve the converter! Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org h

Re: [fpc-pascal] pls help in pascal programmation error

2012-08-29 Thread Bart
tion marks of course). I explained this to you in the forum. Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Windows installer fails to add fpc binaries to PATH

2012-09-14 Thread Bart
y on my Win7 laptop. You might want to have"administrator privileges whilst installing (IIRC modifying the global PATH variable requires administrator privileges). Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.

Re: [fpc-pascal] Windows installer fails to add fpc binaries to PATH

2012-09-15 Thread Bart
administrator password when I installed 2.6.0. (Win7-64) Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

[fpc-pascal] fpc: -vm switch

2012-11-18 Thread Bart
does trunk throw an error when using -vm? Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] fpc: -vm switch

2012-11-19 Thread Bart
number after -vm gives an errormessage here (still with 2.6.0). Can you give me a working example? (I cannot access ftp://ftp.freepascal.org/pub/fpc/docs-pdf/chart.pdf currenly, it gives a time-out) Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] fpc: -vm switch

2012-11-19 Thread Bart
On 11/19/12, Tomas Hajny wrote: >> Am I missing something? > > Yes, the last line. ;-) I'm feeling rather stupid right now... Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] fpc: -vm switch

2012-11-19 Thread Bart
On 11/19/12, Tomas Hajny wrote: >> Can you give me a working example? > > test.pas: > --- > var > C: cardinal; > begin > C := 1; > WriteLn (-1 + C); > end. > === > > fpc -vwh test.pas > > fpc -vwh -vm4035 test.pas > &

Re: [fpc-pascal] Free Pascal 2.6.2 rc1

2012-11-26 Thread Bart
ess) a previous version of Inno that still supports Win9x (as was done for Lazarus 1.0)? Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Free Pascal 2.6.2 rc1

2012-11-27 Thread Bart
er vmplayer on the other hardware... > > Could you try it out and report? I will try on my native WinMe machine. Thanks for taking the trouble! Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Free Pascal 2.6.2 rc1

2012-11-27 Thread Bart
ce.exe 13273 KB29-10-2012 18:25:00 fpc-2.6.2rc1.i386-win32.exe 40049 KB29-10-2012 18:21:00 fpc-2.6.2rc1.x86_64-win64.exe 22271 KB29-10-2012 19:09:00 Tested on 2012-11-28 0:10 CET Bart ___ fpc-pascal maillist

Re: [fpc-pascal] Free Pascal 2.6.2 rc1

2012-11-28 Thread Bart
On 11/28/12, Pierre Free Pascal wrote: > It was indeed, and is now also on freppascal.stacl.nl. I successfully installed the win95 version and managed to rebuild Lazarus with it, so I guess it's OK. Bart ___ fpc-pascal maillist - fp

Re: [fpc-pascal] Int64 is not an ordinal...

2013-01-05 Thread Bart
On 1/5/13, Michael Van Canneyt wrote: > Because they don't fit in 32 bits. Which (to me) raises the question: why do "true ordinal" values have to fit in 32 bits? Bart ___ fpc-pascal maillist - fpc-pascal@lists.f

Re: [fpc-pascal] Int64 is not an ordinal...

2013-01-06 Thread Bart
On 1/6/13, Florian Klämpfl wrote: > Because operations like array accesses require that they fit into one > register. OK For the illeterate that I am, thich raises yet another dumb question: 64-bit CPU's don't have 64-bit registers? Bart ___

Re: [fpc-pascal] Int64 is not an ordinal...

2013-01-06 Thread Bart
On 1/6/13, Florian Klämpfl wrote: >>> For the illeterate that I am, thich raises yet another dumb question: >>> 64-bit CPU's don't have 64-bit registers? >> >> Try with a compiler for a 64 bit compiler. Okay, now I am feeling realy s

Re: [fpc-pascal] TStringList.InsertItem

2013-02-08 Thread Bart
On 2/8/13, Michael Van Canneyt wrote: > It could do that, feel free to provide a patch :) Done: http://bugs.freepascal.org/view.php?id=23860 Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listi

Re: [fpc-pascal] Re: Fpc Access Violation if AppConfigDir doesn't exist.

2013-02-09 Thread Bart
receCreate parameter is usefull) __and check__ if this went OK. So, no matter how we change the GetAppConfigDir() function, it will always require code for checking if all went OK. Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists

Re: [fpc-pascal] Re: Fpc Access Violation if AppConfigDir doesn't exist.

2013-02-09 Thread Bart
ir(Global: Boolean; ForceCreate: Boolean; WhatToDoIfCreationFails: TProcedure) would "solve" the original problem ;-) Bart Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

[fpc-pascal] TStringList.Put calls change even if value hasn't changed

2013-02-10 Thread Bart
elaborate on this? Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] TStringList.Put calls change even if value hasn't changed

2013-02-11 Thread Bart
t there). Thanks for explaining. Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] TStringList.Put calls change even if value hasn't changed

2013-02-11 Thread Bart
On 2/11/13, Michael Van Canneyt wrote: > I am aware of this. > > But the impact of changing it is impossible to guess, so it is not > subject to change. > Which is fine by me. I just wondered, and now I'm informed... And with that new knowledge I can improve my

Re: [fpc-pascal] Make TStringList.ExchangeItems virtual?

2013-02-15 Thread Bart
tual version (which could be called by the > default implementation of ExchangeItem as well). Should I open a ticket in bugtracker for this? Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Make TStringList.ExchangeItems virtual?

2013-02-16 Thread Bart
On 2/15/13, Michael Van Canneyt wrote: >> Should I open a ticket in bugtracker for this? > > Yes, please. Done: http://bugs.freepascal.org/view.php?id=23899 Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.fr

Re: [fpc-pascal] differences between .pp and .pas files

2013-02-25 Thread Bart
On 2/25/13, Graeme Geldenhuys wrote: > And a large argument against .pp extensions is that NO editor out there > (except for FP Text IDE and Lazarus) knows about .pp, LazEdit (or EPlus)? Bart ___ fpc-pascal maillist - fpc-

Re: [fpc-pascal] a proposal about "with" syntax

2013-03-18 Thread Bart
On 3/18/13, Jürgen Hestermann wrote: > You won't cripple down all variables to one letter names A, B, C only > because this is easier to type, won't you? You would if you'ld be programming in MUMPS ;-) Bart ___ fpc-pascal ma

Re: [fpc-pascal] Failed manual page

2013-03-21 Thread Bart
Already reported as bug #0023357 in the bugtracker. Bart On 3/21/13, Daniel Gaspary wrote: > The page "Command-line options and switches Reference chart.. "[1] > referenced at Manuals page[2] seems to be buggy. > > [1] http://www.freepascal.org/docs-html/chart

Re: [fpc-pascal] Re: Problem using Free-Pascal in Win98

2013-04-03 Thread Bart
On 4/3/13, leledumbo wrote: > I think the OP is using FP console IDE, many people just can't distinguish > IDE and compiler... (no offense) If so, then he should look at http://bugs.freepascal.org/view.php?id=9437 Bart ___ fpc-pascal maill

Re: [fpc-pascal] Windows backslash

2013-04-22 Thread Bart
Fpc ParamStr() handles the \^-^\ part correctly it seems (see bugreport). Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] MS DOS 8086 compiler?

2013-04-27 Thread Bart
5 kg) IBM XT with 5.25" floppy disk. HD is appr. 10 MB (decaying...) Problem of course wil be to get the compiler on the floppy disks, and then hope my HD is large enough. (It cost about 10,000 Dfl (appr 4,500 € / $ 5000) at the time of purgase.) Bart ___

Re: [fpc-pascal] Windows backslash

2013-04-28 Thread Bart
should be brave enought to try and replicate/confirm the described problem. Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Windows backslash

2013-04-28 Thread Bart
On 4/28/13, Marco van de Voort wrote: > Maybe the ^-as-an-escape is a shell-only convention. The compiler doesn't > work through the shell. Make probably does. But then the shell would make it \-\. Converting SomePath\^-^\SomePath into SomePath^-^\SomePath looks more like

Re: [fpc-pascal] Windows backslash

2013-04-28 Thread Bart
On 4/28/13, Bart wrote: > Someone should be brave enought to try and replicate/confirm the > described problem. Just did that, and indeed the error occurred. So, confirmed. Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.or

[fpc-pascal] Stupid ExcludeTrailingPathdelimiter question

2013-05-12 Thread Bart
is very old and does not have the ExcludeTrailingPathDelimiter function, so I cannot test how Delphi behaves. Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Re: Stupid ExcludeTrailingPathdelimiter question

2013-05-12 Thread Bart
On 5/12/13, leledumbo wrote: > Then it's ShellTreeView code that is wrong, file a bug report. The behavior > of ExcludeTrailingPathDelimiter is correct IMHO. Fixed TShelltreeView already. Bart ___ fpc-pascal maillist -

Re: [fpc-pascal] Stupid ExcludeTrailingPathdelimiter question

2013-05-12 Thread Bart
On 5/12/13, Mattias Gaertner wrote: > Use ChompPathDelim instead. That works. Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Stupid ExcludeTrailingPathdelimiter question

2013-05-19 Thread Bart
On 5/12/13, Mattias Gaertner wrote: > Use ChompPathDelim instead. That only works if you use the LazFileUtils version. The one from FileUtil behaves just liek excludeTrailingPathdelimiter(). Bart ___ fpc-pascal maillist - fpc-pas

Re: [fpc-pascal] FPC / Lazarus install on Fedora 18

2013-05-22 Thread Bart
I installed fpc 2.6.2 from the installscript (not from rpm) in /usr/local. This works well. Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] FPC / Lazarus install on Fedora 18

2013-05-23 Thread Bart
On 5/22/13, m...@rpzdesign.com wrote: > Which package did you download? (Source package or other?) fpc-2.6.2.i386-linux.tar E.g. form http://freepascal.org/down/i386/linux-netherlands.var Bart ___ fpc-pascal maillist - fpc-pas

[fpc-pascal] Inherited and not virtual/overridden procedures

2013-06-11 Thread Bart
warning or error. It outputs: C:\Users\Bart\LazarusProjecten\ConsoleProjecten>test TFoo.Bar TFooChild.Bar Why then would I need virtual and override anymore? Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.o

Re: [fpc-pascal] Inherited and not virtual/overridden procedures

2013-06-12 Thread Bart
or TFoo.Bar and wether or not I use override for TFooChild.Bar declarations. In case of FooChild: TFoo it outputs "TFoo.bar" In case of FooChild: TFooChild it outputs "TFoo.Bar" "TFooChild.Bar" in all scenario's I could think of. Bart _

Re: [fpc-pascal] Inherited and not virtual/overridden procedures

2013-06-12 Thread Bart
OK now I see the difference. Not making them virtual/ovverride the shows only TFoo.Bar, whilst making them virtual/override shows the TFooChild.Bar implementation. Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepasc

Re: [fpc-pascal] Lazarus produces Fatal: Internal error 200602035

2013-07-30 Thread Bart
be re-opened (by someone who can do that), rather than creating a new bugreport. Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Lazarus produces Fatal: Internal error 200602035

2013-07-30 Thread Bart
: http://bugs.freepascal.org/view.php?id=24801 Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

[fpc-pascal] ExpandFileName failure on long filenames on Linux

2013-08-31 Thread Bart
the first 255 characters of the current directory. (This issue poped up whilst investigating http://bugs.freepascal.org/view.php?id=24885) Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] ExpandFileName failure on long filenames on Linux

2013-08-31 Thread Bart
though as long as {$H+} is specified?) Here's my very long directory: [bart@localhost 012345679]$ pw

Re: [fpc-pascal] ExpandFileName failure on long filenames on Linux

2013-08-31 Thread Bart
ut because the offending code is in a generic inc file, I suspect it happens on Windows as well. On Linux I saw several file related functions that seem to handle only shortstrings... Should I file a bugreport? Bart ___ fpc-pascal maillist - fpc-pas

Re: [fpc-pascal] ExpandFileName failure on long filenames on Linux

2013-08-31 Thread Bart
aid: > This is all already fixed in the cpstrrtl branch. If this applies to _all_ file operation functions, then maybe just wait? Fixing only GetDir makes little sense to me. Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http:/

Re: [fpc-pascal] ExpandFileName failure on long filenames on Linux

2013-09-01 Thread Bart
n is documented somewhere?) Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] ExpandFileName failure on long filenames on Linux

2013-09-01 Thread Bart
back again. If I understand you correctly: This would mean that (in the cpstr branch) calling any IO function with LongStrings (or the like) will NOT suffer from the problems the shortstring counterparts have? Bart ___ fpc-pascal maillist

Re: [fpc-pascal] ExpandFileName failure on long filenames on Linux

2013-09-01 Thread Bart
On 9/1/13, Jonas Maebe wrote: > Correct. Thanks for the explanations. Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

[fpc-pascal] DoDirSeparators and special filenames on Windows

2013-09-07 Thread Bart
uld DoDirSeparators handle this case and leave the filename untouched if it starts with '\\?\', or should we leave it up to the programmer not calling functions like ExpandFilename if a filename starts with '\\?\' Note: if you want to test what windo

Re: [fpc-pascal] DoDirSeparators and special filenames on Windows

2013-09-07 Thread Bart
On 9/7/13, Jürgen Hestermann wrote: > Am 2013-09-07 12:52, schrieb Bart: > > > Note that '//?/C:/foo/bar' in contrast happily opens 'C:\foo\bar' > > (nice touch from M$). > > Why is this a "nice touch"? IMO it is crap. You missed the inten

Re: [fpc-pascal] DoDirSeparators and special filenames on Windows

2013-09-07 Thread Bart
may not want to call ExpandFilename(), > > since on Windows this is not threadsafe). > > Then you only have the choice between relative paths working for long paths > or threadsafe programs. Well then, say goodbye to the Lazarus IDE, bec

Re: [fpc-pascal] DoDirSeparators and special filenames on Windows

2013-09-08 Thread Bart
on that uses that) on such a filename. It would be nice however if a "formal" point of view from the fpc core team was given on this subject. Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] DoDirSeparators and special filenames on Windows

2013-09-08 Thread Bart
il in Linux ATM (2.6.2) because all IO operations use ShortStrings. > I think this is expecially important because of the multi platform approach > which IMO means that the programmer should *not* need to think about OS > specialities > (as far as possible). Good point. Another point i

Re: [fpc-pascal] DoDirSeparators and special filenames on Windows

2013-09-08 Thread Bart
bout File IO as well as MultiThreading)? I mus admit, that at this point I was too lazy to look for that.3 > OK, that is a fair point. Let's wait for the opinion of others. Should be interesting. Bart ___ fpc-pascal maillist - fpc-pasca

Re: [fpc-pascal] Get empty memory quickly or... an empty file

2013-09-13 Thread Bart
the file instead of the stream). Now you have 4G write calls, resulting in 4G System.Move calls. Maybe it is faster to create a 1GB datastructure (StringOfChar('A', 1024*1024*1024) and do 4 Write's? (Untested code!) Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] FPC GO32 2.6.2 wrong result from SecondsBetween

2013-09-17 Thread Bart
On 9/17/13, Lubomír Čabla wrote: > I am doing something wrong? Probably rounding errors: DT1:=EncodeDate(2013,5,28)+EncodeTime(15,26,1,0); 2 calculations on floating numbers DT1:=EncodeTime(15,26,1,0); 1 calculation on floating numbers B

[fpc-pascal] StrUtils.RomanToInt oddities

2013-09-18 Thread Bart
Hi, RomanToInt acceps rather ludicrous values: RomanToInt('MDCLXVIVXLDM') = 2209 RomanToInt('M') = 1002 //calculated as 3 + (1000-1) Both examples represent invalid roman numbers by any standard. Also I do not think Roman numerals can be negative... F

Re: [fpc-pascal] Re: StrUtils.RomanToInt oddities

2013-09-20 Thread Bart
On 9/20/13, Bart wrote: > Any invalid char in S will result in Result being 0; > So doc is wrong about that. Reported that in bugtracker: http://bugs.freepascal.org/view.php?id=25061 Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepasc

Re: [fpc-pascal] represent data string in hex?

2013-09-20 Thread Bart
= '$FF' (note the single quotes), assuming a[n] is of type String. Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Re: StrUtils.RomanToInt oddities

2013-09-20 Thread Bart
; very quickly. Much better to just consider the entire input as invalid. Any invalid char in S will result in Result being 0; So doc is wrong about that. Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Re: StrUtils.RomanToInt oddities

2013-09-20 Thread Bart
n) is LGPL, so anyone can use and or contribute. Sometimes I just like having these kind of discussions... Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Re: StrUtils.RomanToInt oddities

2013-09-20 Thread Bart
On 9/20/13, Reinier Olislagers wrote: > 2. The other cases you mentioned in your OP are bugs, not features. Unless the Greek do the same, someone with recent Delphi should test. If that's the case we're doomed to follw that. Bart _

Re: [fpc-pascal] Re: StrUtils.RomanToInt oddities

2013-09-20 Thread Bart
;I') then begin //writeln('TryRomanToInt: Found 1'); Inc(i); N := N + 1; end; end; //writeln('TryRomanToInt: Len = ',Len,' i = ',i); Result := (i > Len); //if Result then writeln('TryRomanToInt: N = ',N); end; var S: String;

Re: [fpc-pascal] Re: StrUtils.RomanToInt oddities

2013-09-23 Thread Bart
l characters are through, has resulted in 0 or > less, > // we invalidate everything at the end (consider : CMLM, IIIM ) > > Result := AResult > 0; > if not Result then AResult := 0; > end; > > (only mind-compiled ;) tests welcome ;) ) > It produces "odd"

Re: [fpc-pascal] Re: StrUtils.RomanToInt oddities

2013-09-23 Thread Bart
my > 2c for it. By all means. The princial question must be answered first though. Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Re: StrUtils.RomanToInt oddities

2013-09-23 Thread Bart
ly by 1000. I don't believe though Romans knew negative numbers. But I'm certainly not an expert on the matter. Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Re: StrUtils.RomanToInt oddities

2013-09-23 Thread Bart
002 (and not 1000-3 = 997) There should be no ambiguity there, it's only a pain to watch it. Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Re: StrUtils.RomanToInt oddities

2013-09-23 Thread Bart
ise though). We could also leave things as they are and have a new TryRomanToIntStrict() function added to StrUtils. Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Re: StrUtils.RomanToInt oddities

2013-09-23 Thread Bart
nvalid, as a maximum of three is allowed. > It's more or less common practice to allow > 3 M's if you need values > 3999. Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Re: StrUtils.RomanToInt oddities

2013-09-24 Thread Bart
ant with our other conversion routines like TryStrToInt etc. Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Re: StrUtils.RomanToInt oddities

2013-09-24 Thread Bart
id the exception, just > like > all other str*to functions. You beat me by a few minutes Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Re: StrUtils.RomanToInt oddities

2013-09-24 Thread Bart
On 9/24/13, Marco van de Voort wrote: > And let's not beat about the bush: the main reason for the routine is to > show beginning programmers that their homework can be done using a fixed > function :-) LOL Bart ___ fpc-pascal maillist

Re: [fpc-pascal] Re: StrUtils.RomanToInt oddities

2013-09-25 Thread Bart
rules (it does not accept numbers > 3999, nor more than 3 repeats of the same numeral) - Relaxed: allows unlimited number of starting "M", and allows up to 4 repeats of C, X and I. - DontCare: like current behaviour. Bart ___ fp

[fpc-pascal] How to detect if my program is running with root/elevated privileges?

2013-10-27 Thread Bart
mething on Windows), but the problem is that Windows virtualizes these calls (it'll end up somewhere lse, where your program will never find it again), so writing will succeed even if user has no administrator rights. Bart ___ fpc-pascal maillist

Re: [fpc-pascal] How to detect if my program is running with root/elevated privileges?

2013-10-27 Thread Bart
On 10/27/13, Marco van de Voort wrote: > For windows there is winutils.iswindowsadmin(), for unix likes there is > fpgeteuid (which should return zero for root). Thanks a lot. Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.or

Re: [fpc-pascal] How to detect if my program is running with root/elevated privileges?

2013-10-28 Thread Bart
On 10/28/13, Mark Morgan Lloyd wrote: >>> For windows there is winutils.iswindowsadmin(), for unix likes there is >>> fpgeteuid (which should return zero for root). >> > > Also remember unix-style capabilities. >

Re: [fpc-pascal] when will Free Pascal have a stable release of 2.7.2?

2013-12-10 Thread Bart
2.7 branch will never be a stable release. Eventually we'll get a 2.8 release. Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Free Pascal 2.6.4-rc1 released!

2013-12-19 Thread Bart
On 12/19/13, Marco van de Voort wrote: > ftp://freepascal.stack.nl/pub/fpc/beta/2.6.4-rc1/ I get a "Permission denied" for that URL. Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman

Re: [fpc-pascal] Free Pascal 2.6.4-rc1 released!

2013-12-19 Thread Bart
On 12/19/13, Bart wrote: > On 12/19/13, Marco van de Voort wrote: > >> ftp://freepascal.stack.nl/pub/fpc/beta/2.6.4-rc1/ > > I get a "Permission denied" for that URL. ftp://ftp.freepascal.org/pub/fpc/beta/2.6.4-rc1/ That one worked for me (had to search a little

Re: [fpc-pascal] Free Pascal 2.6.4-rc1 released!

2013-12-26 Thread Bart
On 12/26/13, Gabor Boros wrote: > > I downloaded from 4-5 mirrors and got same error message. Same here: downloaded from ftp://ftp.freepascal.org/pub/fpc/beta/2.6.4-rc1/ (Win7-64) Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.or

[fpc-pascal] How to eliminate specific hint

2014-01-03 Thread Bart
ariable that caused the message > which does not add additional lines of code. That's a Lazarus thing isn't it? AFAIK it doen't suppress the compiler hint, it just doesn't show it in the Messages window. Bart ___ fpc-pascal maillis

[fpc-pascal] TProcess question

2008-12-12 Thread Bart
er do nothing at all, when the user expects it to execute some other program... Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] TProcess question

2008-12-14 Thread Bart
e executed. In my case I do know what file is executed (at leat I think I do know, I supply the absolute path to the program), but checking for X_OK is not a foolproof guarantee (see my remarks above). > Well, you can try using fpaccess. I borrowed this from somewhere in the code for the IDE

Re: [fpc-pascal] EFCreateError' Unable to create file

2009-01-25 Thread Bart
ou will see: Exception occurred of EFCreateError Attempted to save to: >"C:\lazarus\fpc\2.2.2\bin\i386-win32\Del2Pas\Del2Pas\Del2Pas.bat"< And you will see the double quotes in the filename... I tested your code in Lazarus and in Delphi and both raise

Re: [fpc-pascal] EFCreateError' Unable to create file

2009-01-26 Thread Bart
mand is a new parameter) Now write a program and with FindFirst retrieve the filname and see: the double quotes are not there. Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] If ShellExecute(0, 'open', PChar(ExecuteName), '', '', 0) <= 32 Then

2009-01-27 Thread Bart
ut in your del2pas.bat a line like starts a GUI program like notepad.exe and see if it is launched, that would tell you definitely if the problem is having assigned a console or not. (Just a wild guess) Bart ___ fpc-pascal maillist - fpc-p

Re: [fpc-pascal] If ShellExecute(0, 'open', PChar(ExecuteName), '', '', 0) <= 32 Then

2009-01-28 Thread Bart
ut it does run (I can see that because I let it write to soem file which I examine later). Tested with Lazarus 0.9.27 rev. 18450 / fpc 2.2.2 Hope this helps. Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] If ShellExecute(0, 'open', PChar(ExecuteName), '', '', 0) <= 32 Then

2009-01-29 Thread Bart
And now try this withou the use of COMSPEC, and it should work. The problem is the implicit SW_HIDE (0) you were using. Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

[fpc-pascal] Automation problem

2009-02-04 Thread Bart
and I've tested my code on WinMe and XP, both behave the same. So I have two questions: 1) why does GetActiveOleObject not "find" a running MS Word instance? 2) why can't i do Server.Visible := true in fpc? I'm really not looking forward to having to develop this (sm

Re: [fpc-pascal] locale solution for unix systems

2009-03-19 Thread Bart
n /usr/share/118n/locales, but my LANG setting is nl_NL.UTF-8 Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] locale solution for unix systems

2009-03-19 Thread Bart
/glibc-2.5.tar.bz2) However I found that the locale program (/usr/bin/locale) does not exactly behave like this. My $LANG = nl_NL.UTF-8 The nl_NL.UTF-8 directory (in /usr/lib/locale) does not exist and it falls back on nl_NL.utf8 Any comments appreciated. Bart

Re: [fpc-pascal] locale solution for unix systems

2009-03-20 Thread Bart
we do not want SysUtils be dependent on libc. In that case I'd opt for parsing the text-based versions, since the compiled ones are libc dependent (their format changes). Anyone who links his app to libc (like a standard Lazarus app) can the hapilly include clocale (

Re: [fpc-pascal] locale solution for unix systems

2009-03-21 Thread Bart
before trying to localise them (as they are now). Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

  1   2   3   4   5   >