Re: [fpc-pascal] Difference in TOpenDFialog behavior Win10 => Win11

2025-09-09 Thread Bart via fpc-pascal
On Tue, Sep 9, 2025 at 11:23 AM Bo Berglund via fpc-pascal wrote: > This is an issue that I believe is caused by Windows 11... AFAIK nothing relevant has changed in the WS code that could cause this. -- Bart ___ fpc-pascal maillist - fpc-pas

Re: [fpc-pascal] Lazarus Forums not working

2025-09-06 Thread Bart via fpc-pascal
e on Win11. When I unchecked the "Stay logged in" checkbox I could login. -- Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] How to compile program from command line on Linux?

2024-12-16 Thread Bart via fpc-pascal
milar project. Goto Colpiler Options -> Show compiler options. This will show all parameters that the IDE gives to the compiler, including all unitpaths. -- Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org

Re: [fpc-pascal] Fwd: What to do to get new users

2024-11-16 Thread Bart via fpc-pascal
s > of Turbo Pascal over C. Well, then you never needed datastructures > 64k (IIRC). Even my addressbook (who didn't write one?) used GetMem/FreeMen or New/Dispose to allocate new records on the heap for that. Even basic Pascal books (yes, books on paper in those years) extensively c

Re: [fpc-pascal] Managed record types

2024-11-02 Thread Bart via fpc-pascal
iteln('foo'); end; begin foo; end. === It outputs: C:\Users\Bart\LazarusProjecten\ConsoleProjecten>test class operator TRec.Initialize(var aRec: TRec) foo So, the initialization code is called before anything in the function. Bart On Sat, Nov 2, 2024 at 6:54 PM Thomas Kurz via fpc-p

Re: [fpc-pascal] Floating point question

2024-02-06 Thread Bart via fpc-pascal
th.Float? IIRC then this is Extended, double or Single depending on CPU type. And always the largest precision the CPU supports. -- Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Floating point question

2024-01-28 Thread Bart via fpc-pascal
curacy is even one digit less precise than in fpc (it goes 1 digit earlier "off"). -- Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Floating point question

2024-01-27 Thread Bart via fpc-pascal
nded(86400.0)); writeln('tt=',tt:20:20); writeln('ee=',ee:20:20); end. === Now see what it outputs: C:\Users\Bart\LazarusProjecten\ConsoleProjecten>fpc test.pas Free Pascal Compiler version 3.2.2 [2021/05/15] for i386 ... C:\Users\Bart\LazarusProjecten\C

Re: [fpc-pascal] Floating point question

2024-01-27 Thread Bart via fpc-pascal
double both the result of maketime and the calculation (8427 - 0.5) + (12/ 24.0) + (33/1440.0) + (0/86400.0) give this value: 8427.022916668000 -- Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Floating point question

2024-01-27 Thread Bart via fpc-pascal
s done with double precision, on win32 all literal floating point values in your code will be interpreted as Extended. Cast everything to Double and the result will be the same on Win64 and Win32. -- Bart ___ fpc-pascal maillist - fpc-pascal@lists.freep

Re: [fpc-pascal] case statement

2023-12-14 Thread Bart via fpc-pascal
On Thu, Dec 14, 2023 at 5:01 PM Adriaan van Os via fpc-pascal wrote: > I always use "OTHERWISE instead of ELSE, but that's my personal > preference. +1 Seeing OTHERWISE in source code just makes me smile. -- Bart ___ fpc-pascal

Re: [fpc-pascal] TPath enhancements (Issue #40513): can somebody test with Delphi 12?y

2023-11-19 Thread Bart via fpc-pascal
\c' OK: ['\a','b','\c:']: Got: '\c:', Expected: '\c:' OK: ['a','<>','\b','c','\d'] --> EArgumentException, (as expected) FAIL: ['c:','a&#x

Re: [fpc-pascal] TPath enhancements (Issue #40513): can somebody test with Delphi 12?y

2023-11-19 Thread Bart via fpc-pascal
On Sun, Nov 19, 2023 at 3:50 PM Bart wrote: > Thanks again for testing. What about ['c:','a','b'] Does it return c:a\b, or c:\a\b (on Windows), or IOW: does it take into account driveletters? The first one IMO would be correct. -- Bart _

Re: [fpc-pascal] TPath enhancements (Issue #40513): can somebody test with Delphi 12?y

2023-11-19 Thread Bart via fpc-pascal
hanks again for testing. Where is EInOutArgumentException defined? Probably it's defined as class(EInOutError)? If so, what is the value of the ErrorCode property in this case? -- Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] TPath enhancements (Issue #40513): can somebody test with Delphi 12?

2023-11-19 Thread Bart via fpc-pascal
'\b' in that case. This raises the question what the result of TPath.Combine(['a','\b',c'','\d','e']) would be (I would then expect either \b\c or \d\e)? If ValidateParams is True, will it raise an error

Re: [fpc-pascal] TPath enhancements (Issue #40513): can somebody test with Delphi 12?

2023-11-19 Thread Bart via fpc-pascal
s own or after concatenation). -- Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] TPath enhancements (Issue #40513): can somebody test with Delphi 12?

2023-11-18 Thread Bart via fpc-pascal
implement these features. -- Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] overriden or not ?

2023-08-18 Thread Bart via fpc-pascal
ll RealSetText directly if TMethod(@Self.SetTextBuf).Code = Pointer(@TControl.SetTextBuf) then //not overridden -- Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Choice of exceptions to use?

2023-06-04 Thread Bart via fpc-pascal
ange exception, since the offending coordinates are out of range. Invalid Argument for me would apply to situations like a wrong type for a format specifier. -- Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/c

Re: [fpc-pascal] Size of set.

2023-05-23 Thread Bart via fpc-pascal
in question. -- Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] StrIComp

2023-04-29 Thread Bart via fpc-pascal
On Sat, Apr 29, 2023 at 10:30 PM Thomas Kurz via fpc-pascal wrote: > Is it intentional that StrIComp (from the strings unit) gives an access > violation if one of its arguments is NIL? Yes. Delphi does so too. -- Bart ___ fpc-pascal ma

Re: [fpc-pascal] Converting old pascal written for Pascal/MT+ compiler

2023-04-04 Thread Bart via fpc-pascal
On Tue, Apr 4, 2023 at 6:00 PM Tomas Hajny via fpc-pascal wrote: > Well, managed types are not very likely in code imported from a Pascal > compiler not knowing units... Well, his fpc.cfg might define string to be ansistring... -- Bart _

Re: [fpc-pascal] Converting old pascal written for Pascal/MT+ compiler

2023-04-04 Thread Bart via fpc-pascal
that is the result of a string concatenation, then you'll have a memory leak. -- Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] possible bug in blockwrite

2023-03-05 Thread Bart via fpc-pascal
g > where the error occurred), but number has a value of 0. > > In tp, number would still have a value of 123, because it would simply > ignore the carriage return at the end of the string. In TP 6.0, code is set to 4 and number to zero (but the value of number shall be undefined if code

Re: [fpc-pascal] For Loop with QWord

2023-01-03 Thread Bart via fpc-pascal
> use a Qword here if I know I will never need I to be a negative number? IIRC then you can only use native type or smaller as a loop variable in for loop. You can use it in a while or repeat loop though. On 64-bit you can use qword as a loop variable in a for loop. -- Bart __

Re: [fpc-pascal] CodeTools complete code

2022-10-05 Thread Bart via fpc-pascal
ean the part of the Lazarus IDE that does code completion etc. Since you don;t use Lazarus, you must mean something else? -- Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] CodeTools complete code

2022-10-05 Thread Bart via fpc-pascal
On Wed, Oct 5, 2022 at 8:33 AM Hairy Pixels via fpc-pascal wrote: > Does CodeTools not understand generic class function calls? Here is the class > in question: CodeTools is part of Lazarus. So, better ask on the Lazarus ML. (And yes, CodeTools has problems with generics.) --

Re: [fpc-pascal] Get highest element of a StringList

2022-09-10 Thread Bart via fpc-pascal
to work if the argument was a stringlist? Probabaly it could, but it's not likely going to happen. -- Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Feature Announcement: Function References and Anonymous Functions

2022-05-30 Thread Bart via fpc-pascal
not the future of our beautiful language. -- Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Issue with CSVDocument

2022-02-07 Thread Bart via fpc-pascal
Create(Fn, fmOpenRead or fmShareDenyNone); try Len := FS.Read({%H-}Buf[0], BufLen); if (Len > 2) and (Buf[0]=$EF) and (Buf[1]=$BB) and (Buf[2]=$BF) then begin //UTF8 BOM -- Bart ___ fpc-pascal maillist -

Re: [fpc-pascal] Interface section overload procedures are all public

2022-01-23 Thread Bart via fpc-pascal
Not so in fpc 3.2.2. So, most likely a bug that got fixed. -- Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] StrToInt is using ShortString buffer?

2022-01-13 Thread Bart via fpc-pascal
On Wed, Jan 12, 2022 at 11:33 PM Sven Barth via fpc-pascal wrote: > You can see it in Florian's commit to the branch about range checking where > he added the DestSize parameter. Yes, I discovered that. Will study a bit how this is done, just for the fun of it.

Re: [fpc-pascal] StrToInt is using ShortString buffer?

2022-01-12 Thread Bart via fpc-pascal
On Wed, Jan 12, 2022 at 10:28 PM Bart wrote: > Could you naybe point me to where in the compiler this "magic" happens? > (fpc_Val_UInt_Shortstr() signature needs to be changed IMO) Never mind, I just notice a new branch val_range_check was created that just does this. I'll

Re: [fpc-pascal] StrToInt is using ShortString buffer?

2022-01-12 Thread Bart via fpc-pascal
> be changed. Could you naybe point me to where in the compiler this "magic" happens? (fpc_Val_UInt_Shortstr() signature needs to be changed IMO) -- Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org

Re: [fpc-pascal] Not available duties

2021-12-24 Thread Bart via fpc-pascal
; "! Duties, taxes, and fees totaling INF are due for this delivery." Submit to https://thedailywtf.com/ ? -- Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] ExtractStrings by line in Windows

2021-11-04 Thread Bart via fpc-pascal
ou cast LineEnding to a string, it should work on all platforms I guess (since it invokes the overload with the array of string as separatorlist). -- Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-b

Re: [fpc-pascal] ExtractStrings by line in Windows

2021-11-03 Thread Bart via fpc-pascal
On Wed, Nov 3, 2021 at 1:57 PM Hairy Pixels via fpc-pascal wrote: Maybe use SomeString.Split([LineEnding'], ...)? Split has an overload that takes an array of string as first paramter. -- Bart ___ fpc-pascal maillist - fpc-p

[fpc-pascal] String.Split(const Separators: array of Char; Options: TStringSplitOptions)

2021-09-16 Thread Bart via fpc-pascal
; ... SA := S.Split([#0..#32],TStringSplitOptions.ExcludeEmpty); test.pas(236,59) Error: Incompatible type for arg no. 2: Got "TStringSplitOptions", expected "Char". I feel I must be blind... -- Bart ___ fpc-pascal mai

Re: [fpc-pascal] How to create AnsiString with specific code page?

2021-09-15 Thread Bart via fpc-pascal
On Wed, Sep 15, 2021 at 12:32 PM Bart wrote: > This should work > > type > StringCP1251 = AnsiString(1251) That should be type StringCP1251 = type AnsiString(1251); -- Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepasc

Re: [fpc-pascal] How to create AnsiString with specific code page?

2021-09-15 Thread Bart via fpc-pascal
On Wed, Sep 15, 2021 at 12:14 PM Abuy via fpc-pascal wrote: > I need string with Windows-1251. Tried var msg: AnsiString(1251) but > this does not work. What I am doing now is This should work type StringCP1251 = AnsiString(1251) var S: StringCP1251; --

Re: [fpc-pascal] Hello, new Pascal programmer. had a question!

2021-08-31 Thread Bart via fpc-pascal
cumbersome compared to Lazarus. None of the things I got used to work there (nor do they do in D3 or D7 for that matter). -- Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Hello, new Pascal programmer. had a question!

2021-08-29 Thread Bart via fpc-pascal
and of course that does not work. So, if you're on Windows, *nix or a Mac, my advice is to use Lazarus as your IDE of choice. -- Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] How to get fpc and lazarus sources when svn has shut down?

2021-08-12 Thread Bart via fpc-pascal
hard about it ? > > It's like switching car brands from a VW to an Audi or so. To me it feels more like switching from Pascal to C#. But maybe I'm just a little braindead. -- Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.or

Re: [fpc-pascal] How to get fpc and lazarus sources when svn has shut down?

2021-08-11 Thread Bart via fpc-pascal
On Wed, Aug 11, 2021 at 11:37 PM Michael Van Canneyt via fpc-pascal wrote: > As a programmer, switching version systems should be a no-brainer. My brain begs to differ... -- Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org ht

[fpc-pascal] Fwd: Linker error on simple program (windows)

2021-06-24 Thread Bart via fpc-pascal
age) -- Bart -- Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] Linker error on simple program (windows)

2021-06-23 Thread Bart via fpc-pascal
(QWORD(n), SizeOf(Byte)*8); end; end. and this program program test; {$mode ObjFPC} uses Extmath; var b: byte; L: Integer; begin b := 0; L := LeadingZeroBits(b); end. On Windows this won't build with 3.2.2 or 3.2.0. It will build with 3.0.4. C:\Users\Bart\LazarusProjecten\bugs\Co

Re: [fpc-pascal] Will the size of an executable depend on the uses clause

2021-06-16 Thread Bart via fpc-pascal
rything you need, you add it yourself. -- Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] TRegistry documentation

2021-06-16 Thread Bart via fpc-pascal
sword), so in the end I just used something like: uses WinUtils; procedure CheckIsAdmin; begin if not WinUtils.IsWindowsAdmin then begin writeln('This program requires administrator priviliges.'); writeln; Halt; end; end; Bart -- Bart

Re: [fpc-pascal] TRegistry documentation

2021-06-16 Thread Bart via fpc-pascal
On Wed, Jun 16, 2021 at 2:21 PM Jean SUZINEAU via fpc-pascal wrote: > I guess that what was meaning Bart by hardcat is that you need to > transtype the result this way: > var dw: DWord; > begin > dw:= DWord( Registry.ReadInteger(...)) ; Indeed. This is a lossless opera

Re: [fpc-pascal] TRegistry documentation

2021-06-16 Thread Bart via fpc-pascal
read: As I said before, it is compatible with Delphi. See: http://docwiki.embarcadero.com/Libraries/Sydney/en/System.Win.Registry.TRegistry_Methods -- Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] TRegistry documentation

2021-06-15 Thread Bart via fpc-pascal
/WriteD/QWord() yourself if you subclass TRegistry (and call the subclass TRegistry). I have a Windows only implementation of TRegistry which actually implements this. (My implementation of the registry does not support TRegIniFile b.t.w.) -- Bart ___ fpc-pa

Re: [fpc-pascal] Abstract classes ignored

2021-04-18 Thread Bart via fpc-pascal
it was bundled with Delphi 1, and that was the one I needed, since I was on Win 3.10) for about ƒ200. (€1.00 = ƒ2.20). It came with a full manual (on paper that is). Those were the days -- Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepa

Re: [fpc-pascal] Directory Tree

2021-04-06 Thread Bart via fpc-pascal
On Tue, Apr 6, 2021 at 12:29 PM James Richters via fpc-pascal wrote: > Or Am I going to be better off going graphical with Lazarus for something > like this? TShellTreeView in Lazarus should do exactly what you want. It's not console though.

Re: [fpc-pascal] Hide warning number

2021-03-25 Thread Bart via fpc-pascal
n't show the "function X; marked as inline is not inlined" warning -vm6058 -- Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] fpreport: can not use two ObjectLists as datasource in one report

2021-03-19 Thread Bart via fpc-pascal
r reports as major or even block. -- Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] JSONStringToString question

2021-03-14 Thread Bart via fpc-pascal
On Sun, Mar 14, 2021 at 4:15 PM Michael Van Canneyt via fpc-pascal wrote: > Fixed. Thanks for the patch. > There was a second issue, which is now also fixed. You set target to fpc 4.0 The simple patch I made can be backported/merged to 3.2 fixes branch? --

Re: [fpc-pascal] JSONStringToString question

2021-03-14 Thread Bart via fpc-pascal
On Sun, Mar 14, 2021 at 2:55 PM Bart wrote: > I think I have a fix, will report it. Reported as https://bugs.freepascal.org/view.php?id=38622 Possible patch attached in the bugreport. -- Bart ___ fpc-pascal maillist - fpc-pas

Re: [fpc-pascal] JSONStringToString question

2021-03-14 Thread Bart via fpc-pascal
On Sun, Mar 14, 2021 at 1:49 PM Bart wrote: > Do you know if we have a test suite for this function, so I can test > if there ar regressions when I try to fix it? Found it already. I think I have a fix, will report it. -- Bart ___ fpc-

Re: [fpc-pascal] JSONStringToString question

2021-03-14 Thread Bart via fpc-pascal
ons when I try to fix it? -- Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] JSONStringToString question

2021-03-13 Thread Bart via fpc-pascal
oString(S2); writeln(S1); until S2=''; end. C:\Users\Bart\LazarusProjecten\ConsoleProjecten>fpc test.pas Free Pascal Compiler version 3.2.0 [2020/06/04] for i386 Copyright (c) 1993-2020 by Florian Klaempfl and others Target OS: Win32 for i386 Compiling test.pas Linking test.exe

Re: [fpc-pascal] Unicode chars losing information

2021-03-07 Thread Bart via fpc-pascal
On Sun, Mar 7, 2021 at 5:31 PM Marco van de Voort via fpc-pascal wrote: > Probably it is not in the BMP and thus needs more position than one. Length(Char) is 5 according to fpc, I see 5 "graphemes", which suggest that all of them fit into 1 WideCh

Re: [fpc-pascal] Windows Defender considers fp.exe a malicious program

2021-02-12 Thread Bart via fpc-pascal
clude the folders where fpc/lazarus reside from scanning. Also the folders where I develop my programs. If you don't you're bound to get strange bugs and thing like this. -- Bart ___ fpc-pascal maillist - fpc-pascal@lists.f

Re: [fpc-pascal] Question about System.Move()

2021-01-13 Thread Bart via fpc-pascal
FillChar(FData[StartIndex+i], SizeOf(T), 0); end; end; end; I tested this with T being Array of Char (so FData being an array of array of Char). Leaving out any of the Finalize statements will make HeapTrace barf at me about unfreed memory blocks. Does it make any sense? -- Bart __

Re: [fpc-pascal] Question about System.Move()

2021-01-11 Thread Bart via fpc-pascal
, but now we have Generics.Collections etc: do we already have a better generic Deque (double ended queue) implementation somewhere? -- Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Question about System.Move()

2021-01-09 Thread Bart via fpc-pascal
base class and call that inside the loop, but that feels a bit sloppy. -- Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Question about System.Move()

2021-01-09 Thread Bart via fpc-pascal
me.Move() can be safe, but it is not guaranteed (almost by definition you never know what is going to be in the specialization. So, I'll use a for loop to copy the data. I assume that doing Arr[Index] := Default(T) will also finalize the element if that element ismanaged? -- Bart __

[fpc-pascal] Question about System.Move()

2021-01-09 Thread Bart via fpc-pascal
the array? 2. Is it OK if the elements of the array are (or contain) managed types? 3. Are there caveats if T is a specialization of a generic type definition? -- Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https

Re: [fpc-pascal] Avoiding File conflicts

2021-01-05 Thread Bart via fpc-pascal
On Tue, Jan 5, 2021 at 3:30 PM wkitty42--- via fpc-pascal wrote: > provided the other program opens the file for creation properly (eg: > blahDenyAll), right? Maybe use fmShareExclusive when opening the file. That name suggest you can only open if you are the only one? --

Re: [fpc-pascal] Avoiding File conflicts

2021-01-04 Thread Bart via fpc-pascal
> to open it until it's done being written? Simple approach? Use filemode = fmOpenRead and use a try..except block to open the file? Opening will fail if the file is locked by another process (triggering the exception). -- Bart ___ fpc-pascal m

Re: [fpc-pascal] I'm working on automated Help Output for console apps

2020-11-20 Thread Bart via fpc-pascal
s capability is detected, hence my reference to the compiler. -- Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] I'm working on automated Help Output for console apps

2020-11-20 Thread Bart via fpc-pascal
and > line help output too, but I'll have to test how well FPC supports that, and > how > cross-platform it is. You know that fpc trunk now supports coloured output of the compiler (messages)? -- Bart ___ fpc-pascal maillist - fpc-pasc

Re: [fpc-pascal] Adding file to string to the RTL

2020-10-06 Thread Bart via fpc-pascal
tents Unicode as well. From my perspective that sucks. -- Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] basic question on begin, end;

2020-09-23 Thread Bart via fpc-pascal
consists of more than one statement and as such must be enclosed in a begin/end pair. Bart -- Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] String literals and code page of .pas source file

2020-09-09 Thread Bart via fpc-pascal
On Wed, Sep 9, 2020 at 5:25 PM Tomas Hajny via fpc-pascal wrote: > A simple question - is TLabel.Caption declared as Utf8String No. -- Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mail

Re: [fpc-pascal] String literals and code page of .pas source file

2020-09-09 Thread Bart via fpc-pascal
irective in unit1. This is a bit counter intuitive to me. -- Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] How reliable are Hashlists in Contnrs

2020-08-24 Thread Bart via fpc-pascal
e: https://en.wikipedia.org/wiki/Pigeonhole_principle -- Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Is there a FindAllDirs command like FindAllFiles?

2020-07-25 Thread Bart via fpc-pascal
ers to the list. Bart -- Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Return value of StrToHostAddr and StrToHostAddr6 in sockets unit

2020-05-13 Thread Bart via fpc-pascal
there's no "out" parameters. Otherwise I would definitely > have used one. {$modeswicth out} perhaps? -- Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Compiler mode for code in rtl and rtl-extra

2020-05-11 Thread Bart via fpc-pascal
d and checked for correct functioning, Maybe one could apply {$modeswitch out} ? -- Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] FPCMake and Makefile.fpc question

2020-05-06 Thread Bart via fpc-pascal
there with some fixes (I should really test > that...) I would at least want to weed out targets we definitively do not support like embedded platforms and DOS. But in the end that's up to the Lazarus devs. I just wanted to know how that could be done. Thanks @all for the info. -- Bart

Re: [fpc-pascal] Different behaviour between FPC 2.6.4 and FPC 3.0.4

2020-05-05 Thread Bart via fpc-pascal
On Tue, May 5, 2020 at 10:05 PM Rainer Stratmann wrote: > Did I overlooked something? Your function returns a functiontype? Is that intended? -- Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-

[fpc-pascal] FPCMake and Makefile.fpc question

2020-05-05 Thread Bart via fpc-pascal
identifying an actual bug in the Lazarus build process (which might be in the Makefile) rather difficult. Is it possible to control this in the makefile.fpc file? Bart -- Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists

Re: [fpc-pascal] PLEASE I NEED AN URGENT HELP, cant run Bundle.sh Succefully.

2020-04-06 Thread Bart via fpc-pascal
On Mon, Apr 6, 2020 at 2:28 PM mr.jenuine mr.jenuine via fpc-pascal wrote: > ... but when i run the bundle.sh i get error warning as shown below; You run a linux shell script in Windows? -- Bart ___ fpc-pascal maillist - fpc-pas

Re: [fpc-pascal] Why external execution so slow? (fixed)

2020-04-01 Thread Bart via fpc-pascal
On Wed, Apr 1, 2020 at 5:22 PM Marco van de Voort wrote: > I think I'll put this under a special porunidle option in trunk and fpc > 3.2.0 , so to only trigger this when needed. Hmm.. porunidle -> poRunIdle (to be consistent in namegiving)? Ba

Re: [fpc-pascal] Range check error warning.

2020-03-25 Thread Bart via fpc-pascal
On Wed, Mar 25, 2020 at 10:30 PM wrote: > what? you don't like laughing bearded guys? LUL means penis (and I'm putting it nicely here) in Dutch. Google translate translates it as either asshole (anatomically rahter incorrect), cock, or pric

Re: [fpc-pascal] Range check error warning.

2020-03-25 Thread Bart via fpc-pascal
On Wed, Mar 25, 2020 at 7:48 PM wrote: > [wargames] seems like the winning move is to not play the game. [/wargames] > LUL LUL ?? What does that stand for? Better not say that to someone who speaks Dutch (like me) ;-)) -- Bart ___ fpc-

Re: [fpc-pascal] Range check error warning.

2020-03-24 Thread Bart via fpc-pascal
e); writeln('foldlevelmask=',foldlevelmask); end. Prints: intermediate=192 foldlevelmask=63 -- Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Operator precendence of ^

2020-03-16 Thread Bart via fpc-pascal
On Mon, Mar 16, 2020 at 8:31 AM Maël Hörz wrote: > But I could not find any mention of the derefence operator ^. As was explained to you in https://forum.lazarus.freepascal.org/index.php/topic,48911.0.html, the dereferencing a pointer (by using ^) isn't an operator.

Re: [fpc-pascal] fpc trunk = Operator is not overloaded: "Class Of TBlobField" and "Boolean"

2020-03-08 Thread Bart via fpc-pascal
of IS has been altered (to conform to docs and Delphi) So it is now parsed as: if fld1 is (tblobfield and (self.fblobintf <> nil)) then begin Use: if (fld1 is tblobfield) and (self.fblobintf <> nil) then begin Bart -- Bart ___

Re: [fpc-pascal] ptop and comma.

2020-02-24 Thread Bart via fpc-pascal
rote, when a program terminates all memory is > returned to the OS so that is not really a problem. If you really dislike the memory leak (since it's not "nice programming"), maybe you can set ExitCode before calling terminate? (Untested idea (TM)) -- Bart _

Re: [fpc-pascal] TProcess and zombie processes in *nix systems

2020-01-21 Thread Bart via fpc-pascal
On Tue, Jan 21, 2020 at 9:41 PM Graeme Geldenhuys wrote: > 2. Anybody else experience this zombie processes hanging > around in *nix systems? Is there any option in TProcess > to prevent that? https://bugs.freepascal.org/view.php?id=11797

Re: [fpc-pascal] TIniFile.WriteString gives file with BOM, bad

2020-01-10 Thread Bart via fpc-pascal
en a ticket in the bugtracker? -- Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] TIniFile.WriteString gives file with BOM, bad

2020-01-10 Thread Bart via fpc-pascal
BOM with fpc r43847, with and withoud DefautSystemCodePage := CP_UTF8. TIniFile might benefit from a WriteBom (Boolean) property ? -- Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] TIniFile.WriteString gives file with BOM, bad

2020-01-10 Thread Bart via fpc-pascal
TIniFile manually adds the BOM to the first Line. Then SaveToFile is called, which (if FEncoding = Utf8) will add the BOM again? Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc

[fpc-pascal] StringList encoding question

2019-12-22 Thread Bart via fpc-pascal
codepage of the stringlist's internal list of strings (array of TStringItem's)? It seems that the stringlist considers it's internal TStringItem.FString that has #$C3A#$A4 to have a codepage of CP_ACP (always)? Bart -- Bart

Re: [fpc-pascal] Strange experience with TJsonConfig.Clear

2019-11-23 Thread Bart via fpc-pascal
On Sat, Nov 23, 2019 at 7:47 PM Bart wrote: As I was afraid: User error! Cfg.JSONOptions := Cfg.JSONOptions + [joIgnoreTrailingComma]; This forces a reload of the file (since Filename isn't empty at this point). (B.t.w. fpc trunk raise an error : An unhandled exception occurred at $004

[fpc-pascal] Strange experience with TJsonConfig.Clear

2019-11-23 Thread Bart via fpc-pascal
List is a TSTringList Cfg.SetValue(jpaPerson, List, True); This creates a file like "AdresBoek" : { "Info" : { "CopyRight" : "Copyright (c) 2011 by Flying Sheep Inc. & Bart Broersma", }, "Personen" : { &q

Re: [fpc-pascal] FPC Mantis has 2 fields "fixed in revision" in issues

2019-10-21 Thread Bart
On Mon, Oct 21, 2019 at 5:24 PM AlexeyT wrote: > > First field is below the "OS" and "Product build" on the top; 2nd is > below "Attach tags". Remove 1 of them. One is fixed in version (e.g. 2.2.4), the other fixed in revision (e.g. r123456789).

Re: [fpc-pascal] Floating point exception not always caught on Linux i386.

2019-10-11 Thread Bart
-750001.2.69 -- Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] fpc trunk issue with StreamIO or TMemoryStream

2019-10-07 Thread Bart
blem. > Oh, well, I can use shortstrings in this application, though it really > puzzles me (setting position:=0 doesn't change anything yet it causes > this problem). It's a regression and needs to be fixed before 3.2.0 is released. -- Bart

  1   2   3   4   5   >