Re: [fpc-pascal] C-blocks

2018-11-15 Thread Sven Barth via fpc-pascal
Am Do., 15. Nov. 2018, 08:39 hat Ryan Joseph geschrieben: > > > > On Nov 15, 2018, at 1:27 PM, Sven Barth via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > > > > They are only useful when interacting with the external runtime. On > other OSes noth

Re: [fpc-pascal] Passing nested procs out?

2018-11-15 Thread Sven Barth via fpc-pascal
res_2.6.0#Support_for_nested_procedure_variables Don't know if it is documented as such, but if not, it should be. Regards, Sven > ___________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Passing nested procs out?

2018-11-15 Thread Sven Barth via fpc-pascal
Am Do., 15. Nov. 2018, 12:26 hat Marcos Douglas B. Santos geschrieben: > On Thu, Nov 15, 2018 at 8:15 AM Sven Barth via fpc-pascal > wrote: > > > > Am Do., 15. Nov. 2018, 10:17 hat Ryan Joseph > geschrieben: > >> > >> Is passing nested procs outside of t

Re: [fpc-pascal] Passing nested procs out?

2018-11-15 Thread Sven Barth via fpc-pascal
Am Do., 15. Nov. 2018, 12:40 hat Ryan Joseph geschrieben: > > > > On Nov 15, 2018, at 5:14 PM, Sven Barth via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > > > > See the notes mentioned here: > http://wiki.freepascal.org/FPC_New_Features_2.6.0#Su

Re: [fpc-pascal] C-blocks

2018-11-15 Thread Sven Barth via fpc-pascal
e. Also the overhead for calling an anonymous function is only that for a virtual method call. Regards, Sven > _______________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] C-blocks

2018-11-16 Thread Sven Barth via fpc-pascal
Am Fr., 16. Nov. 2018, 03:25 hat Ryan Joseph geschrieben: > > > > On Nov 15, 2018, at 11:30 PM, Sven Barth via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > > > > No, too many ways to do the same thing don't make things easier, not to > menti

Re: [fpc-pascal] C-blocks

2018-11-16 Thread Sven Barth via fpc-pascal
Am Fr., 16. Nov. 2018, 12:57 hat Ryan Joseph geschrieben: > > > > On Nov 16, 2018, at 5:33 PM, Sven Barth via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > > > > When a function contains at least one anonymous function then a capture > obje

Re: [fpc-pascal] Building trunk

2018-11-23 Thread Sven Barth via fpc-pascal
ld you check whether it's FPC itself that segfaults or something else and if the former try to retrieve a stacktrace, please? Regards, Sven > _______________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Building trunk

2018-11-24 Thread Sven Barth via fpc-pascal
Am Sa., 24. Nov. 2018, 10:09 hat C Western geschrieben: > On 23/11/2018 09:50, Sven Barth via fpc-pascal wrote: > > Am Fr., 23. Nov. 2018, 10:26 hat C Western > <mailto:l...@c-m-w.me.uk>> geschrieben: > > > > I haven't been able to build trunk i386 fpc

Re: [fpc-pascal] Multi-scope helpers draft

2018-11-25 Thread Sven Barth via fpc-pascal
ooks good. Regards, Sven ___________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Constants in generics

2018-11-25 Thread Sven Barth via fpc-pascal
had written for the helper extension: add tests. A feature like this will need many tests (you can use "tgenconst" as test name prefix). Also don't forget to test this with generic routines. Don't forget to check the code formatting as well, I saw a few locations wher

Re: [fpc-pascal] Multi-scope helpers draft

2018-11-25 Thread Sven Barth via fpc-pascal
Am Mo., 26. Nov. 2018, 03:12 hat Ryan Joseph geschrieben: > > > > On Nov 25, 2018, at 11:03 PM, Sven Barth via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > > > > It's a good thing that you saw the errors in your first design and > rectified

Re: [fpc-pascal] Constants in generics

2018-11-26 Thread Sven Barth via fpc-pascal
Am Mo., 26. Nov. 2018, 10:46 hat Ryan Joseph geschrieben: > > > > On Nov 26, 2018, at 12:09 AM, Sven Barth via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > > > > - your pretty name is wrong; the pretty name for a specialization with > con

Re: [fpc-pascal] Constants in generics

2018-11-26 Thread Sven Barth via fpc-pascal
Am Mo., 26. Nov. 2018, 12:14 hat Ryan Joseph geschrieben: > > > > On Nov 26, 2018, at 5:16 PM, Sven Barth via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > > > > Am Mo., 26. Nov. 2018, 10:46 hat Ryan Joseph > geschrieben: > > > > > &

Re: [fpc-pascal] Constants in generics

2018-11-26 Thread Sven Barth via fpc-pascal
Am Mo., 26. Nov. 2018, 15:47 hat Ryan Joseph geschrieben: > > > > On Nov 26, 2018, at 8:18 PM, Sven Barth via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > > > > You don't need to manually check for U. The parser will find U in the > symbol

Re: [fpc-pascal] Constants in generics

2018-11-27 Thread Sven Barth via fpc-pascal
Am Di., 27. Nov. 2018, 08:18 hat Ryan Joseph geschrieben: > > > > On Nov 27, 2018, at 4:59 AM, Sven Barth via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > > > > Best check again once you've done the switch to tconstsym for constants. >

Re: [fpc-pascal] Constants in generics

2018-11-27 Thread Mattias Gaertner via fpc-pascal
On Tue, 27 Nov 2018 11:35:22 +0100 Sven Barth via fpc-pascal wrote: >[...] > > const > > kSomeDays:TDays = [Mon, Wed]; >[...] > The difference between typed and untyped constants are available > everywhere else in the language as well, so I have no qualms (at &g

Re: [fpc-pascal] Constants in generics

2018-11-27 Thread Sven Barth via fpc-pascal
Am Di., 27. Nov. 2018, 12:03 hat Mattias Gaertner via fpc-pascal < fpc-pascal@lists.freepascal.org> geschrieben: > On Tue, 27 Nov 2018 11:35:22 +0100 > Sven Barth via fpc-pascal wrote: > > >[...] > > > const > > > kSomeDays:TDays = [Mon, Wed]; &g

Re: [fpc-pascal] Constants in generics

2018-11-27 Thread Sven Barth via fpc-pascal
Am Di., 27. Nov. 2018, 14:00 hat Ryan Joseph geschrieben: > > > > On Nov 27, 2018, at 5:35 PM, Sven Barth via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > > > > 1) kSomeDays is a typed const so I get a load node instead of > tsetconstnode, whic

Re: [fpc-pascal] Constants in generics

2018-11-27 Thread Sven Barth via fpc-pascal
s_unit; > > var > a: specialize TList; > begin > a.dothis('hello'); > end. > Does it also work correctly if you change the constant and then recompile? The same if the specialization is inside another unit used by the program? Regards, Sven > ______

Re: [fpc-pascal] Constants in generics

2018-11-28 Thread Sven Barth via fpc-pascal
type parameter clause as well as the "specialize" in non-Delphi modes would not need to be used and it would look like a normal, non-generic call. Regards, Sven > ___________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Constants in generics

2018-11-28 Thread Sven Barth via fpc-pascal
Am Mi., 28. Nov. 2018, 15:27 hat Ryan Joseph geschrieben: > > > > On Nov 28, 2018, at 7:26 PM, Sven Barth via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > > > > Because that is not supposed to work. Generic routines are *routines*, > not types. Y

Re: [fpc-pascal] Default record const values

2018-11-28 Thread Sven Barth via fpc-pascal
; begin   Test := TTest.Default; end. That is indeed a good idea and with the extension to allow multiple helpers there wouldn't even be a negative impact... 🤔 Regards, Sven _______ fpc-pascal maillist - fpc-pascal@lists.freepascal.org

Re: [fpc-pascal] Constants in generics

2018-11-28 Thread Sven Barth via fpc-pascal
Am 27.11.2018 um 11:35 schrieb Sven Barth: Am Di., 27. Nov. 2018, 08:18 hat Ryan Joseph mailto:r...@thealchemistguild.com>> geschrieben: > On Nov 27, 2018, at 4:59 AM, Sven Barth via fpc-pascal mailto:fpc-pascal@lists.freepascal.org>> wrote: > > Best ch

[fpc-pascal] How to get ANSI code command return value?

2018-12-01 Thread Mr Bee via fpc-pascal
here a way to temporarily redirect standard input into a variable? Requirements: – I want to avoid CRT unit as much as possible. I prefer raw pascal solution.– The solution works across platforms, at least on Mac, Linux, and Windows. Is it possible using standard Pascal routines? Thank you. Regards

Re: [fpc-pascal] How to get ANSI code command return value?

2018-12-02 Thread Sven Barth via fpc-pascal
Am So., 2. Dez. 2018, 08:29 hat Mr Bee via fpc-pascal < fpc-pascal@lists.freepascal.org> geschrieben: > – I want to avoid CRT unit as much as possible. I prefer raw pascal > solution. > Um... The CRT unit is a raw Pascal solution?! Anyway, you can use that unit to see how the

Re: [fpc-pascal] Implicit generic specializations

2018-12-02 Thread Sven Barth via fpc-pascal
t; Where is it messy? O.o Also the idea should be that a non-generic routine takes precedence. Regards, Sven > _______________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] How to get ANSI code command return value?

2018-12-02 Thread Mr Bee via fpc-pascal
des emulation, as explained here: https://docs.microsoft.com/en-us/windows/console/console-virtual-terminal-sequences Regards, –Mr Bee _______________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Implicit generic specializations

2018-12-02 Thread Sven Barth via fpc-pascal
Am So., 2. Dez. 2018, 15:28 hat Ryan Joseph geschrieben: > > > > On Dec 2, 2018, at 8:11 PM, Sven Barth via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > > > > Also the idea should be that a non-generic routine takes precedence. > > > > I

Re: [fpc-pascal] Implicit generic specializations

2018-12-02 Thread Sven Barth via fpc-pascal
Am Mo., 3. Dez. 2018, 03:45 hat Ryan Joseph geschrieben: > > > > On Dec 2, 2018, at 10:53 PM, Sven Barth via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > > > > Specialization is expensive. If specialization can be avoided, it should > be. Not to me

Re: [fpc-pascal] Generics question

2018-12-02 Thread Sven Barth via fpc-pascal
d be part of 3.2.0. You can test the corresponding branch of you want. Regards, Sven > _______ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Generics question

2018-12-03 Thread Sven Barth via fpc-pascal
Am Mo., 3. Dez. 2018, 10:53 hat Martok geschrieben: > Am 03.12.2018 um 08:00 schrieb Sven Barth via fpc-pascal: > > Because Delphi does not allow that either. We relaxed that however in > 3.1.1 and > > it should be part of 3.2.0. You can test the corresponding branch of you &

Re: [fpc-pascal] Object questions

2018-12-03 Thread Sven Barth via fpc-pascal
atibility. Thus there was simply no need to add support for them. In addition to that one would need to dereference object pointer variables to use the operators (though that one is true for records as well). Regards, Sven > ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Object questions

2018-12-04 Thread Sven Barth via fpc-pascal
Am Di., 4. Dez. 2018, 08:00 hat Ryan Joseph geschrieben: > > > > On Dec 4, 2018, at 1:52 PM, Sven Barth via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > > > > The type of "Self" inside a object is always the same no matter if it'

Re: [fpc-pascal] Implicit generic specializations

2018-12-05 Thread Sven Barth via fpc-pascal
end; begin   TSomeRecord.Test('Hello World');   TSomeRecord.Test(42);   TSomeRecord.Test(True); end. === code end === This will output: === output begin === String LongInt T === output end === Regards, Sven _______________ fpc-pascal maillist

Re: [fpc-pascal] Proud to announce..

2018-12-05 Thread Marc Hanisch via fpc-pascal
e work on the > compiler, without whose solid foundations I would not have been able to do > this > ! > > Enjoy, and stay tuned for more wonderful features & cutting edge > technology > from the people that bring you Free Pascal & Lazarus ! > > Michael.

[fpc-pascal] precedence "is" and "and"

2018-12-08 Thread Mattias Gaertner via fpc-pascal
fpc and the Delphi docs says the same as the fpc docs: http://docwiki.embarcadero.com/RADStudio/Tokyo/en/Expressions_(Delphi)#Operator_Precedence Mattias _______ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] precedence "is" and "and"

2018-12-08 Thread Mattias Gaertner via fpc-pascal
On Sat, 8 Dec 2018 20:38:23 +0100 Mattias Gaertner via fpc-pascal wrote: >[...] > According to the docs, the "is" operator is fourth level, the "and" is > second level, so the "and" must be computed before the "is". But it > seems fpc treats &

Re: [fpc-pascal] precedence "is" and "and"

2018-12-08 Thread Mattias Gaertner via fpc-pascal
On Sat, 8 Dec 2018 20:38:23 +0100 Mattias Gaertner via fpc-pascal wrote: > Hi, > > According to the docs, the "is" operator is fourth level, the "and" is > second level, so the "and" must be computed before the "is". Link: https://ww

Re: [fpc-pascal] precedence "is" and "and"

2018-12-08 Thread Mattias Gaertner via fpc-pascal
On Sat, 8 Dec 2018 21:23:57 +0100 Marco van de Voort wrote: > Op 2018-12-08 om 20:38 schreef Mattias Gaertner via fpc-pascal: > > According to the docs, the "is" operator is fourth level, the "and" > > is second level, so the "and" must be computed

Re: [fpc-pascal] precedence "is" and "and"

2018-12-08 Thread Mattias Gaertner via fpc-pascal
l.org/docs-html/current/ref/refsu47.html I looked at it, but I still don't understand. Perhaps you can explain the examples I gave? // compiles, but should fail: if o is TComponent and b then ; if o is TComponent or b then ; // compiles in fpc, but not in Delphi: if b or o is TComponent then

[fpc-pascal] FPC-based http/s server

2018-12-10 Thread Mr Bee via fpc-pascal
y pure FPC standard units such as fpHTTP* and fpWeb* units. Google only gave me some old (back to early 2000) and abandoned projects written in Delphi mixed with inline assembler and Windows' API, also don't support HTTPS. Thank you. Regards, –Mr Bee ______

Re: [fpc-pascal] Generic (TFPGObjectList) EInvalidCast

2018-12-11 Thread Mattias Gaertner via fpc-pascal
t; begin >   MyList:=TMyList.Create(True); >   MyClass:=TMyClass.Create; >   MyList.Add(MyClass); >   MyList[0].Output1; >   TMyDescClass(MyList[0]);  // EInvalidCast because MyClass is not TMyDescClass Mattias ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] TThread.FreeOnTerminate

2018-12-14 Thread Sven Barth via fpc-pascal
t; if it's only to be used in 'private' context of the constructor? > > I think FreeOnTerminate should not even exist. IMO it should simply be > 'True'. > I disagree, because then you could never do a WaitFor(). Or provide the thread with new data

Re: [fpc-pascal] TThread.FreeOnTerminate

2018-12-14 Thread Sven Barth via fpc-pascal
Am Fr., 14. Dez. 2018, 11:23 hat Michael Van Canneyt geschrieben: > > > On Fri, 14 Dec 2018, Sven Barth via fpc-pascal wrote: > > > Am Fr., 14. Dez. 2018, 10:31 hat Michael Van Canneyt < > mich...@freepascal.org> > > geschrieben: > > > >> > >

Re: [fpc-pascal] TThread.FreeOnTerminate

2018-12-14 Thread Sven Barth via fpc-pascal
gt; (though the latter is not a very good option according to the > documentation). > These functions have the potential to leave locks in a locked state which would lead to deadlocks. Thus ccoperative exits are always preferable. Regards, Sven ___________ f

Re: [fpc-pascal] Candidate for crowd-funding

2018-12-19 Thread Sven Barth via fpc-pascal
d registers... But yes, in the long term this would definitely be nice. - proper macro language perhaps > No. We already rejected such an idea some months ago. Regards, Sven ___________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Candidate for crowd-funding

2018-12-19 Thread Sven Barth via fpc-pascal
.html I never said that it would be easy, but it's definitely possible as there also exist C/C++ libraries for coroutines. Regards, Sven ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Candidate for crowd-funding

2018-12-19 Thread Sven Barth via fpc-pascal
expect. The actual difficult problem is argument > location > remapping. Other than that, inline-nostackframe-asm[registers] needs > almost no > changes. > Maybe we could add your changes to trunk? Regards, Sven > ___________ fpc-pascal mailli

Re: [fpc-pascal] inlining functions depending on implementation only functions

2018-12-29 Thread Sven Barth via fpc-pascal
sed to happen? > > Fpc 3.1 did not show any warning in this case (although now that I > investigate it, fpc 3.1 also did not seem to inline it despite not > showing the warning) > Correct. FPC 3.1.1 did neither warn nor inline in this case, 3.3.1 at least warns (I think 3.2 already war

Re: [fpc-pascal] Constants in generics

2019-01-02 Thread Sven Barth via fpc-pascal
Am Mi., 2. Jan. 2019, 11:20 hat denisgolovan geschrieben: > Hi, all > > Could someone confirm this functionality is merged into trunk? I mean > constants in generics. > I can confirm that it is not integrated in trunk. Regards, Sven _______

Re: [fpc-pascal] SetLength warnings - request

2019-01-02 Thread Sven Barth via fpc-pascal
ult := Nil" or "Result := []" as 3.2.0 now supports. Anything else can potentially be a bug lying in wait. Regards, Sven ___________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Constants in generics

2019-01-02 Thread Alexander Shishkin via fpc-pascal
= record list: array[0..U-1] of T; function capacity: integer; end; -- AVS ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Constants in generics

2019-01-02 Thread Sven Barth via fpc-pascal
Am Mi., 2. Jan. 2019, 23:41 hat Alexander Shishkin via fpc-pascal < fpc-pascal@lists.freepascal.org> geschrieben: > 06.11.2018 10:13, Ryan Joseph пишет: > > > > program generic_constants; > > > > type > > generic TList = record >

Re: [fpc-pascal] Constants in generics

2019-01-02 Thread Alexander Shishkin via fpc-pascal
var data: array[0..U] of T; end; generic TList4 = class var data: array[0..U] of T; end; 03.01.2019 2:15, Sven Barth via fpc-pascal пишет: Am Mi., 2. Jan. 2019, 23:41 hat Alexander Shishkin via fpc-pascal <mailto:fpc-pascal@lists.freepascal.org>> geschrieben: 06.11.

Re: [fpc-pascal] Constants in generics

2019-01-02 Thread Alexander Shishkin via fpc-pascal
2 = record end; type generic TMyRecord3 = record end; type generic TMyRecord4 = record end; _______ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Constants in generics

2019-01-03 Thread Alexander Shishkin via fpc-pascal
03.01.2019 6:32, Ryan Joseph пишет: On Jan 2, 2019, at 8:25 PM, Alexander Shishkin via fpc-pascal wrote: This is not consistent with constraints. Should be ";" after T. And what about following examples? The semicolon is only needed following a generic parameter which is c

Re: [fpc-pascal] Constants in generics

2019-01-03 Thread Mattias Gaertner via fpc-pascal
On Thu, 3 Jan 2019 14:58:00 +0300 Alexander Shishkin via fpc-pascal wrote: >[...] > This is OK (both T and U are integer): > generic TMyRecord1 = record end; That is inconsistent to normal Pascal arguments. Name[, Name ...][:type] Isn'

Re: [fpc-pascal] Constants in generics

2019-01-03 Thread Sven Barth via fpc-pascal
Am Do., 3. Jan. 2019, 12:58 hat Alexander Shishkin via fpc-pascal < fpc-pascal@lists.freepascal.org> geschrieben: > 03.01.2019 6:32, Ryan Joseph пишет: > > > > > >> On Jan 2, 2019, at 8:25 PM, Alexander Shishkin via fpc-pascal < > fpc-pascal@lists.freepasc

Re: [fpc-pascal] Constants in generics

2019-01-03 Thread Alexander Shishkin via fpc-pascal
03.01.2019 15:45, Mattias Gaertner via fpc-pascal пишет: On Thu, 3 Jan 2019 14:58:00 +0300 Alexander Shishkin via fpc-pascal wrote: [...] This is OK (both T and U are integer): generic TMyRecord1 = record end; That is inconsistent to normal Pascal arguments. Name[, Name ...][:type] Isn&#

Re: [fpc-pascal] Constants in generics

2019-01-03 Thread Sven Barth via fpc-pascal
Am Do., 3. Jan. 2019, 14:24 hat Alexander Shishkin via fpc-pascal < fpc-pascal@lists.freepascal.org> geschrieben: > 03.01.2019 15:45, Mattias Gaertner via fpc-pascal пишет: > > On Thu, 3 Jan 2019 14:58:00 +0300 > > Alexander Shishkin via fpc-pascal > > wrote: > >

Re: [fpc-pascal] Constants in generics

2019-01-03 Thread Sven Barth via fpc-pascal
Am Do., 3. Jan. 2019, 17:50 hat Ryan Joseph geschrieben: > > > > On Jan 3, 2019, at 6:20 AM, Sven Barth via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > > > > Correct. ";" separates different parameter types, "," separates those

Re: [fpc-pascal] Constants in generics

2019-01-03 Thread Sven Barth via fpc-pascal
Am 03.01.2019 um 23:14 schrieb Ryan Joseph: On Jan 3, 2019, at 11:33 AM, Sven Barth via fpc-pascal wrote: The approach should be like this: - const is allowed at the start of the parameters or after a ";" - a parameter name is either followed by a ",", ";", &q

Re: [fpc-pascal] Constants in generics

2019-01-05 Thread Sven Barth via fpc-pascal
Am Fr., 4. Jan. 2019, 21:11 hat geschrieben: > On 1/4/19 1:47 PM, Ryan Joseph wrote: > > > >> On Jan 3, 2019, at 11:11 PM, Sven Barth via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > >> > >> Fair enough. In that case support for constants

Re: [fpc-pascal] Constants in generics

2019-01-05 Thread Sven Barth via fpc-pascal
Am Sa., 5. Jan. 2019, 17:28 hat Ryan Joseph geschrieben: > > > > On Jan 5, 2019, at 1:18 AM, Sven Barth via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > > > > I didn't design the original implementation, but the improvements for > the

Re: [fpc-pascal] Constants in generics

2019-01-06 Thread Sven Barth via fpc-pascal
ing else than const, so why would we need to repeat it? Regards, Sven > _______________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Get "disk" ID

2019-01-06 Thread Sven Barth via fpc-pascal
en not partitioned with MBR/GPT, but have a file system starting at sector zero). See also: https://en.m.wikipedia.org/wiki/Master_boot_record Regards, Sven > _______ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Interface bug or some new feature

2019-01-06 Thread Sven Barth via fpc-pascal
f a parent class. So you need to declare P as protected for this to work. Though to be fair in the specific example you gave I think that it should work as both are within the same unit. We'll need to check that... Regards, Sven > ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Interface bug or some new feature

2019-01-06 Thread Sven Barth via fpc-pascal
Am 06.01.2019 um 13:30 schrieb denisgolovan: 06.01.2019, 15:00, "Sven Barth via fpc-pascal" : The default visibility for classes without $M+ is private. Thus TClass1.P is private. An interface implementation does not have access to private methods of a parent class. So you need to

Re: [fpc-pascal] Interface bug or some new feature

2019-01-06 Thread Sven Barth via fpc-pascal
Double);" Regards, Sven _______________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Constants in generics

2019-01-06 Thread Sven Barth via fpc-pascal
utility functions for it. Regards, Sven > _______________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Constants in generics

2019-01-06 Thread Sven Barth via fpc-pascal
sistency now which may bother some people. > > generic TStuff = record end; > We can always add it in later if we think it's needed. Let's keep it out for now. Regards, Sven > _______________ fpc-pascal maillist - fpc-pascal@lists.freepascal.o

Re: [fpc-pascal] Small typo in User_Changes_Trunk ?

2019-01-07 Thread Sven Barth via fpc-pascal
l spotted. If you want you can fix it :) Regards, Sven > ___________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Constants in generics

2019-01-07 Thread Sven Barth via fpc-pascal
llog (see http://wiki.freepascal.org/Testing_FPC#Recommended_Workflow ). Regards, Sven _______ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Constants in generics

2019-01-08 Thread Sven Barth via fpc-pascal
not we can always add some flag to tconstsym... Regards, Sven ___________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Constants in generics

2019-01-08 Thread Sven Barth via fpc-pascal
Am Di., 8. Jan. 2019, 23:49 hat Benito van der Zander geschrieben: > Hi, > > that reminds me of https://bugs.freepascal.org/view.php?id=34232 > Yes, that falls into the same category... Regards, Sven _______ fpc-pascal maillist -

Re: [fpc-pascal] Constants in generics

2019-01-09 Thread Sven Barth via fpc-pascal
defined and not changed when the const type is changed. Regards, Sven > _______ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Multi-scope helpers draft

2019-01-10 Thread Mattias Gaertner via fpc-pascal
ead of multihelpers or allhelpers? Mattias _______ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] type helpers

2019-01-11 Thread Mattias Gaertner via fpc-pascal
tHlp.DoIt START ',Self,' w=',b.w); Self:=4; // changes b.FW directly writeln('TIntHlp.DoIt END ',Self,' w=',b.w); end; begin b:=TBig.Create; b.w.DoIt; end. Mattias _______________ fpc-pascal maillist - fpc-pascal@lists.

Re: [fpc-pascal] type helpers

2019-01-11 Thread Sven Barth via fpc-pascal
Am Fr., 11. Jan. 2019, 11:24 hat Mattias Gaertner via fpc-pascal < fpc-pascal@lists.freepascal.org> geschrieben: > Hi, > > A type helper can change Self. > I wondered how FPC 3.3.1 handles properties and got some > unexpected results. Is this by design, a bug, or not-yet-im

Re: [fpc-pascal] type helpers

2019-01-11 Thread Mattias Gaertner via fpc-pascal
On Fri, 11 Jan 2019 14:27:13 +0100 Sven Barth via fpc-pascal wrote: >[...] > This is by design. In this case DoIt is called on a temp variable > that gets its value from b.w, the value of b.FW does not change Ehm, in this case b.FW *does* changes. Maybe you mean the case property W:

Re: [fpc-pascal] type helpers

2019-01-11 Thread Sven Barth via fpc-pascal
Am Fr., 11. Jan. 2019, 14:52 hat Mattias Gaertner via fpc-pascal < fpc-pascal@lists.freepascal.org> geschrieben: > On Fri, 11 Jan 2019 14:27:13 +0100 > Sven Barth via fpc-pascal wrote: > > >[...] > > This is by design. In this case DoIt is called on a temp variable &

Re: [fpc-pascal] inlining functions

2019-01-12 Thread Sven Barth via fpc-pascal
compile at least twice as well as the first pass only collects information and acts on it in the second pass. Regards, Sven > ___________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] type helper constructor

2019-01-17 Thread Mattias Gaertner via fpc-pascal
creates something when called with the type (e.g. TObject.Create), while behaving like a normal function when called with an instance (e.g. obj.create). Is this a bug or by design? Mattias ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http

[fpc-pascal] type helper default property

2019-01-17 Thread Mattias Gaertner via fpc-pascal
ing[1] has still the normal meaning. Same for arrays, double, integers. Is this an oversight, or has FPC some use for the default directive? Mattias _______ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] type helper constructor

2019-01-17 Thread Sven Barth via fpc-pascal
Am Do., 17. Jan. 2019, 13:10 hat Mattias Gaertner via fpc-pascal < fpc-pascal@lists.freepascal.org> geschrieben: > Hi, > > A type helper for a string can add a constructor. > But how it can be used differs between FPC and Delphi. > > For example: > > {$modeswitch t

Re: [fpc-pascal] type helper default property

2019-01-17 Thread Sven Barth via fpc-pascal
Am 17.01.2019 um 13:17 schrieb Mattias Gaertner via fpc-pascal: Hi, For example: type THelper = type helper for string function GetItems(Index: word): word; property Items[Index: word]: word read GetItems; default; end; Delphi forbids this with "'default' direct

Re: [fpc-pascal] type helper default property

2019-01-17 Thread Mattias Gaertner via fpc-pascal
On Thu, 17 Jan 2019 22:42:39 +0100 Sven Barth via fpc-pascal wrote: >[...] > > Is this an oversight, or has FPC some use for the default > > directive? > For now I'd say that it's an oversight. Delphi allows it for class > and record helpers, but not for

Re: [fpc-pascal] trying to use C code in .pas on WIN32

2019-01-24 Thread Sven Barth via fpc-pascal
Am Fr., 25. Jan. 2019, 01:01 hat Marc Santhoff geschrieben: > On Wed, 2019-01-23 at 14:30 -0700, conlin664 via fpc-pascal wrote: > > I've done research, but am just missing something. > > my .pas code links just fine, but doesn't RUN. > > ( first writeln neve

[fpc-pascal] Dos unit for Windows

2019-01-30 Thread Marco Borsari via fpc-pascal
while the high one should be zero, so the assignment would become attr:=l and $ff; Waiting for your comments, Marco -- Simplex sigillum veri ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman

Re: [fpc-pascal] Dos unit for Windows

2019-01-30 Thread Marco Borsari via fpc-pascal
g with all bits. The FAT FS is freezed since long time and I think it is supposed GetFAttr behaves in standard manner. Anyway it is easy to remedy the problem directly in my source, thank you for your assistance, Marco -- Simplex sigillum veri ___________ fpc-pa

Re: [fpc-pascal] trying to use C code in .pas on WIN32

2019-01-30 Thread Sven Barth via fpc-pascal
Am 30.01.2019 um 23:14 schrieb conlin664 via fpc-pascal: ok. I backed up to a simple version. how I declare the C routine must be the problem, with nothing, procedure HelloC; cdecl; external; I think it's trying to static link it, and gets an pcode.pas(19,1) Error: Undefined s

Re: [fpc-pascal] trying to use C code in .pas on WIN32

2019-01-31 Thread Sven Barth via fpc-pascal
Am Do., 31. Jan. 2019, 15:26 hat Bart geschrieben: > On Thu, Jan 31, 2019 at 7:35 AM Sven Barth via fpc-pascal > wrote: > > > > This is on an evil windows machine > > Windows is one of FPC's main targets, we can do without such > "expletives". > &

Re: [fpc-pascal] h2pas fails on c++ header file

2019-01-31 Thread Sven Barth via fpc-pascal
or constref. Though there'd still be the topic of name mangling... (FPC's cppdecl is not that good yet) Regards, Sven > ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] trying to use C code in .pas on WIN32

2019-01-31 Thread Sven Barth via fpc-pascal
Am Do., 31. Jan. 2019, 22:03 hat Marc Santhoff geschrieben: > On Thu, 2019-01-31 at 11:00 -0700, conlin664 via fpc-pascal wrote: > > sven, > > > > so I just tried, what I think you said: > > > > procedure HelloC; cdecl; external name 'HelloC'; >

[fpc-pascal] Lazarus Release 2.0.0

2019-02-05 Thread Mattias Gaertner via fpc-pascal
at (after some time for synchronization) http://mirrors.iwi.me/lazarus/ Mattias _______ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Question: Is there a global callback, when a thread gets terminated?

2019-02-12 Thread Sven Barth via fpc-pascal
d register with > the > logger before first usage." > Not every LazLogger user knows that their code is run in a thread. And not every thread user knows that the code they are using is using LazLogger in turn. Regards, Sven _______ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Web application framework in Free Pascal

2019-02-12 Thread Marc Hanisch via fpc-pascal
Thanks for the link, looks really good and I will try it out for sure as soon as possible! Best regards, Marc -- Jabber: xmpp:marc.hani...@member.fsf.org Support the Free Software Foundation! https://my.fsf.org/donate Am Mi., 13. Feb. 2019, 07:06 hat Zamrony P. Juhara via fpc-pascal <

[fpc-pascal] Documentation typo

2019-02-15 Thread Marco Borsari via fpc-pascal
ult)" Regards, Marco -- Simplex sigillum veri ___________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] StrUtils unit needs Widestring funcs

2019-02-15 Thread Sven Barth via fpc-pascal
important is Windows, but there it is very important. 😁 Regards, Sven > _______ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

<    7   8   9   10   11   12   13   14   15   16   >