Re: [fpc-pascal] Unit testing for RTL packages

2021-01-24 Thread Sven Barth via fpc-pascal
Am 24.01.2021 um 08:37 schrieb Noel Duffy via fpc-pascal: How should one go about adding unit tests to a package in the RTL? In many packages, for instance fcl-db, there is a tests folder with fpcunit units and programs in them, and they're referenced in fpmake.pp as example programs, but these

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

2021-01-11 Thread Sven Barth via fpc-pascal
Benito van der Zander via fpc-pascal schrieb am Mo., 11. Jan. 2021, 15:26: > Hi, > > perhaps a safe, generic function for this copying could be added to the > RTL. Like: > > Procedure ManagedMove(const source: T;var dest: T;count: SizeInt); > In principle a good idea. However this is one of tho

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

2021-01-10 Thread Sven Barth via fpc-pascal
Am 09.01.2021 um 18:23 schrieb Bart via fpc-pascal: On Sat, Jan 9, 2021 at 5:12 PM Yuriy Sydorov via fpc-pascal wrote: 2. Is it OK if the elements of the array are (or contain) managed types? You need to manually finalize/free elements which are overwritten before calling Move. So, if I mov

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

2021-01-10 Thread Sven Barth via fpc-pascal
Am 09.01.2021 um 22:54 schrieb Bart via fpc-pascal: On Sat, Jan 9, 2021 at 8:14 PM Yuriy Sydorov via fpc-pascal wrote: 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? For class object instances c

Re: [fpc-pascal] TProxyStream.Check always raises error.

2021-01-06 Thread Sven Barth via fpc-pascal
Am 05.01.2021 um 14:30 schrieb Virgo Pärna via fpc-pascal: Is there any reason, why TProxyStream.Check always raises Exception without checking, if err = S_OK (ISteam call succeeded). TOleStream overrides this Check to use OleCheck, which handles it. But if Check needs to be overrided for

Re: [fpc-pascal] bug or feature

2021-01-01 Thread Sven Barth via fpc-pascal
Am 01.01.2021 um 19:21 schrieb Mattias Gaertner via fpc-pascal: Hi, library test; procedure Test; begin end; exports Test name 3 'abc'; //^^^ end. It's a bug. Please report. Regards, Sven ___ fpc-pascal maillist - fpc-pascal@lists

Re: [fpc-pascal] Operators for a class

2020-12-31 Thread Sven Barth via fpc-pascal
Am 31.12.2020 um 17:26 schrieb Gabor Boros via fpc-pascal: Hi All, I try to convert some C++ source to FPC, see below a short example from it. How can I define same operator with FPC trunk? class Cla {     INT64   Num; public:     Cla operator +(const Cla& m)     {     Cla  ret(this);  

Re: [fpc-pascal] TurboVision is reborn as FOSS (again)

2020-12-24 Thread Sven Barth via fpc-pascal
Am 23.12.2020 um 18:10 schrieb Travis Siegel via fpc-pascal: On 12/22/2020 11:43 AM, Markus Greim via fpc-pascal wrote: Wow.. Programming languages I worked with in the last 40 years: 12. SPIN When you say spin, I'm assuming you're talking about the parallax propeller boards programmi

Re: [fpc-pascal] TurboVision is reborn as FOSS (again)

2020-12-22 Thread Sven Barth via fpc-pascal
Am 22.12.2020 um 13:02 schrieb Liam Proven via fpc-pascal: On Mon, 21 Dec 2020 at 22:11, Travis Siegel via fpc-pascal wrote: I don't know what non native english speakers are taught, nor can I address the folks across the pond, but here in the Us at least, has denotes currently exists, while

Re: [fpc-pascal] TurboVision is reborn as FOSS (again)

2020-12-21 Thread Sven Barth via fpc-pascal
Travis Siegel via fpc-pascal schrieb am Mo., 21. Dez. 2020, 17:41: > I don't know what non native english speakers are taught, nor can I > address the folks across the pond, but here in the Us at least, has denotes > currently exists, while had indicates past tense, I.E. no longer exists. > Combi

Re: [fpc-pascal] TurboVision is reborn as FOSS (again)

2020-12-21 Thread Sven Barth via fpc-pascal
Liam Proven via fpc-pascal schrieb am Mo., 21. Dez. 2020, 18:11: > On Mon, 21 Dec 2020 at 10:56, Nikolay Nikolov via fpc-pascal > wrote: > > > > > > On 12/21/20 10:42 AM, Markus Greim wrote: > > > > FPC has had a Turbo Pascal-like console IDE for many years... > > Sorry about this. I did not

Re: [fpc-pascal] TurboVision is reborn as FOSS (again)

2020-12-21 Thread Sven Barth via fpc-pascal
Nikolay Nikolov via fpc-pascal schrieb am Mo., 21. Dez. 2020, 11:36: > > On 12/21/20 10:42 AM, Markus Greim wrote: > > FPC has had a Turbo Pascal-like console IDE for many years... > > "has had" ? > > AKAIK "has" > > I still used it yesterday. > > English is not my native language, but I thin

Re: [fpc-pascal] Selecting Records with a variable

2020-12-20 Thread Sven Barth via fpc-pascal
Am 20.12.2020 um 14:47 schrieb Tomas Hajny via fpc-pascal: On 2020-12-20 11:56, Sven Barth via fpc-pascal wrote: Am 20.12.2020 um 05:26 schrieb Jean SUZINEAU via fpc-pascal: I know you don't like objects, but maybe something like : Using modeswitch AdvancedRecords that also works

Re: [fpc-pascal] Initialization of constant record member of pointer type

2020-12-20 Thread Sven Barth via fpc-pascal
Am 14.12.2020 um 09:08 schrieb Marc Weustink via fpc-pascal: On 4-12-2020 13:01, LacaK via fpc-pascal wrote: Dňa 2.12.2020 o 16:09 Tomas Hajny via fpc-pascal napísal(a): On 2020-12-02 16:01, LacaK via fpc-pascal wrote: Dňa 2.12.2020 o 13:55 Tomas Hajny via fpc-pascal napísal(a): On 2020-12

Re: [fpc-pascal] Selecting Records with a variable

2020-12-20 Thread Sven Barth via fpc-pascal
Am 20.12.2020 um 05:26 schrieb Jean SUZINEAU via fpc-pascal: I know you don't like objects, but maybe something like : Using modeswitch AdvancedRecords that also works with record types. And I'd suggest a case-statement as well. Anything else will only be slower or just as fragile. Regard

Re: [fpc-pascal] An idea for a "pair" type

2020-12-16 Thread Sven Barth via fpc-pascal
Ryan Joseph via fpc-pascal schrieb am Mi., 16. Dez. 2020, 19:41: > > > > On Dec 16, 2020, at 10:50 AM, Sven Barth > wrote: > > > > This can simply be done using existing language constructs, no need to > introduce anything new. > > > > That

Re: [fpc-pascal] An idea for a "pair" type

2020-12-16 Thread Sven Barth via fpc-pascal
Ryan Joseph via fpc-pascal schrieb am Mi., 16. Dez. 2020, 18:38: > Just for fun I wanted to see what people thought about a potential "pair" > type added to the compiler. Dictionaries have proven themselves to be a > fundamental type we use often and they are appearing as built-in syntax in > man

Re: [fpc-pascal] Initialization of constant record member of pointer type

2020-12-01 Thread Sven Barth via fpc-pascal
LacaK via fpc-pascal schrieb am Di., 1. Dez. 2020, 11:00: > > Dňa 30.11.2020 o 23:26 Sven Barth via fpc-pascal napísal(a): > > Am 30.11.2020 um 13:20 schrieb LacaK via fpc-pascal: > >> Hi, > >> > >> is there a way how to initialize record member of poin

Re: [fpc-pascal] Initialization of constant record member of pointer type

2020-11-30 Thread Sven Barth via fpc-pascal
Am 30.11.2020 um 13:20 schrieb LacaK via fpc-pascal: Hi, is there a way how to initialize record member of pointer type (other than PChar) in the following example: type   TMyRec=record     a: PByte; // if I change PByte to PAnsiChar then it works   end; const   MyConst: TMyRec = (a: 'abcd')

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

2020-11-20 Thread Sven Barth via fpc-pascal
Bart via fpc-pascal schrieb am Fr., 20. Nov. 2020, 19:11: > On Fri, Nov 20, 2020 at 4:38 PM Graeme Geldenhuys via fpc-pascal > wrote: > > > We often have color output and > > full Unicode support - so we can output color and emojis to highlight > certain success > > or error states in the output

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

2020-11-19 Thread Sven Barth via fpc-pascal
Graeme Geldenhuys via fpc-pascal schrieb am Fr., 20. Nov. 2020, 01:33: > For those console programmers out there... Is there anything in console > help > output that you like or wish you had. That way I could possibly add it and > make this even more useful to a wider audience. > Two things come

Re: [fpc-pascal] TypeInfo on generic templates

2020-10-29 Thread Sven Barth via fpc-pascal
Am 29.10.2020 um 19:27 schrieb Ryan Joseph via fpc-pascal: Is it possible that the TypeInfo intrinsic could work with generic template types or is this a bug? I get "Illegal qualifier" in the procedure below. generic procedure DoThis(a: array of T); begin writeln(TypeInfo(T)^.name); end; T

Re: [fpc-pascal] FPC 3.2fixes UTF8Decode strange place

2020-10-29 Thread Sven Barth via fpc-pascal
Michael Van Canneyt via fpc-pascal schrieb am Do., 29. Okt. 2020, 09:36: > > > On Thu, 29 Oct 2020, AlexeyT via fpc-pascal wrote: > > > So can you COMMENT that dead part with "and FALSE" and dead part II > > with "if ... =#10"? It will make things faster for people! > > It will make things faste

Re: [fpc-pascal] Dynamic Arrays in Procedures

2020-10-04 Thread Sven Barth via fpc-pascal
James Richters via fpc-pascal schrieb am So., 4. Okt. 2020, 23:44: > So it does... > > I should have tested my own example. I found my problem, I declared it > as Var and it would only work with variables due to that > That's just a normal open array parameter and worked this way for a long ti

Re: [fpc-pascal] Merging units

2020-10-02 Thread Sven Barth via fpc-pascal
Am 02.10.2020 um 19:55 schrieb Ryan Joseph via fpc-pascal: Any ideas of solutions or preferred approaches? Is it feasible to add an "imports" clause to Pascal or are there other pitfalls? The preferred solutions are indeed either to put everything in one unit (includes or not) or to have the us

Re: [fpc-pascal] Cross platform question about lpi file content

2020-09-30 Thread Sven Barth via fpc-pascal
Am 27.09.2020 um 22:07 schrieb Bo Berglund via fpc-pascal: On Sun, 27 Sep 2020 19:44:36 +0200, Sven Barth via fpc-pascal wrote: I am not using wsmenus... Yes, you are, even if it is indirectly. Otherwise the compiler or linker wouldn't complain about it. It would be very good i

Re: [fpc-pascal] Cross platform question about lpi file content

2020-09-27 Thread Sven Barth via fpc-pascal
Bo Berglund via fpc-pascal schrieb am So., 27. Sep. 2020, 18:12: > I am trying to find the cause of a linker error when building my > application on Linux. > While doing this I looked in the project file projname.lpi and found > this strange entry: > > > > > > > > Why is the path d

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

2020-09-23 Thread Sven Barth via fpc-pascal
Am 22.09.2020 um 14:46 schrieb dano none via fpc-pascal: end; my_base := my_base + 15; writeln('current base ',my_base:2); ch := ReadKey; { end; { end i = column indexer }} The bottom three statements will only be executed as part of the

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

2020-09-12 Thread Sven Barth via fpc-pascal
Jonas Maebe via fpc-pascal schrieb am Sa., 12. Sep. 2020, 17:47: > > All the doubts, questions, and discussions prove that current system is > > counter-intuitive and confusing. > > The issue in this thread is caused by a bug in the LCL: it blindly > assumes that the dynamic code page of the capt

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

2020-09-08 Thread Sven Barth via fpc-pascal
Mattias Gaertner via fpc-pascal schrieb am Di., 8. Sep. 2020, 22:32: > On Tue, 8 Sep 2020 20:27:20 +0200 > Jonas Maebe via fpc-pascal wrote: > > > On 07/09/2020 08:51, LacaK via fpc-pascal wrote: > > > > > attached simple Lazarus compilable project (one Form). > > > > > > ... > > > type > > >

Re: [fpc-pascal] TFPObjectlist example

2020-09-08 Thread Sven Barth via fpc-pascal
James Richters via fpc-pascal schrieb am Di., 8. Sep. 2020, 20:07: > What’s the difference between TList and TFPGList? Which one is better > for this example? > The main difference is that TFPGList ist a generic, thus when you specialize it with your record you'll have a typesafe object where yo

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

2020-09-03 Thread Sven Barth via fpc-pascal
Am 03.09.2020 um 07:19 schrieb LacaK via fpc-pascal: Hi *, I would like to have source file in Windows-1250 encoding, where are stored literal strings like 'áéíóčž' in Windows-1250 encoding (I share this one file between FPC/Lazarus and Delphi 7). Windows-1250 is also ANSI code page of my Win

Re: [fpc-pascal] FFI or RTTI invoke for Apple arm64

2020-09-02 Thread Sven Barth via fpc-pascal
Carlo Kok via fpc-pascal schrieb am Mi., 2. Sep. 2020, 15:01: > On Wed, Sep 2, 2020, at 14:40, Sven Barth via fpc-pascal wrote: > > Carlo Kok via fpc-pascal schrieb am > Mi., 2. Sep. 2020, 11:09: > > > > Is there something else I need to do to allow FFI to work on arm64

Re: [fpc-pascal] FFI or RTTI invoke for Apple arm64

2020-09-02 Thread Sven Barth via fpc-pascal
Carlo Kok via fpc-pascal schrieb am Mi., 2. Sep. 2020, 11:09: > Seems I had to use ffi.manager.pas too. However when building then it > fails with; > > Undefined symbols for architecture arm64: > > "_ffi_call", referenced from: > _FFI.MANAGER_$$_FFIINVOKE$crc7AE31AA0 in ffi.manager.o >

Re: [fpc-pascal] Can't build FPC 3.2.1

2020-08-27 Thread Sven Barth via fpc-pascal
Am 27.08.2020 um 21:45 schrieb Marcelo Rocha via fpc-pascal: Hi all, I have downloaded fpc 3.2.0 linux x64 installer, and builded fpc's branch fixes_3_2 using it.. When I run the command make install, I've got the following errors: make[3]: Entering directory '/root/fixes_3_2/compiler' /root

Re: [fpc-pascal] Procedural generics question

2020-08-26 Thread Sven Barth via fpc-pascal
Am 25.08.2020 um 23:47 schrieb Benito van der Zander via fpc-pascal: Hi, that is generating rather odd code (r40721) project1.lpr:9    begin 00401090 55   push   %rbp 00401091 4889e5   mov    %rsp,%rbp 00401094

Re: [fpc-pascal] Procedural generics question

2020-08-26 Thread Sven Barth via fpc-pascal
Am 26.08.2020 um 14:59 schrieb Ryan Joseph via fpc-pascal: On Aug 26, 2020, at 5:44 PM, Nico Neumann via fpc-pascal wrote: generic procedure Add; begin if GetTypeKind(T) = tkInteger then WriteLn('an integer'); if GetTypeKind(T) = tkString then WriteLn('a string'); end; Question fo

Re: [fpc-pascal] Difference between Associative array and Hashlist?

2020-08-24 Thread Sven Barth via fpc-pascal
Am 24.08.2020 um 21:47 schrieb Lars via fpc-pascal: Since FPC has no associative array I was thinking that the closest is TStringList with name/value pairs. Then there is a hashlist in contnrs. Maybe an associative array means you don't have to implement it using hashes in order for it to wor

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

2020-08-24 Thread Sven Barth via fpc-pascal
Am 24.08.2020 um 21:01 schrieb Lars via fpc-pascal: I've noticed some problem with another hashlist that after adding about 2000 items to it, it starts to have problems. There are duplicates added (possibly a collision?) Is there a such thing as a perfect hashlist which never has a collision,

Re: [fpc-pascal] FFI or RTTI invoke for Apple arm64

2020-08-19 Thread Sven Barth via fpc-pascal
Carlo Kok via fpc-pascal schrieb am Mi., 19. Aug. 2020, 13:17: > Hi, > > for PascalScript FFI support, are there plans to support RTTI .Invoke, or > any form of FFI available to do dynamic invoke from Pascalscript to FPC/api > code? > Rtti.Invoke is available in 3.2.0 however for all platforms e

Re: [fpc-pascal] Regression in 3.2.0 ??

2020-08-19 Thread Sven Barth via fpc-pascal
Peter via fpc-pascal schrieb am Mi., 19. Aug. 2020, 08:17: > Has anyone any ideas to fix it? It compiles if I change stdcall to > CDecl, but I have no idea if that is a valid fix. > (More info; see bug 37566) > Using the same ifdef as in the interface is the correct fix. The compiler now more

Re: [fpc-pascal] FPC coding standards

2020-08-18 Thread Sven Barth via fpc-pascal
Dwight Schauer via fpc-pascal schrieb am Di., 18. Aug. 2020, 20:38: > On Tue, 2020-08-18 at 14:11 +0200, Sven Barth wrote: > > Not that I know. Most formatters will barf on some of the syntax > > extensions that FPC provides (see the Jedi Code Formatter that barfs > > on

Re: [fpc-pascal] FPC coding standards

2020-08-18 Thread Sven Barth via fpc-pascal
Dwight Schauer via fpc-pascal schrieb am Di., 18. Aug. 2020, 13:55: > Is there a more robust code reformatter (command line / batch oriented) > that can used with free pascal? (before I start digging in to making > ptop work to remove one's focus from style and put it solely on > content?) > Not

Re: [fpc-pascal] FPC coding standards

2020-08-18 Thread Sven Barth via fpc-pascal
Dwight Schauer via fpc-pascal schrieb am Di., 18. Aug. 2020, 08:45: > > The default config generated by ptop definitely does not conform to > the standards... > There is no default configuration, because there is not one default standard. While some things are a given (lowercase identifiers, no

Re: [fpc-pascal] Strange swap function, what does it do?

2020-08-13 Thread Sven Barth via fpc-pascal
Am 13.08.2020 um 22:37 schrieb Bo Berglund via fpc-pascal: I am working on the conversion of a service application from Windows/Delphi to Linux/FPC. When going through the code I found this procedure, which I do not quite understand the workings of, can someone please explain how it operates? p

Re: [fpc-pascal] RTL semaphore supported?

2020-08-13 Thread Sven Barth via fpc-pascal
Ryan Joseph via fpc-pascal schrieb am Do., 13. Aug. 2020, 09:35: > > > > On Aug 13, 2020, at 12:42 PM, Sven Barth > wrote: > > > > The way to go with semaphores would be to implement the Delphi > compatible TSemaphore in the unit SyncObjs. > > Link? I'

Re: [fpc-pascal] RTL semaphore supported?

2020-08-12 Thread Sven Barth via fpc-pascal
Am 13.08.2020 um 06:36 schrieb Ryan Joseph via fpc-pascal: Are semaphores actually supported in the RTL? I don't see they're available on macOS (compiling with trunk even). https://www.freepascal.org/docs-html/3.0.0/rtl/system/semaphoreinit.html No, these functions where there only temporary.

[fpc-pascal] fpcres now supports compilation of RC files

2020-08-12 Thread Sven Barth via fpc-pascal
Hello together! Thanks to the work of Martok the fpcres utility is now able to compile RC files into RES files. To compile an RC file to a RES file you need to pass the "-of res" argument as otherwise the RC reader won't be used (it's a "catch all" TResourceReader descendant and thus not reg

Re: [fpc-pascal] Resource compilation

2020-08-12 Thread Sven Barth via fpc-pascal
Am 13.01.2019 um 18:38 schrieb Martok: Update time! [snip] All of windres's tests pass now, except for the Dialog related ones. I would consider it more or less finished. Any more things to do? Otherwise, I'll stack it into some

Re: [fpc-pascal] 3.2.0 Invalid PPU Version

2020-08-12 Thread Sven Barth via fpc-pascal
Ryan Joseph via fpc-pascal schrieb am Mi., 12. Aug. 2020, 10:30: > Does anyone have any idea how this happened? I installed 3.2.0 from an > installer so why is the PPU version wrong? > > PPU Loading > /usr/local/lib/fpc/3.2.0/units/x86_64-darwin/fcl-process/process.ppu > PPU Invalid Version 208 >

Re: [fpc-pascal] What happens when assigning interfaces?

2020-07-10 Thread Sven Barth via fpc-pascal
Ryan Joseph via fpc-pascal schrieb am Fr., 10. Juli 2020, 12:04: > > > > On Jul 10, 2020, at 12:31 PM, Sven Barth > wrote: > > > > A lookup is only necessary if you use e.g. "SomeClass as SomeIntf". > > so if I do: > > DoSomething(c as IFoo); &

Re: [fpc-pascal] What happens when assigning interfaces?

2020-07-09 Thread Sven Barth via fpc-pascal
Am 10.07.2020 um 03:02 schrieb Ryan Joseph via fpc-pascal: On Jul 10, 2020, at 12:23 AM, Sven Barth via fpc-pascal wrote: (so that it points to the VMT generated for the interface) So, it sounds like what the interface actually is, is a pointer to VMT table. Correct. The VMT is

Re: [fpc-pascal] Writeln() behaves differently on Windows and Linux, why?

2020-07-09 Thread Sven Barth via fpc-pascal
Am 09.07.2020 um 18:42 schrieb Bo Berglund via fpc-pascal: On Thu, 9 Jul 2020 16:25:50 +, Alexander Grotewohl wrote: it sounds like your terminal has gotten fudged somehow I am using crt in the lpr file just for the sake of being able to shut it down sensibly: It doesn't matter where t

Re: [fpc-pascal] What happens when assigning interfaces?

2020-07-09 Thread Sven Barth via fpc-pascal
Am 09.07.2020 um 14:31 schrieb Ryan Joseph via fpc-pascal: Given the code below and the 2 cases can anyone explain what exactly the compiler does when the interfaces are assigned to? Does it copy a record like structure, call some internal functions, do runtime checks? I'm curious if they're d

Re: [fpc-pascal] LongInt and LongWord types

2020-07-08 Thread Sven Barth via fpc-pascal
Am 08.07.2020 um 23:00 schrieb Marcelo Rocha via fpc-pascal: Delphi's LongInt and LongWord are 32 bits on Windows, but 64 bits on supported Posix platforms(http://docwiki.embarcadero.com/RADStudio/Rio/en/Simple_Types_(Delphi)), following the conventions from LP64/LLP64. FreePascal declares with

Re: [fpc-pascal] fpc-pascal Digest, Vol 193, Issue 2

2020-07-07 Thread Sven Barth via fpc-pascal
Tomas Hajny schrieb am Di., 7. Juli 2020, 14:33: > On 2020-07-03 18:44, Sven Barth via fpc-pascal wrote: > > Can it be that you replied to the wrong > > message? ;) (see below) > > I suspect that it was an automated reply (out-of-office message). :/ > Ceterum censeo a

Re: [fpc-pascal] fpDebug function-call proof-of-concept

2020-07-07 Thread Sven Barth via fpc-pascal
Joost van der Sluis schrieb am Di., 7. Juli 2020, 11:17: > Hi all, > > Last weekend I started on the ability to evaluate functions within > fpDebug. And I got quite far. It is a proof-of-concept, still needs a > lot of work. But it works! > > See it in action here: > > http://amira.cnoc.nl/fpc/Fp

Re: [fpc-pascal] TProcess.CurrentDirectory doc

2020-07-06 Thread Sven Barth via fpc-pascal
Michael Van Canneyt schrieb am Di., 7. Juli 2020, 07:44: > > > On Tue, 7 Jul 2020, Sven Barth via fpc-pascal wrote: > > > Am 06.07.2020 um 23:31 schrieb Alexey Tor. via fpc-pascal: > >> > >> > https://lazarus-ccr.sourceforge.io/docs/fcl

Re: [fpc-pascal] TProcess.CurrentDirectory doc

2020-07-06 Thread Sven Barth via fpc-pascal
Am 06.07.2020 um 23:31 schrieb Alexey Tor. via fpc-pascal: https://lazarus-ccr.sourceforge.io/docs/fcl/process/tprocess.currentdirectory.html CurrentDirectory specifies the working directory of the newly started process.Changing this property after the process was started has no effect. nee

Re: [fpc-pascal] TProcessUTF8 doc - 2

2020-07-06 Thread Sven Barth via fpc-pascal
Am 06.07.2020 um 23:38 schrieb Alexey Tor. via fpc-pascal: a) https://lazarus-ccr.sourceforge.io/docs/lazutils/utf8process/tprocessutf8.html here we have 2-3 items depre - ApplicationName, CommandLine. but list shows no special mark. confusing. it shows [rw] marks, pls add near the [deprec

Re: [fpc-pascal] FPC for Win64

2020-07-05 Thread Sven Barth via fpc-pascal
Florian Klämpfl schrieb am So., 5. Juli 2020, 09:22: > Am 05.07.20 um 09:04 schrieb Jonas Maebe: > > On 2020-07-02 22:30, Evert van Dijken via fpc-pascal wrote: > > > >> I like to use the 64 bits FPC compiler, but I cannot find any > >> documentation how to use it. I see a WIN32 compiler and a WI

Re: [fpc-pascal] fpc-pascal Digest, Vol 193, Issue 2

2020-07-03 Thread Sven Barth via fpc-pascal
Can it be that you replied to the wrong message? ;) (see below) Regards, Sven schrieb am Fr., 3. Juli 2020, 14:10: > Montag ab 12.00? > > > DETLEF D. OVERBEEK > WITH KIND REGARDS, MED VENLIG HILSEN, MET VRIENDELIJKE GROET, > CORDIALEMENT, CORDIALI SALUTI, > LE SALUDA ATENTAMENTE, MIT FREUNDLIC

Re: [fpc-pascal] how to make this tp7 code work on fpc

2020-06-27 Thread Sven Barth via fpc-pascal
Am 27.06.2020 um 04:09 schrieb Travis Siegel: I'm porting some code from tp7 to fpc, and I'm running into an error I don't know how to fix.  The comments claim it's supposed to be a hash table, but to me, it looks more like labels tied to various arrays.   Ofs_00_02: Word = Ofs (Ofs_00_01);  

Re: [fpc-pascal] FPC 3.2.0 released!

2020-06-22 Thread Sven Barth via fpc-pascal
Anthony Walter via fpc-pascal schrieb am Mo., 22. Juni 2020, 06:29: > Great news and thank you to all the developers! I carefully read through > the notes and look forward to using the new array methods and also the > management operators. > > One question to everyone though, what use cases do yo

Re: [fpc-pascal] TFPGList and objects

2020-05-28 Thread Sven Barth via fpc-pascal
Am 28.05.2020 um 19:36 schrieb Vojtěch Čihák via fpc-pascal: There is TFPGObjectList for objects. Ryan is talking about TP style objects. BTW, is FGL a good choice for generics? Some time ago Marco wrote here that FGL is moreless a technology demonstrator and Generics.Collection or other l

Re: [fpc-pascal] please where is fpc-3.2.0rc1.arm64-linux

2020-05-17 Thread Sven Barth via fpc-pascal
Am 16.05.2020 um 11:53 schrieb Mgr. Janusz Chmiel via fpc-pascal: Dear specialists, Please is there some precompiled Linux ARM64 Binary of fpc-3.2.0rc1? Because I can only find ARM not ARM64 Bit precompiled binary. May be, that compiler is stored on some FTP site, but I have analysed ftp.freepas

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

2020-05-12 Thread Sven Barth via fpc-pascal
Virgo Pärna via fpc-pascal schrieb am Di., 12. Mai 2020, 08:27: > On Tue, 05 May 2020 23:03:33 +0200, Rainer Stratmann < > rainerstratm...@t-online.de> wrote: > > > > But that worked a long time (2 years or so) with FPC 2.6.4 > > > > May FPC 2.6.4 was configured to default to delphi or tp

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

2020-05-05 Thread Sven Barth via fpc-pascal
Bart via fpc-pascal schrieb am Mi., 6. Mai 2020, 02:33: > Hi, > > Here's the first line of the Lazarus Makefile: > - > # > # Don't edit, this file is generated by FPCMake Version 2.0.0 > # > default: all > MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i

Re: [fpc-pascal] Name collisions in scoped enums

2020-05-04 Thread Sven Barth via fpc-pascal
Am 05.05.2020 um 04:16 schrieb Ryan Joseph via fpc-pascal: On May 4, 2020, at 10:44 PM, Michael Van Canneyt wrote: That is how enums work by default in Pascal. If you don't force scoped enums, you can still scope them. if you use $scopedenums on then you simply force the use instea

Re: [fpc-pascal] Empty Set in constants in generics

2020-05-04 Thread Sven Barth via fpc-pascal
Ryan Joseph via fpc-pascal schrieb am Mo., 4. Mai 2020, 18:48: > Should generics accept empty sets as constants? I think they should and > this is a bug but I wanted to ask first. > > > > {$mode objfpc} > > program test; > > type > TItem = (A, B, C); > TItems = set of

Re: [fpc-pascal] Name collisions in scoped enums

2020-05-04 Thread Sven Barth via fpc-pascal
Ryan Joseph via fpc-pascal schrieb am Mo., 4. Mai 2020, 18:58: > > > > On May 4, 2020, at 2:12 PM, Michael Van Canneyt > wrote: > > > > Methods can't be keywords either, unless prefixed with &. > > > > It's not safe to change this, that's why a keyword is a keyword: it > supersedes all identifie

Re: [fpc-pascal] Name collisions in scoped enums

2020-05-03 Thread Sven Barth via fpc-pascal
Am 04.05.2020 um 05:06 schrieb Ryan Joseph via fpc-pascal: I've been using scoped enums and noticed that I'm getting collisions with reserved keywords. Shouldn't these be allowed in scoped enums since they are required to be referenced using their type name as a prefix? No, keywords have a hi

Re: [fpc-pascal] TFPGMap retrieving values

2020-05-02 Thread Sven Barth via fpc-pascal
Ryan Joseph via fpc-pascal schrieb am Sa., 2. Mai 2020, 12:33: > > > > On May 1, 2020, at 10:18 PM, Sven Barth > wrote: > > > > It is a map. It maps keys to values. Nowhere does it say how the map is > implemented. > > > > If you need to decide whic

Re: [fpc-pascal] TFPGMap retrieving values

2020-05-01 Thread Sven Barth via fpc-pascal
Ryan Joseph via fpc-pascal schrieb am Fr., 1. Mai 2020, 17:48: > > > > On May 1, 2020, at 10:18 PM, Sven Barth > wrote: > > > > If you need to decide which map to use I suggest you to look at this > benchmark page: http://www.benibela.de/fpc-map-benchmark_en.html Y

Re: [fpc-pascal] TFPGMap retrieving values

2020-05-01 Thread Sven Barth via fpc-pascal
Am 01.05.2020 um 16:12 schrieb Ryan Joseph via fpc-pascal: I've been starting to use the RTL so I'm not very familiar with it but I thought TFPGMap was supposed to be a hash table for fast lookup, so why does TFPSMap.Find using a binary search instead of computing a hash key and indexing into

Re: [fpc-pascal] Question about compiling FPC trunk after revision 44849

2020-04-29 Thread Sven Barth via fpc-pascal
Jonas Maebe schrieb am Mi., 29. Apr. 2020, 19:50: > On 29/04/2020 19:39, Victor Campillo via fpc-pascal wrote: > > For years I have been using the same script to compile FPC, in this > > script I use the next command: > > > > make -j 9 clean all install > > > > After the revision 44849 the use of

[fpc-pascal] New feature announcement: constant parameters for generics

2020-04-25 Thread Sven Barth via fpc-pascal
The Free Pascal team is happy to announce the addition of a new language feature: constant parameters for generics. This allows to declare generic types or routines that aside from type parameters can also take constant parameters that can be used inside the generic as if one would use untyped

Re: [fpc-pascal] Pascal Language Server

2020-04-23 Thread Sven Barth via fpc-pascal
Am 23.04.2020 um 16:28 schrieb Ryan Joseph via fpc-pascal: On Apr 23, 2020, at 9:11 PM, Arjan Adriaanse wrote: lazbuild --compiler=/usr/lib/fpc/3.2.0/ppcx64 pasls.lpi is there a macOS installer for 3.2? I found a link to a FTP server but I don't see this exists. Maybe fix that bug in trunk

Re: [fpc-pascal] Pascal Language Server

2020-04-23 Thread Sven Barth via fpc-pascal
Arjan Adriaanse schrieb am Do., 23. Apr. 2020, 08:33: > I am new to Pascal programming and since I like using Emacs, I wanted > to try to improve its support for editing Pascal code. I decided to > implement an LSP server which text editors can use as back-end for > providing IDE features. The

Re: [fpc-pascal] Best practice porting a Windows service application to Linux?

2020-04-21 Thread Sven Barth via fpc-pascal
Bo Berglund via fpc-pascal schrieb am Mi., 22. Apr. 2020, 05:33: > But what about the general service framework? > The existing code uses a class inherited from TService, does this > exist on FPC for Windows and Linux? > So it can be crosscompiled for both platforms? > The service framework is a

[fpc-pascal] New Target Announcement: Windows on ARM64

2020-04-20 Thread Sven Barth via fpc-pascal
Hello together! I'm happy to announce initial support for the Windows on ARM64 target, aka aarch64-win64. Simple programs work already and the compiler is at least able to display its help message (when trying to compiler something it silently crashes, I've not yet found out why that is the

Re: [fpc-pascal] Error format question

2020-04-19 Thread Sven Barth via fpc-pascal
Am 12.04.2020 um 09:40 schrieb Sven Barth: Ryan Joseph via fpc-pascal <mailto:fpc-pascal@lists.freepascal.org>> schrieb am So., 12. Apr. 2020, 08:53: > On Apr 12, 2020, at 11:16 AM, Ryan Joseph mailto:generic...@gmail.com>> wrote: > > I just did svn up and

Re: [fpc-pascal] Search path order for fpc.cfg

2020-04-12 Thread Sven Barth via fpc-pascal
Michael Van Canneyt schrieb am So., 12. Apr. 2020, 12:16: > > > On Sun, 12 Apr 2020, Bo Berglund via fpc-pascal wrote: > > > On Fri, 10 Apr 2020 13:44:17 -0700 (MST), fredvs via fpc-pascal > > wrote: > > > >> 2)Your home directory, it looks for .fpc.cfg. > > > > This is something I have been

Re: [fpc-pascal] Error format question

2020-04-12 Thread Sven Barth via fpc-pascal
Ryan Joseph via fpc-pascal schrieb am So., 12. Apr. 2020, 08:53: > > > > On Apr 12, 2020, at 11:16 AM, Ryan Joseph wrote: > > > > I just did svn up and got r44689, rebuilt the compiler but I still get > the same error format. Was it supposed to be changed? > > ok, I think we're confused here. J

Re: [fpc-pascal] Search path order for fpc.cfg

2020-04-11 Thread Sven Barth via fpc-pascal
Am 11.04.2020 um 15:18 schrieb fredvs via fpc-pascal: I hope that you understand that: https://github.com/fredvs/freepascal was done not for create a new war but because some features are really needed. We have different opinions about what is needed and what is not. Or what even is the rig

Re: [fpc-pascal] Search path order for fpc.cfg

2020-04-11 Thread Sven Barth via fpc-pascal
Am 11.04.2020 um 14:46 schrieb fredvs via fpc-pascal: It will create one in your home directory if it detects you do not have root access. Could you explain that? Of course if you can show me a trick for configuring a script that will install fpc in the home directory (.fpc.cfg), with for examp

Re: [fpc-pascal] Error format question

2020-04-11 Thread Sven Barth via fpc-pascal
Am 11.04.2020 um 08:11 schrieb Ryan Joseph via fpc-pascal: Sorry to ask this yet again but I keep forgetting or remembering wrong. I thought this was a one time error that was fixed but I'm still getting different error formats with the trunk (as of today) vs 3.0.4. Can anyone please confirm w

Re: [fpc-pascal] About fpc license.

2020-04-10 Thread Sven Barth via fpc-pascal
Luca Olivetti schrieb am Fr., 10. Apr. 2020, 16:11: > El 10/4/20 a les 14:30, Michael Van Canneyt ha escrit: > > > We don't need to use this mechanism ourselves (I've never needed it), > > Probably because you already have the needed dev package installed or > created the symlink yourself. > No o

Re: [fpc-pascal] About fpc license.

2020-04-09 Thread Sven Barth via fpc-pascal
Michael Van Canneyt schrieb am Fr., 10. Apr. 2020, 07:44: > > > On Thu, 9 Apr 2020, fredvs via fpc-pascal wrote: > > > Hello. > > > > I have done a fork of fpc fixes_3_2 and made some modification of > original > > code. > > > > May I distribute the fpc binary of that patched version with the uni

Re: [fpc-pascal] enumerate record fields at runtime

2020-04-07 Thread Sven Barth via fpc-pascal
Fabio Luis Girardi via fpc-pascal schrieb am Di., 7. Apr. 2020, 14:58: > > Using RTTI I can count the record fields, but until now, I can't find a > way to get the field names. > More is not possible as of now. Only once the Extended RTTI is supported this will be possible. Regards, Sven __

Re: [fpc-pascal] Pass open array to static array?

2020-04-04 Thread Sven Barth via fpc-pascal
Ryan Joseph via fpc-pascal schrieb am Fr., 3. Apr. 2020, 21:03: > > > > On Apr 3, 2020, at 10:09 PM, Sven Barth > wrote: > > > > If your DoThis would be declared with a dynamic array parameter (e.G. > "specialize TArray") then you'd in fact have a

Re: [fpc-pascal] Pass open array to static array?

2020-04-03 Thread Sven Barth via fpc-pascal
Ryan Joseph via fpc-pascal schrieb am Fr., 3. Apr. 2020, 14:33: > > > > > On Apr 3, 2020, at 3:43 PM, Sven Barth > wrote: > > > > They are neither. They are simply a pointer to the first element and a > hidden size argument. For the pointer it is not importan

Re: [fpc-pascal] Pass open array to static array?

2020-04-03 Thread Sven Barth via fpc-pascal
Ryan Joseph via fpc-pascal schrieb am Fr., 3. Apr. 2020, 04:13: > > > > On Mar 16, 2020, at 5:40 AM, Sven Barth > wrote: > > > > The message of the compiler is a bit misleading. It's a *dynamic* array > that is created there, not an *open* array. Open ar

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

2020-03-31 Thread Sven Barth via fpc-pascal
Am 01.04.2020 um 00:22 schrieb fredvs via fpc-pascal: Does FPC come as a 64 bit release now? https://sourceforge.net/projects/freepascal/files/Win32/3.0.4/fpc-3.0.4.i386-win32.cross.x86_64-win64.exe/download Alexander meant a native Win64 release. And the answer for that is no. Regards, Sven

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

2020-03-25 Thread Sven Barth via fpc-pascal
schrieb am Mi., 25. März 2020, 19:48: > On 3/25/20 2:17 PM, Sven Barth via fpc-pascal wrote: > > wkitt...@windstream.net schrieb am Mi., 25. März 2020, 18:47: > > > >> hummm... ok, so how to you get a constant to be a byte and storing 7 > for the > >> dec

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

2020-03-25 Thread Sven Barth via fpc-pascal
schrieb am Mi., 25. März 2020, 18:47: > On 3/24/20 6:58 PM, Sven Barth via fpc-pascal wrote: > > wkitt...@windstream.net schrieb am Di., 24. März 2020, 18:37: > > > >> you should figure out why typed constants are not being allowed/used > >> in your setup... &

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

2020-03-24 Thread Sven Barth via fpc-pascal
Am 24.03.2020 um 01:08 schrieb fredvs via fpc-pascal: Hello. With fpc 3.3.1 there is this warning: "Warning: (4110) Range check error while evaluating constants (-193 must be between 0 and 255)" Here the code pointed by the warning: const foldhiddenbit = 7; foldhiddenmask = 1 shl foldhidd

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

2020-03-24 Thread Sven Barth via fpc-pascal
schrieb am Di., 24. März 2020, 18:37: > On 3/24/20 12:40 PM, fredvs via fpc-pascal wrote: > > Hello Alexander. > > > > I did: > > > > const > > foldhiddenbit : byte = 7; // line 896 > > foldhiddenmask : byte = 1 shl foldhiddenbit; // line 897 > > currentfoldhiddenbit : byte = 6; // li

Re: [fpc-pascal] Size of pdynarraytypeinfo

2020-03-23 Thread Sven Barth via fpc-pascal
fredvs via fpc-pascal schrieb am Mo., 23. März 2020, 22:27: > By the way, may I use this tip for fpc < 3.3.1 or is it ok only with fpc > trunk? > Yes, it will also work with older be versions - as you noticed already. ;) Regards, Sven > ___ fpc-pasca

Re: [fpc-pascal] Size of pdynarraytypeinfo

2020-03-23 Thread Sven Barth via fpc-pascal
Am 23.03.2020 um 17:49 schrieb fredvs via fpc-pascal: Some more infos: This gives the correct size with fpc <= 3.2.0: function dynarrayelesize(const typinfo: pdynarraytypeinfo): sizeint; var ti: pdynarraytypeinfo; begin ti:= typinfo; inc(pointer(ti),ord(pdynarraytypeinfo(ti)^.namelen)+2);

<    1   2   3   4   5   6   7   8   9   10   >