Re: [fpc-pascal] Managed record questions

2018-03-08 Thread Sven Barth via fpc-pascal
inally for this. The finally-block is always executed when the try-block is left no matter if it's by reaching the end, calling exit or by an exception. Regards, Sven _______ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepas

Re: [fpc-pascal] Managed record questions

2018-03-08 Thread Sven Barth via fpc-pascal
Am 08.03.2018 12:51 schrieb "Ryan Joseph" : > On Mar 8, 2018, at 5:42 PM, Sven Barth via fpc-pascal < fpc-pascal@lists.freepascal.org> wrote: > > You are supposed to use try...finally for this. The finally-block is always executed when the try-block is left no matter if

Re: [fpc-pascal] Managed record questions

2018-03-08 Thread Sven Barth via fpc-pascal
port for helpers could be easily added. Only major feature missing compared to classes is the support for extensive RTTI. Regards, Sven _______________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Managed record questions

2018-03-09 Thread Sven Barth via fpc-pascal
t’s a real shame to because the time could have been spent making objects more unified with classes. Objects share roughly as much code with records as classes do as internally classes and objects share most of their code. Regards, Sven ___________ fp

Re: [fpc-pascal] Managed record questions

2018-03-09 Thread Sven Barth via fpc-pascal
Am 09.03.2018 16:41 schrieb "Ryan Joseph" : > On Mar 9, 2018, at 4:51 PM, Sven Barth via fpc-pascal < fpc-pascal@lists.freepascal.org> wrote: > > Objects share roughly as much code with records as classes do as internally classes and objects share most of their code

[fpc-pascal] Proposal for new Free Pascal logo

2018-03-29 Thread Mr Bee via fpc-pascal
e Pascal looks more modern, because it looks pretty old today. I also think the Lazarus' logo can be made better, but that's another discussion for another time. What do you think? Thank you. Regards, –Mr Bee ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Proposal for new Free Pascal logo

2018-03-31 Thread Mr Bee via fpc-pascal
2018-03-30 15:21 GMT+07:00 Michael Van Canneyt : > > I would get rid of the whiskers. > > What's wrong with the whiskers? 😄 -- Regards, –Mr Bee ___________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.or

Re: [fpc-pascal] Proposal for new Free Pascal logo

2018-03-31 Thread Mr Bee via fpc-pascal
r Delphi), they were amazed at how modern Pascal is! -- Regards, –Mr Bee _______________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Proposal for new Free Pascal logo

2018-04-01 Thread Mr Bee via fpc-pascal
ns-keep >> -falling-scientists-demand-better-protection#stream/0 >> Just my 50 cents. >> > > And as you can see, the whiskers are barely visible, and not black... > > Michael. > ___ > fpc-pascal maillist - fpc-pascal@lists.

Re: [fpc-pascal] Proposal for new Free Pascal logo

2018-04-02 Thread Mr Bee via fpc-pascal
y designing of another Pascal logo that's more abstract, simpler, friendlier, and more colorful. It's still based on cheetah's face though. I'll present it as second alternative, once I'm done with it. :) -- Regards, –Mr Bee ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Proposal for new Free Pascal logo

2018-04-02 Thread Sven Barth via fpc-pascal
cussed in the context > of Free Pascal? > Because the cheetah *is* FPC's logo. Why do you think we have that animated cheetah on the FPC parts of the site, but not the Lazarus ones? Regards, Sven > ___________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Proposal for new Free Pascal logo

2018-04-04 Thread Mr Bee via fpc-pascal
we need your opinion, also from other FPC core devs as well. We need to know what you guys want with the logo in particular and the project in general. This new logo proposal means nothing without core devs' approval. I'm just a happy user and big supporter of FPC who haven't contribute anything useful to the project. -- Regards, –Mr Bee ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Proposal for new Free Pascal logo

2018-04-05 Thread Mr Bee via fpc-pascal
rybody knows apple is a fruit, yet everybody knows a bitten Apple fruit logo represents a company that produces computers and smartphones with no apple fruits involved whatsoever. -- Regards, –Mr Bee ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Using constants instead of comments

2018-04-17 Thread Sven Barth via fpc-pascal
or if > not, is there a better way to optionally exclude diagnostic information > entirely from the compiled program? > It should be excluded. You can confirm this by checking the assembler output generated with "-al". Regards, Sven > _

Re: [fpc-pascal] Multiple active class helpers at same time

2018-04-23 Thread Sven Barth via fpc-pascal
> Yes, it is planned. Main problem currently (aside from time) is to define when a method hides the method of another helper, especially when inheritance (both for the helper and the extended type) is involved. Regards, Sven _______ fpc-pascal

Re: [fpc-pascal] Multiple active class helpers at same time

2018-04-23 Thread Sven Barth via fpc-pascal
hat I am not aware of ;-) > -Laco. > As I said the problem arises when inheritance enters the field as the rules are a bit different there. Regards, Sven > _______ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Multiple active class helpers at same time

2018-04-23 Thread Sven Barth via fpc-pascal
Ryan Joseph schrieb am Di., 24. Apr. 2018, 04:03: > > > > On Apr 24, 2018, at 12:57 AM, Sven Barth via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > > > > As I said the problem arises when inheritance enters the field as the > rules are a bit differ

Re: [fpc-pascal] Multiple active class helpers at same time

2018-04-24 Thread Sven Barth via fpc-pascal
Ryan Joseph schrieb am Di., 24. Apr. 2018, 10:44: > > > > On Apr 24, 2018, at 12:48 PM, Sven Barth via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > > > > Because that is how helper currently work. Extending it with a new > feature will not chang

Re: [fpc-pascal] Stack alias for ARC like memory management?

2018-04-24 Thread Sven Barth via fpc-pascal
h a working ARC system. Regards, Sven > _______________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Stack alias for ARC like memory management?

2018-04-25 Thread Sven Barth via fpc-pascal
easy nor a quick fix, because you're touching the fundament of the class system where both the compiler and the RTL make heavy assumptions about. The way to go is an ARC system using Maciej's default fields. Regards, Sven _______ fpc-pascal mail

[fpc-pascal] Locale question

2018-04-30 Thread Richard Kimber via fpc-pascal
and I get '£' instead of '£'. Is there a way of forcing the output to be UTF8, so that the pound character appears unchanged? I'm using fpc ver 3.0.2+dfsg-5ubuntu1 on Ubuntu 17.10, and am not an expert. -- Richard Kimber _______________

Re: [fpc-pascal] pas2js Webgl unit committed

2018-05-02 Thread Sven Barth via fpc-pascal
e classes/records, so you don't need to repeat the "const". Instead it is common to write "public const" and then write all constant members. Regards, Sven > _______ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] pas2js Webgl unit committed

2018-05-02 Thread Sven Barth via fpc-pascal
: Compilation aborted > make: *** [fpmake] Error 1 > A "make all" in the top level directory should suffice (yes, that will build all of FPC, but that is at least more or less guaranteed to work). You can then pick the pas2js binary from the utils/pas2js/bin directory. Regards,

[fpc-pascal] working with lldb

2018-05-04 Thread Mr Bee via fpc-pascal
Hi, Is there a way to make LLDB able to read and display Pascal's string correctly? At least, ansi string. I'm now using this option '-glpsw3 -godwarfcpp'. Did I miss some options or something? Thank you. Regards, –Mr Bee _______

Re: [fpc-pascal] working with lldb

2018-05-05 Thread Mr Bee via fpc-pascal
So what are you doing with them that goes wrong? /Ingemar _______ fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal _______ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] Feature announcement: default namespaces

2018-05-05 Thread Sven Barth via fpc-pascal
not available (at least as long as no change to a dependant unit would trigger a required recompilation of said unit). Regards, Sven ___________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Feature announcement: default namespaces

2018-05-05 Thread Sven Barth via fpc-pascal
Michael Van Canneyt schrieb am Sa., 5. Mai 2018, 21:24: > > > On Sat, 5 May 2018, Sven Barth via fpc-pascal wrote: > > > Hello together! > > > > I'm pleased to announce the implementation of a new feature: default > > namespaces. > > Great !! N

Re: [fpc-pascal] Feature announcement: default namespaces

2018-05-06 Thread Sven Barth via fpc-pascal
e complained about that we don't have. Also pas2js already implemented it which bothered me a bit :P Regards, Sven ___________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Feature announcement: default namespaces

2018-05-06 Thread Sven Barth via fpc-pascal
inues to compile. In FPC we currently don't use dotted unit names much, but maybe that will change in the future. Regards, Sven > ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Feature announcement: default namespaces

2018-05-06 Thread Sven Barth via fpc-pascal
Tomas Hajny schrieb am Sa., 5. Mai 2018, 19:52: > On Sat, May 5, 2018 19:23, Sven Barth via fpc-pascal wrote: > > > Hi Sven, > > . > . > > (e.g. "MyUnits" or "FCL.XML" or "FCL.Web.Base"). Like with all similar > > -F parameters -

Re: [fpc-pascal] Feature announcement: default namespaces

2018-05-06 Thread Sven Barth via fpc-pascal
Am 05.05.2018 um 19:53 schrieb Tomas Hajny: On Sat, May 5, 2018 19:23, Sven Barth via fpc-pascal wrote: Hi Sven, . . (e.g. "MyUnits" or "FCL.XML" or "FCL.Web.Base"). Like with all similar -F parameters -FN only takes a single value, but can be specified mul

Re: [fpc-pascal] Feature announcement: default namespaces

2018-05-07 Thread Sven Barth via fpc-pascal
Mattias Gaertner schrieb am Mo., 7. Mai 2018, 10:35: > On Sat, 5 May 2018 19:23:04 +0200 > Sven Barth via fpc-pascal wrote: > > >[...] > > I'm pleased to announce the implementation of a new feature: default > > namespaces. > > Nice! > Dotted unit names

Re: [fpc-pascal] Feature announcement: default namespaces

2018-05-07 Thread Sven Barth via fpc-pascal
Marco van de Voort schrieb am Mo., 7. Mai 2018, 11:51: > In our previous episode, Sven Barth via fpc-pascal said: > > > > > > I'm not sure what are 'all similar -F parameters', but many -F > parameters > > > allow multiple semicolon separated va

Re: [fpc-pascal] Feature announcement: default namespaces

2018-05-07 Thread Sven Barth via fpc-pascal
at default namespaces are defined by the fpc.cfg. Done in r38944. :) Regards, Sven _______ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] FPC on gaming consoles: XBox One, PlayStation 4, Nintendo Switch

2018-05-10 Thread Sven Barth via fpc-pascal
ng UWP there, then yes, it's "merely" a new target and we'd benefit from it aside from the Xbox 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] FPC on gaming consoles: XBox One, PlayStation 4, Nintendo Switch

2018-05-10 Thread Sven Barth via fpc-pascal
at... Regards, Sven _______ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Undocumented SetLength functionality

2018-05-15 Thread Sven Barth via fpc-pascal
at least used in one f the examples for dynamic arrays in the language guide: https://freepascal.org/docs-html/current/ref/refse14.html#QQ2-38-57 Maybe this can indeed be clarified a bit. Regards, Sven > <http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal> _______

Re: [fpc-pascal] testing if a float has a fractional part

2018-05-15 Thread Sven Barth via fpc-pascal
more portable) to use Math.SameValue(). Regards, Sven > ___________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] LongBool True = -1

2018-05-17 Thread Sven Barth via fpc-pascal
pascal code? Why don't you use the glib2 unit which declares a correct gBoolean type (using Boolean32 which had been introduced for that purpose) and accordingly defined gTRUE and gFALSE? Regards, Sven _______ fpc-pascal maillist - fpc-p

Re: [fpc-pascal] Undocumented SetLength functionality

2018-05-18 Thread Sven Barth via fpc-pascal
Michael Van Canneyt schrieb am Di., 15. Mai 2018, 14:29: > > > On Tue, 15 May 2018, Sven Barth via fpc-pascal wrote: > > > Torsten Bonde Christiansen schrieb am Di., 15. Mai > 2018, > > 12:03: > > > >> Is this a feature, bug or undocumented beh

Re: [fpc-pascal] LongBool True = -1

2018-05-19 Thread Sven Barth via fpc-pascal
glib that is not true. See my quote from their documentation. Also that library is the main reason that the Boolean32 type exists (Boolean16 and Boolean64 were logical extensions then). Regards, Sven > _______________ fpc-pascal maillist - fpc

Re: [fpc-pascal] LongBool True = -1

2018-05-20 Thread Sven Barth via fpc-pascal
ned integers "-1" is converted to "all bits 1" as well though one needs to use a typecast (see the declaration of INVALID_HANDLE_VALUE for example). Regards, Sven ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] Feature announcement: Dynamic array extensions

2018-05-20 Thread Sven Barth via fpc-pascal
contents (so the example above - when adjusted for Delphi's syntax - will not result in an exception) - Delphi does not correctly parse static array constants inside dynamic arrays; as we don't know what the syntax would be for Delphi then, this is prohibited in Delphi modes Regards,

Re: [fpc-pascal] Feature announcement: Dynamic array extensions

2018-05-20 Thread Sven Barth via fpc-pascal
For the Delphi modes I followed what Delphi does. And for some reason the Delphi devs thought it better to use a different syntax than that for static arrays. 🤷‍♀️ Regards, Sven > ___________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lis

Re: [fpc-pascal] Feature announcement: Dynamic array extensions

2018-05-20 Thread Sven Barth via fpc-pascal
t; end; > > Isn't it? > But it is consistent with static array constants and that is what counts... Regards, Sven > _______ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Feature announcement: Dynamic array extensions

2018-05-20 Thread Sven Barth via fpc-pascal
> like static array constants inside dynamic array constants... > I had not tested that one. In consequence that should indeed be disallowed as well. Though here the syntax probably wouldn't provide problems in the future. Regards, Sven >

Re: [fpc-pascal] Feature announcement: Dynamic array extensions

2018-05-20 Thread Sven Barth via fpc-pascal
Maciej Izak schrieb am So., 20. Mai 2018, 23:32: > 2018-05-20 22:50 GMT+02:00 Sven Barth via fpc-pascal < > fpc-pascal@lists.freepascal.org>: > >> I prohibited it because Delphi does not support it correctly and I don't >> know whether they'd use the usual &q

Re: [fpc-pascal] Feature announcement: Dynamic array extensions

2018-05-21 Thread Sven Barth via fpc-pascal
Am 21.05.2018 um 01:36 schrieb Maciej Izak: 2018-05-21 0:52 GMT+02:00 Sven Barth via fpc-pascal <mailto:fpc-pascal@lists.freepascal.org>>: The thing is that I can easily imagine the Delphi devs to be so stoned to use the "[...]" for static arrays inside dynamic array

Re: [fpc-pascal] Dynamic Array, operator +

2018-05-21 Thread Sven Barth via fpc-pascal
gin [snip]   //  d := [5, 6, 7]; // geht nicht end; This is currently not supposed to work either. If you want that you can file a separate feature request report though that won't have a high priority. Regards, Sven _______ fpc-pascal maillist

Re: [fpc-pascal] Feature announcement: Dynamic array extensions

2018-05-24 Thread Sven Barth via fpc-pascal
Am 24.05.2018 um 17:27 schrieb Ryan Joseph: On May 20, 2018, at 7:23 PM, Sven Barth via fpc-pascal wrote: The compiler now implements a "+" operator for arrays which is the same as if Concat() would be called on the arrays. I haven’t built it yet but I’m curious, does += n

Re: [fpc-pascal] Feature announcement: Dynamic array extensions

2018-05-24 Thread Sven Barth via fpc-pascal
Ryan Joseph schrieb am Fr., 25. Mai 2018, 04:35: > > > > On May 25, 2018, at 1:37 AM, Sven Barth via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > > > > This is currently not supported. And to avoid backwards compatibility > problems with existi

Re: [fpc-pascal] Feature announcement: Dynamic array extensions

2018-05-24 Thread Sven Barth via fpc-pascal
my remark about named types and matching types in my first reply to you. Regards, Sven > _______ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Feature announcement: Dynamic array extensions

2018-05-25 Thread Sven Barth via fpc-pascal
Michael Van Canneyt schrieb am Fr., 25. Mai 2018, 10:15: > > > On Fri, 25 May 2018, Sven Barth via fpc-pascal wrote: > > > Yes, that is what it does. Though a possible optimization would be that > the > > compiler detects "dynarr := dynarr + [elem]" and co

Re: [fpc-pascal] Feature announcement: Dynamic array extensions

2018-05-25 Thread Sven Barth via fpc-pascal
iString (or AnsiString(CP_ACP) to be precise) (this is the default for mode Delphi) - $H+ and "$modeswitch unicodestrings+": String = UnicodeString (this is the default for mode DelphiUnicode) If I had to guess you were probably doing something with the arrays they weren't design

[fpc-pascal] -gw3 produces garbages

2018-05-25 Thread Mr Bee via fpc-pascal
x27;m using fpc 3.0.2 with lldb 360.1.70 on macos 10.11.6 (el-capitan). Thank you. –Mr Bee _______ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Feature announcement: Dynamic array extensions

2018-05-25 Thread Sven Barth via fpc-pascal
Ryan Joseph schrieb am Fr., 25. Mai 2018, 12:45: > > > > On May 25, 2018, at 3:57 PM, Sven Barth via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > > > > If I had to guess you were probably doing something with the arrays they > weren't designe

Re: [fpc-pascal] Management operators question

2018-05-25 Thread Sven Barth via fpc-pascal
tion is more important than work and future of Pascal). > Would you please stop spreading such nonsense? No one - not even Michael - said anything about removing it. Regards, Sven _______ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.fre

Re: [fpc-pascal] Feature announcement: Dynamic array extensions

2018-05-25 Thread Sven Barth via fpc-pascal
Am 25.05.2018 um 08:42 schrieb Ryan Joseph: On May 25, 2018, at 1:02 PM, Sven Barth via fpc-pascal wrote: Yes, that is what it does. Though a possible optimization would be that the compiler detects "dynarr := dynarr + [elem]" and converts it to "Insert(elem, dynarr, High(

[fpc-pascal] Feature announcement: Unicode character constants outside of BMP

2018-05-27 Thread Sven Barth via fpc-pascal
  Writeln; end; var   s: UnicodeString; begin   s := #$10437;   DumpStr(s);   s := #$24b62;   DumpStr(s); end. === code end === This will result in the following output: === output begin === D801 DC37 D852 DF62 === output end === Regards, Sven __________

Re: [fpc-pascal] -gw and -O3

2018-05-28 Thread Sven Barth via fpc-pascal
de. Regards, Sven > _______ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Feature announcement: Dynamic array extensions

2018-06-02 Thread Sven Barth via fpc-pascal
for existing overloads, but Florian beat me to it and implemented it this way. Though when asked by me he did say that we'll wait and see if people complain... So *maybe* we'll change this. Regards, Sven > _______________ fpc-pascal maillist

Re: [fpc-pascal] Feature announcement: Dynamic array extensions

2018-06-02 Thread Sven Barth via fpc-pascal
t the compiler would pick the operator of the element type instead. Regards, Sven > _______________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Feature announcement: Dynamic array extensions

2018-06-02 Thread Sven Barth via fpc-pascal
lso need to be part of its operator precedence rules. Don't complicate the language for nothing! And in the end operator overloads are one of the best examples for syntactic sugar as you can easily achieve the same result with functions and methods. Regards, Sven > ________

Re: [fpc-pascal] Feature announcement: Dynamic array extensions

2018-06-03 Thread Sven Barth via fpc-pascal
functionality you want but as an aside why can’t + > overload mutate the caller (left side) and not return anything? > Because operator overloads are static methods not normal methods. Regards, Sven > ___________ fpc-pascal maillist - fpc-pascal@list

Re: [fpc-pascal] Feature announcement: Dynamic array extensions

2018-06-03 Thread Sven Barth via fpc-pascal
Bernd Oppolzer schrieb am So., 3. Juni 2018, 11:56: > > > Am 02.06.2018 um 15:14 schrieb Sven Barth via fpc-pascal: > > Mark Morgan Lloyd schrieb am Sa., 2. > Juni 2018, 10:53: > >> However as Dennis points out + is also essential for vector operations. >>

Re: [fpc-pascal] Feature announcement: Dynamic array extensions

2018-06-03 Thread Sven Barth via fpc-pascal
Ryan Joseph schrieb am So., 3. Juni 2018, 10:22: > > > > On Jun 3, 2018, at 3:15 PM, Sven Barth via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > > > > Because operator overloads are static methods not normal methods. > > I don’t understand.

Re: [fpc-pascal] Dynamic arrays using management operators

2018-06-06 Thread Sven Barth via fpc-pascal
reference. For completeness sake: for primitive types (except ShortString) and implicit pointer types (classes, interfaces, dynamic arrays, string types except ShortString) this behavior is not relevant. Regards, Sven > _______________ fpc-pascal maillist -

Re: [fpc-pascal] Dynamic arrays using management operators

2018-06-06 Thread Sven Barth via fpc-pascal
Ryan Joseph schrieb am Do., 7. Juni 2018, 03:32: > > > > On Jun 7, 2018, at 4:25 AM, Sven Barth via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > > > > However you can't do that with indexed properties (which is the feature > that Ryan mea

Re: [fpc-pascal] Feature announcement: Dynamic array extensions

2018-06-07 Thread Sven Barth via fpc-pascal
the result that > concatenating elements will introduce a substantial hit particularly if > space for a new element allocated from the heap isn't contiguous. > Of course SetLength(0) releases the memory as the value of a dynamic array with length 0 is Nil, so nothing can b

Re: [fpc-pascal] round(2.5)=2

2018-06-13 Thread Sven Barth via fpc-pascal
me calculations and restores it afterwards there should be no problem (the rounding mode can be considered as thread specific as well). Regards, Sven PS: please don't add images as inline content, the archive can't display them correctly. > <http://lists.freepascal.org/cgi-bin/mailma

Re: [fpc-pascal] Better usage of "with"

2018-06-14 Thread Sven Barth via fpc-pascal
ck is better than something like this. Please also not that there are people out there that advocate *against* the usage of "with" at all as it is likely to introduce bugs with it. Regards, Sven > _______ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Better usage of "with"

2018-06-14 Thread Sven Barth via fpc-pascal
x27;d need to add where dereferences are required especially as the "path" to the final field could be more complex (e.g. Field1^.Field3.Field1.Field5^.FinalField). For this the solution is a getter function that you can also declare as "inline". Regards, Sven > _

Re: [fpc-pascal] Better usage of "with"

2018-06-14 Thread Sven Barth via fpc-pascal
Ryan Joseph schrieb am Do., 14. Juni 2018, 14:48: > > > > On Jun 14, 2018, at 7:26 PM, Sven Barth via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > > > > Because one needs to be able to represent the properties in the RTTI. > Without pointers all t

Re: [fpc-pascal] Multiple thread heaps

2018-06-17 Thread Sven Barth via fpc-pascal
eed the memory. (Though I could be wrong here) Also, do calls to New () allocate space on the thread heap or just > allocated by the OS ? > All Pascal memory functions are handled by the heap manager. So yes, it's the thread's heap. Regards, Sven > _________

Re: [fpc-pascal] Multiple thread heaps

2018-06-17 Thread Sven Barth via fpc-pascal
Florian Klämpfl schrieb am So., 17. Juni 2018, 10:47: > Am 17.06.2018 um 09:44 schrieb Sven Barth via fpc-pascal: > > Terry Mead mailto:t...@weighbatch.com>> schrieb am > So., 17. Juni 2018, 07:45: > > > > If the default memory manager for FP creates a heap for

Re: [fpc-pascal] Lazarus and Cocoa

2018-06-17 Thread Sven Barth via fpc-pascal
d it yet in the source code. > > Any tips to get started would be great. > For starters you could ask that on the Lazarus mailing list: http://lists.lazarus-ide.org/listinfo/lazarus 😉 Regards, Sven > _______________ fpc-pascal maillist

Re: [fpc-pascal] Feature announcement: Dynamic array extensions

2018-06-18 Thread Sven Barth via fpc-pascal
er required). There won't be any voting as the "+" operator was chosen for Delphi compatibility. However I've worked out a solution using modeswitches that should probably satisfy most people, now I only need to find the time to commit it. Regards, Sven

Re: [fpc-pascal] Proper preprocessor?

2018-06-20 Thread Sven Barth via fpc-pascal
dled. AFAIK it hasn't worked for a long time... Regards, Sven > ___________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Proper preprocessor?

2018-06-20 Thread Sven Barth via fpc-pascal
lo me')} > > hello(world) becomes writeln(‘hello world’) > In Pascal you'd use inline functions for this one though of course with strong typing and not some identifier that both a human and the IDE will have to guess what it is. Regards, Sven > ____

Re: [fpc-pascal] Feature announcement: Dynamic array extensions

2018-06-20 Thread Sven Barth via fpc-pascal
} // Note the "-" === code end === Regards, Sven _______ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] math with infinity and NaN

2018-06-20 Thread Sven Barth via fpc-pascal
Am 20.06.2018 um 23:15 schrieb James Richters: Is there a way to prevent getting the runtime error? === code begin === SetExceptionMask(GetExceptionMask + [exInvalidOp]); === code end === Regards, Sven ___ fpc-pascal maillist - fpc-pascal

Re: [fpc-pascal] Proper preprocessor?

2018-06-20 Thread Sven Barth via fpc-pascal
azarus using the corresponding project and you can run it inside the IDE as well as long as you set the parameters and working dir correctly. And for outside building the binary is then located at compiler//pp. Regards, Sven > _______ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Proper preprocessor?

2018-06-21 Thread Sven Barth via fpc-pascal
pass the following: -n -Furtl/units/- -viwn - FEtestoutput ./fpctests/mytest.pp And set the current working directory to the top level directory of the checkout. testoutput and fpctests are two directories that I created in the top level directory to keep things clean. Regards, S

Re: [fpc-pascal] Feature announcement: Dynamic array extensions

2018-06-21 Thread Sven Barth via fpc-pascal
Mark Morgan Lloyd schrieb am Do., 21. Juni 2018, 09:11: > On 20/06/18 20:00, Sven Barth via fpc-pascal wrote: > > > Addendum: the support for the "+" operator is now coupled to a new > > modeswitch "ArrayOperators". > > If the modeswitch is enab

Re: [fpc-pascal] Feature announcement: Dynamic array extensions

2018-06-21 Thread Sven Barth via fpc-pascal
Mattias Gaertner schrieb am Do., 21. Juni 2018, 09:24: > On Wed, 20 Jun 2018 21:56:56 +0200 > Sven Barth via fpc-pascal wrote: > > >[...] > > The modeswitch is enabled by default in Delphi modes as this feature was > > added for Delphi compatibility. > > I

Re: [fpc-pascal] Proper preprocessor?

2018-06-21 Thread Sven Barth via fpc-pascal
unctionality. For more questions you can start a thread in fpc-devel. That's the purpose of that mailing list after all. Regards, Sven > ___________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Proper preprocessor?

2018-06-21 Thread Sven Barth via fpc-pascal
Am 21.06.2018 um 17:25 schrieb Ryan Joseph: On Jun 21, 2018, at 10:08 PM, Sven Barth via fpc-pascal wrote: For more questions you can start a thread in fpc-devel. That's the purpose of that mailing list after all. Thanks, I’ll post there tomorrow about the technical stuff. At

Re: [fpc-pascal] Proper preprocessor?

2018-06-21 Thread Sven Barth via fpc-pascal
SysUtils is included then a failed assertion results in an EAssertionError though that can be changed by setting AssertErrorProc in unit System. If unit System is not included then the line above will be printed and the program terminated. Regards, Sven _________

Re: [fpc-pascal] Proper preprocessor?

2018-06-22 Thread Sven Barth via fpc-pascal
o. > Do you have examples here? Regards, Sven > ___________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Proper preprocessor?

2018-06-22 Thread Sven Barth via fpc-pascal
in general. > > A good and just question. We most likely didn't realize the consequences. > Meanwhile we're older, more experienced and we now know what impact > seemingly > good ideas can have... > They were added for MacPascal compatibility: http://wiki.freepascal.org/Mode_MacPas Regards, Sven ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Proper preprocessor?

2018-06-22 Thread Sven Barth via fpc-pascal
Am 22.06.2018 um 10:12 schrieb Ryan Joseph: On Jun 22, 2018, at 12:24 PM, Sven Barth via fpc-pascal wrote: If $Assertions is set to Off the complete Assert() line will be absent from the compiled code. Good to know thanks. Here’s an example of something I’ve seen for debugging. I think

Re: [fpc-pascal] Default record fields

2018-06-22 Thread Sven Barth via fpc-pascal
there. Regards, Sven _______ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Default record fields

2018-06-22 Thread Sven Barth via fpc-pascal
n the other hand to know whether the fields are initialized or not you'd need to navigate to the type which means leaving your current zone of development. Regards, Sven _______________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepasca

Re: [fpc-pascal] Proper preprocessor?

2018-06-22 Thread Sven Barth via fpc-pascal
Am 22.06.2018 um 22:13 schrieb Florian Klämpfl: Am 22.06.2018 um 22:07 schrieb Sven Barth via fpc-pascal: Am 22.06.2018 um 10:12 schrieb Ryan Joseph: On Jun 22, 2018, at 12:24 PM, Sven Barth via fpc-pascal wrote: If $Assertions is set to Off the complete Assert() line will be absent from

Re: [fpc-pascal] Proper preprocessor?

2018-06-22 Thread Sven Barth via fpc-pascal
:= foo_run} {$endif} uses   foo; begin   foo.SomeFunc; end. === code end === Though more often than not such things are done by simply using a different set of units with the same names in a different unit path. Regards, Sven ___ fpc-pascal maillist

[fpc-pascal] Support for "class threadvar" sections inside class and record types

2018-06-23 Thread Sven Barth via fpc-pascal
d not 😅) Regards, Sven ___________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Support for "class threadvar" sections inside class and record types

2018-06-23 Thread Sven Barth via fpc-pascal
Ryan Joseph schrieb am Sa., 23. Juni 2018, 16:04: > > > > On Jun 23, 2018, at 8:55 PM, Sven Barth via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > > > > A threadvar section is started using "class threadvar" and the "class" >

Re: [fpc-pascal] Support for "class threadvar" sections inside class and record types

2018-06-23 Thread Sven Barth via fpc-pascal
Am 23.06.2018 um 16:51 schrieb Ryan Joseph: On Jun 23, 2018, at 9:45 PM, Sven Barth via fpc-pascal wrote: See also here: https://www.freepascal.org/docs-html/ref/refse26.html I had no idea this existed. When was it added? Probably around 2.0 when Delphi support was added... 🤷‍♀️ So quite

Re: [fpc-pascal] Compiling 3.1.1 trunk

2018-06-23 Thread Sven Barth via fpc-pascal
ng. In the trunk checkout top level directory do a "make clean all". That should do it. After that you can do an install with the INSTALL_PREFIX set to where you want the whole installation (binaries plus compiled units) to go to. Regards, Sven > _____

Re: [fpc-pascal] Support for "class threadvar" sections inside class and record types

2018-06-23 Thread Sven Barth via fpc-pascal
ss variables inside generics currently don't work as one expects (they never did) and will need quite an intensive fix. Regards, Sven ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

<    5   6   7   8   9   10   11   12   13   14   >