[fpc-pascal] mips architecture

2017-06-09 Thread Mattias Gaertner
Hi, Debian asks to build Lazarus for mips. See https://bugs.freepascal.org/view.php?id=31989 It fails with (9009) Assembling lazbuild (9022) Compiling resource ../units/mips-linux/nogui/lazbuild.or Error: Architecture mips is not available for elf format lazbuild.lpr(1871) Error: (9029) Error whi

Re: [fpc-pascal] mips architecture

2017-06-09 Thread Mattias Gaertner
On Fri, 9 Jun 2017 20:45:27 +0200 Jonas Maebe wrote: > On 09/06/17 19:28, Mattias Gaertner wrote: > > Debian asks to build Lazarus for mips. > > Seehttps://bugs.freepascal.org/view.php?id=31989 > > > > It fails with > > (9009) Assembling lazbuild > >

Re: [fpc-pascal] Implementing AggPas with PtcGraph

2017-06-15 Thread Mattias Gaertner
On Thu, 15 Jun 2017 06:37:41 -0400 "James Richters" wrote: >[...] > I see, thanks for explaining. For some reason, I was thinking it was > optional to put it in the compiler, but I could also put it in the program. > Is there no way to set a global define in each program so I could have > sev

Re: [fpc-pascal] Implementing AggPas with PtcGraph

2017-06-15 Thread Mattias Gaertner
On Thu, 15 Jun 2017 07:57:14 -0400 "James Richters" wrote: > >The idea is that you have one project per program. You can compile them > >randomly without changing anything. > > I don't understand what you mean by 'one project per program' ? Project is a Lazarus/msegui thing. > I only have p

Re: [fpc-pascal] Convert to int64 note

2017-07-14 Thread Mattias Gaertner
On Fri, 14 Jul 2017 08:04:51 -0400 wrote: > >What's the type of each variable? > > Last_GS,G_End : longint; > Max_Program_to_Display : Word; Last_GS:=G_End-(longint(Max_Program_To_Display)-1); Mattias ___ fpc-pascal maillist - fpc-pascal@lists.fr

Re: [fpc-pascal] Convert to int64 note

2017-07-14 Thread Mattias Gaertner
On Fri, 14 Jul 2017 11:19:53 -0400 wrote: >[...] > >Last_GS:=G_End-(longint(Max_Program_To_Display)-1); > This aso fixes the warning if I leave all my variables alone. If I > understand this correctly in this case longint() is a function that returns a > longint variable to be used in the ca

Re: [fpc-pascal] Class type to package name?

2017-07-21 Thread Mattias Gaertner
On Fri, 21 Jul 2017 04:54:04 -0400 Anthony Walter wrote: > When I register a component with the IDE it is installed from a package. > The package has a name. I want to know the name of the package, given a > class type of a component registered in the IDE. You have to search the packages. I adde

Re: [fpc-pascal] My bug or rtl bug with TThread and TThreadList?

2017-07-28 Thread Mattias Gaertner
On Fri, 28 Jul 2017 10:37:24 -0400 Anthony Walter wrote: > Could someone please look at this small bit of code and tell me I have a > bug or if there is something wrong with the RTL? > > https://gist.github.com/sysrpl/40505d25fbd38c4404f95225f21fe0a6 Strange code. PostMessage is already threads

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

2017-08-07 Thread Mattias Gaertner
On Tue, 18 Jul 2017 10:44:55 +0200 (CEST) mar...@stack.nl (Marco van de Voort) wrote: >[...] > ftp://freepascal.stack.nl/pub/mirrors/fpc/beta/3.0.4-rc1/ The fpc-3.0.4-0.rc1.x86_64.rpm does not work on Fedora 21 x86_64: Free Pascal Compiler version 3.0.4rc1 [2017/07/02] for x86_64 Copyright (c) 1

Re: [fpc-pascal] inline callback functions?

2017-08-07 Thread Mattias Gaertner
On Mon, 7 Aug 2017 10:52:35 -0600 Ryan Joseph wrote: >[...] Note that "inline" functions in FPC have a different meaning: https://www.freepascal.org/docs-html/prog/progsu36.html What you mean are "anonymous functions" or "closures". State in FPC: http://lists.freepascal.org/pipermail/fpc-devel

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

2017-08-08 Thread Mattias Gaertner
On Tue, 18 Jul 2017 10:44:55 +0200 (CEST) mar...@stack.nl (Marco van de Voort) wrote: >[...] > Downloads are available at the main FTP server and > > ftp://freepascal.stack.nl/pub/mirrors/fpc/beta/3.0.4-rc1/ Where is the Mac OS X version? Mattias ___

[fpc-pascal] TMemDataSet

2017-08-15 Thread Mattias Gaertner
Hi, Does TMemDataSet support loading/saving blobs? Mattias ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Booleans vs sets

2017-09-21 Thread Mattias Gaertner
On Thu, 21 Sep 2017 15:16:21 +0700 Ryan Joseph wrote: > I have a class that is filling up with booleans. Would it be more efficient > to store these as a “set of”? I have 10 bools which is getting up there. Sets need less memory as they are stored as bits. Speed depends on the operations and am

Re: [fpc-pascal] Yet another thread on Unicode Strings

2017-10-04 Thread Mattias Gaertner
On Wed, 4 Oct 2017 13:10:02 +0100 Tony Whyman wrote: > Unicode Character String handling is a question that keeps coming up on > the Free Pascal Mailing lists and, empirically, it is hard to avoid the > conclusion that there is something wrong with the way these character > string types are ha

Re: [fpc-pascal] For ..in GetEnumerator Allocation

2017-10-04 Thread Mattias Gaertner
On Wed, 4 Oct 2017 15:41:27 +0700 Ryan Joseph wrote: > As I understand the for..in loop GetEnumerator method is expected to create a > new object each time it’s called and FPC destroys it later when the loos is > finished. Can I retain the enumerator and just reset it in-between calls? I’d > l

Re: [fpc-pascal] {$DEFINE DEVEL}

2017-10-11 Thread Mattias Gaertner
On Wed, 11 Oct 2017 10:00:15 +0100 pasc...@piments.com wrote: > Hi , First of all: Please do not "reply" when starting a new thread. > I had a little trick that I used on BP and Delphi code that does not > work on Lazarus. The compiler is FPC. > I define compiler variable which I could to

Re: [fpc-pascal] {$DEFINE DEVEL}

2017-10-11 Thread Mattias Gaertner
On Wed, 11 Oct 2017 11:45:33 +0100 pasc...@piments.com wrote: >[...] > It wasn't a reply because they was no Re and it had a new title. > > I should have deleted the [fpc-pascal] as well . Sorry. A reply is not defined by the title. It is marked by the hidden References aka In-Reply-To fields,

Re: [fpc-pascal] Callbacks as nested functions

2017-10-23 Thread Mattias Gaertner
On Mon, 23 Oct 2017 20:04:36 +0700 Ryan Joseph wrote: > > On Oct 23, 2017, at 4:56 PM, Sven Barth via fpc-pascal > > wrote: > > > > What exactly are you trying? If the nested function accesses its outer > > scope then it definitely won't work. For that you'd need to wait for > > anonymous fu

Re: [fpc-pascal] installing cross fpc in parallel to systems fpc

2017-11-10 Thread Mattias Gaertner
On Fri, 10 Nov 2017 17:47:11 +0100 Marc Santhoff wrote: > Hi again, > > (too many sub threads, answering here - thanks to all helpers!) > > OK, "$FPC -va | grep CPU" does the trick. If using the ppcrossarm: > > marc@puma:/home/marc/program/fpc-cross/src/fpc/compiler > ./ppcrossarm > -va|grep

Re: [fpc-pascal] installing cross fpc in parallel to systems fpc

2017-11-10 Thread Mattias Gaertner
On Fri, 10 Nov 2017 18:57:19 +0100 Marc Santhoff wrote: >[...] > > You can either use fpc and switch the target OS and /or processor. > > That solution isnt't doable, that would require a compiler for X86_64 > and ARM. fpc -Parm calls ppcarm, fpc -Px86_64 calls ppcx64. Mattias __

[fpc-pascal] fpc procedure modifier []

2017-11-16 Thread Mattias Gaertner
Hi, Where can I find some information about the [] procedure modifier of FPC? For example: procedure fpc_check_object(_vmt : pointer); [public,alias:'FPC_CHECK_OBJECT']; compilerproc; What $modes support this? The reason I ask is I'm trying to distinguish them from Delphi Attributes in pparser.

Re: [fpc-pascal] fpc procedure modifier []

2017-11-16 Thread Mattias Gaertner
On Thu, 16 Nov 2017 11:49:59 +0100 Maciej Izak wrote: > 2017-11-16 11:39 GMT+01:00 Mattias Gaertner : > > > What $modes support this? > > The reason I ask is I'm trying to distinguish them from Delphi > > Attributes in pparser. > > > > for Delphi lik

Re: [fpc-pascal] fpc procedure modifier []

2017-11-16 Thread Mattias Gaertner
On Thu, 16 Nov 2017 14:12:18 +0100 Sven Barth via fpc-pascal wrote: >[...] > So, how will FPC distinguish the two []? > > > The only idea I have is to check whether the first identifier is a > attribute and if not handle it as a modifier (or if a comma is following > the first identifier). ppa

Re: [fpc-pascal] fpc procedure modifier []

2017-11-16 Thread Mattias Gaertner
On Thu, 16 Nov 2017 15:25:55 +0100 Maciej Izak wrote: > 2017-11-16 15:21 GMT+01:00 Michael Van Canneyt : > > > I think that prefixedattributes should simply disable the use of proc > > modifier []. The probability of having code that needs both is almost zero, > > the [] syntax is very old and a

Re: [fpc-pascal] FPC attributes / annotations support

2017-11-28 Thread Mattias Gaertner
On Wed, 11 Oct 2017 17:13:31 +0200 Sven Barth via fpc-pascal wrote: > Am 11.10.2017 14:45 schrieb "Graeme Geldenhuys" < > mailingli...@geldenhuys.co.uk>: > > > > Bringing a discussion from the Lazarus mailing list to here. > > > > > > On 2017-09-24 09:13, Michael Van Canneyt via Lazarus wrote:

Re: [fpc-pascal] FPC attributes / annotations support

2017-11-29 Thread Mattias Gaertner
On Wed, 29 Nov 2017 09:07:31 -0200 "Marcos Douglas B. Santos" wrote: > On Wed, Nov 29, 2017 at 4:50 AM, Graeme Geldenhuys > wrote: > > > > [dreaming] > > Now only if Lazarus could support the Delphi dcc32 compiler. ;-) Boy oh > > boy... I've been using Delphi XE3 for a month now (new job) - it i

Re: [fpc-pascal] FPC 3.0.4 released!

2017-11-30 Thread Mattias Gaertner
On Thu, 30 Nov 2017 11:04:31 +0100 (CET) mar...@stack.nl (Marco van de Voort) wrote: > Hello, > > Finally, the Free Pascal 3.0.4 release is available from our FTP servers. > > Changes that may break backwards compatibility will be documented at: > http://wiki.freepascal.org/User_Changes_3_0_4 >

Re: [fpc-pascal] FPC 3.0.4 released!

2017-11-30 Thread Mattias Gaertner
On Thu, 30 Nov 2017 11:04:31 +0100 (CET) mar...@stack.nl (Marco van de Voort) wrote: > Hello, > > Finally, the Free Pascal 3.0.4 release is available from our FTP servers. > > Changes that may break backwards compatibility will be documented at: > http://wiki.freepascal.org/User_Changes_3_0_4 T

Re: [fpc-pascal] FPC 3.0.4 released!

2017-11-30 Thread Mattias Gaertner
On Thu, 30 Nov 2017 11:04:31 +0100 (CET) mar...@stack.nl (Marco van de Voort) wrote: >[...] > and sourceforge > > https://sourceforge.net/projects/freepascal/files/ This https://sourceforge.net/projects/freepascal/files/Mac%20OS%20X/3.0.4/ contains a fpc 3.0.5 as well. Is this on purpose? Mat

Re: [fpc-pascal] FPC 3.0.4 released!

2017-12-02 Thread Mattias Gaertner
Hi, The doc-chm.zip has only 7.6mb, while the doc-html.zip has 17.9mb. Reason is that many html files are empty. For example: rtl.chm classes/tthread.html Should I report a bug? Mattias ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http:

Re: [fpc-pascal] FPC 3.0.4 released!

2017-12-02 Thread Mattias Gaertner
On Sat, 2 Dec 2017 21:20:17 +0100 (CET) mar...@stack.nl (Marco van de Voort) wrote: > In our previous episode, Mattias Gaertner said: > > The doc-chm.zip has only 7.6mb, while the doc-html.zip has 17.9mb. > > > > Reason is that many html files are empty. For example

Re: [fpc-pascal] Using Pascal N-IDE (Android)

2017-12-05 Thread Mattias Gaertner
On Tue, 5 Dec 2017 10:48:01 -0500 Paul Breneman wrote: > On 12/05/2017 10:12 AM, Paul Breneman wrote: > > On 12/05/2017 09:52 AM, Paul Breneman wrote: > >> On 12/05/2017 09:30 AM, Paul Breneman wrote: It seems you are talking to yourself. Mattias

Re: [fpc-pascal] fpc2js

2017-12-06 Thread Mattias Gaertner
> Victor Campillo hat am 6. Dezember 2017 um 12:48 > geschrieben: >[...] > o It does not include the command to call pas2js compiler. Correct. pas2js does not support ppu files (yet), so it compiles all units everytime. For the same reason the package is set to build manually. > o Adding t

[fpc-pascal] Lazarus Release 1.8

2017-12-07 Thread Mattias Gaertner
The Lazarus team is glad to announce the release of Lazarus 1.8.The release was built with FPC 3.0.4.The previous release Lazarus 1.6.4 was built with FPC 3.0.2. Here is the list of changes for Lazarus and Free Pascal:http://wiki.lazarus.freepascal.org/Lazarus_1.8.0_release_noteshttp://wiki.lazaru

[fpc-pascal] linker failed with fpc rpm on CentOS 7

2017-12-12 Thread Mattias Gaertner
Hi, I installed fpc-3.0.4-1.x86_64.rpm from sourceforge on CentOS 7 and compiling even the simplest of programs gives: /bin/ld: /usr/lib64/fpc/3.0.4/units/x86_64-linux/rtl/cprt0.o: unrecognized relocation (0x2a) in section `.text' /bin/ld: final link failed: Bad value Is this known? Mattias ___

Re: [fpc-pascal] linker failed with fpc rpm on CentOS 7

2017-12-12 Thread Mattias Gaertner
On Tue, 12 Dec 2017 23:16:03 +0100 Pierre Muller wrote: >[...] > Normally the .tar file should have been generated on a system that uses > an earlier GNU binutils version, avoiding the problem if > a Free Pascal program is linked using a less recent GNU linker version. > > Apparently, we did

Re: [fpc-pascal] linker failed with fpc rpm on CentOS 7

2017-12-13 Thread Mattias Gaertner
On Wed, 13 Dec 2017 14:05:34 +0100 Pierre Muller wrote: >[...] > On the failing RPM install, > could you test this file: > ftp://ftp.freepascal.org/pub/fpc/dist/3.0.4/x86_64-linux/x86_64-linux-prt0-pre2.26-binutils.tar.gz > > Simply extract it at the base 3.0.4 installation directory, > it co

Re: [fpc-pascal] First pas2js public release

2017-12-20 Thread Mattias Gaertner
p://wiki.freepascal.org/pas2js > > > > * Sources ? > > > > The pas2js compiler sources and RTL sources have been checked in in FPC's > > subversion repository. The page describes where to find it in SVN. > > > > * Binaries ? > > > > A snaps

Re: [fpc-pascal] Modern Compiler Construction using Pascal

2018-01-02 Thread Mattias Gaertner
On Mon, 1 Jan 2018 13:17:47 -0500 Yves Cloutier wrote: > Hi there, > > I'd be interested to know if any modern compilers have been written in > Pascal (other than the Pascal Compiler). pas2js is written in FPC. Mattias ___ fpc-pascal maillist - fpc

Re: [fpc-pascal] Generics vs templates

2018-01-08 Thread Mattias Gaertner
On Mon, 8 Jan 2018 14:19:42 +0700 Ryan Joseph wrote: > I was talking with a c++ developer who explained how templates are > implemented in c++ and how use some recursive method which causes them to > totally murder compile times. > Having just started to use generics in FPC myself I was curious

Re: [fpc-pascal] Comp type

2018-01-09 Thread Mattias Gaertner
On Tue, 09 Jan 2018 22:58:01 +0100 Darius Blaszyk wrote: > By accident I noticed the comp type for the first time. It's an Int64 > but is considered to be a real type. Just out of curiosity, what is the > use case of such a type, or is this just implemented for compatibility > reasons? Comp is I

Re: [fpc-pascal] Comp type

2018-01-10 Thread Mattias Gaertner
On Wed, 10 Jan 2018 09:04:12 +0100 Jonas Maebe wrote: > Mattias Gaertner wrote: > > Comp is Int64 div 1. > > No, that is currency. Comp is a plain 64 bit integer. It originally > comes from Turbo Pascal, which did not have a regular 64 bit integer > type. The x

Re: [fpc-pascal] PAS2JS: operations with array of record

2018-01-11 Thread Mattias Gaertner
On Thu, 11 Jan 2018 11:44:30 +0100 Sven Barth via fpc-pascal wrote: > Am 11.01.2018 08:16 schrieb "warleyalex via fpc-pascal" < > fpc-pascal@lists.freepascal.org>: > > Anyway, what I couldn't find is the built-in kind of *pseudo-methods for > the record data type*, set of operations, for inserti

Re: [fpc-pascal] PAS2JS: operations with array of record

2018-01-11 Thread Mattias Gaertner
On Wed, 10 Jan 2018 11:40:48 -0700 (MST) warleyalex via fpc-pascal wrote: > Since it's missing the Pas2JS specific forum, I don't know if here is correct > place to post things about "Pas2JS".  Hopefully there will be one soon. > I'm using it a lot and it's very promising. I came across with

Re: [fpc-pascal] PAS2JS: operations with array of record

2018-01-11 Thread Mattias Gaertner
On Wed, 10 Jan 2018 11:40:48 -0700 (MST) warleyalex via fpc-pascal wrote: >[...] > · Add(item [,...]) / Push(item [,...]) : increases Length by one and adds one > or more item at the end of the array, can also add arrays (concatenation). > > · Clear() : empties the array (equivalent to SetLen

Re: [fpc-pascal] can inherited simply replace inherited method(param1, param2, param3)?

2018-01-11 Thread Mattias Gaertner
On Fri, 12 Jan 2018 00:35:30 +0800 Dennis wrote: > are the 2 below equivalent? > > procedure Method(param1, param2 : integer); > begin >inherited; > end; > > > > procedure Method(param1, param2 : integer); > begin >inherited Method(param1, param2); > end; Yes. Mattias

[fpc-pascal] pas2js mailing list

2018-01-15 Thread Mattias Gaertner
Hi, There is now a public mailing list for pas2js. You can subscribe here: http://lists.freepascal.org/mailman/listinfo/pas2js/ Mattias ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fp

Re: [fpc-pascal] Strange issue with TXMLConfig

2018-01-18 Thread Mattias Gaertner
On Thu, 18 Jan 2018 20:31:20 +0100 Darius Blaszyk wrote: > > Hi, I can only say that TDOMNode from Laz2_DOM in trunk has function > > CompareName. > > I'm using FPC 3.0.4 indeed. No dependency to the LCL. Laz2_DOM is in LazUtils, not in the LCL. Mattias _

[fpc-pascal] directive for -CR

2018-01-18 Thread Mattias Gaertner
Hi, Is there a compiler directive to enable/disable method call and typecast checks (option -CR). Similar to $R+- for range checks? Mattias ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/

Re: [fpc-pascal] Scoped enums and inferred types

2018-02-21 Thread Mattias Gaertner
On Wed, 21 Feb 2018 09:38:17 +0700 Ryan Joseph wrote: >[...]Doesn’t the compiler know the type and can infer “A” is relative to the >scoped enum? I understand there’s a possibility for name conflicts but you >could just use the full name in that case. I think this would be confusing: {$scoped

Re: [fpc-pascal] Scoped enums and inferred types

2018-02-21 Thread Mattias Gaertner
On Wed, 21 Feb 2018 15:58:12 +0700 Ryan Joseph wrote: >[...] > type > TTileSortingFlag = (kTileSortingStatic, > kTileSortingRamp, > kTileSortingIgnore, > kTileSortingParticle, >

Re: [fpc-pascal] Scoped enums and inferred types

2018-02-21 Thread Mattias Gaertner
On Wed, 21 Feb 2018 16:14:13 +0700 Ryan Joseph wrote: >[...] > {$scopedenums on} > type > TTileSortingFlag = (Static, > Ramp, > Ignore, > Particle, > Floor, >

Re: [fpc-pascal] fpreport rangeerrors with TFPReportColor

2018-02-21 Thread Mattias Gaertner
On Wed, 21 Feb 2018 19:54:55 + Graeme Geldenhuys wrote: >[...] > > Because UInt32 is not a JSON dataformat. > > Well, then I'll say that FPC's JSON needs to be extended to support > UInt32, as it is a perfectly valid Object Pascal data type. How should FPC's JSON support something, that

[fpc-pascal] uses in 'filename'

2018-02-22 Thread Mattias Gaertner
Hi, FPC allows to use two different units with the same name: uses foo in 'unit1.pas', bar in 'sub/unit1.pas'; Which might fail with linking errors. Is this a feature or a bug? Mattias ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http:

Re: [fpc-pascal] uses in 'filename'

2018-02-22 Thread Mattias Gaertner
On Thu, 22 Feb 2018 12:48:21 +0100 (CET) Michael Van Canneyt wrote: >[...] > First of all, normally it won't work either way, because you must use "unit > foo;" and "unit bar;" in the files. No, I can use normal units. This works here: ---test1.pas--- uses foo in 'unit1.pas', unit1, bar in 's

Re: [fpc-pascal] uses in 'filename'

2018-02-22 Thread Mattias Gaertner
On Thu, 22 Feb 2018 10:41:29 -0500 wkitt...@windstream.net wrote: > On 02/22/2018 09:49 AM, Michael Van Canneyt wrote: > > On Thu, 22 Feb 2018, Mattias Gaertner wrote: > >> On Thu, 22 Feb 2018 12:48:21 +0100 (CET) > >> Michael Van Canneyt wrote: > >>&g

Re: [fpc-pascal] uses in 'filename'

2018-02-22 Thread Mattias Gaertner
On Thu, 22 Feb 2018 17:04:25 +0100 Mattias Gaertner wrote: > On Thu, 22 Feb 2018 10:41:29 -0500 > wkitt...@windstream.net wrote: > > > On 02/22/2018 09:49 AM, Michael Van Canneyt wrote: > > > On Thu, 22 Feb 2018, Mattias Gaertner wrote: > > >> On

Re: [fpc-pascal] uses in 'filename'

2018-02-22 Thread Mattias Gaertner
On Thu, 22 Feb 2018 12:48:21 +0100 (CET) Michael Van Canneyt wrote: >[...] > home:~/source/testsub> fpc a.pp > unit1.pas(1,9) Error: Illegal unit name: foo (expecting FOO) > unit1.pas(7,1) Fatal: There were 1 errors compiling module, stopping > Fatal: Compilation aborted > > Where > > a.pp: >

[fpc-pascal] Lazarus Release 1.8.2

2018-03-02 Thread Mattias Gaertner
The Lazarus team is glad to announce the release of Lazarus 1.8.2. This is a bugfix release. The release was built with FPC 3.0.4. Here is the list of changes for Lazarus and Free Pascal: http://wiki.lazarus.freepascal.org/Lazarus_1.8.0_release_notes http://wiki.lazarus.freepascal.org/User_Change

Re: [fpc-pascal] Inline scoped enums

2018-04-06 Thread Mattias Gaertner
On Fri, 6 Apr 2018 21:38:59 +0300 Роман via fpc-pascal wrote: > How can this code > {$scopedenums on} > type > Bar = set of (A, B, C); > refer to A, B, C? Bar.A Mattias ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.fre

Re: [fpc-pascal] Inline scoped enums

2018-04-08 Thread Mattias Gaertner
On Sat, 7 Apr 2018 08:52:43 +0200 Mattias Gaertner wrote: > On Fri, 6 Apr 2018 21:38:59 +0300 > Роман via fpc-pascal wrote: > > > How can this code > > {$scopedenums on} > > type > > Bar = set of (A, B, C); > > refer to A, B, C? > > Bar.A

Re: [fpc-pascal] Inline scoped enums

2018-04-08 Thread Mattias Gaertner
On Sun, 8 Apr 2018 09:22:51 +0200 Mattias Gaertner wrote: > On Sat, 7 Apr 2018 08:52:43 +0200 > Mattias Gaertner wrote: > > > On Fri, 6 Apr 2018 21:38:59 +0300 > > Роман via fpc-pascal wrote: > > > > > How can this code > > > {$scopedenums

[fpc-pascal] pointerful

2018-04-22 Thread Mattias Gaertner
Hi, Is this a bug or a feature: type Pint = ^int; int = PInt; ? Mattias ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] pointerful

2018-04-22 Thread Mattias Gaertner
On Sun, 22 Apr 2018 17:00:35 +0200 Mattias Gaertner wrote: > Hi, > > Is this a bug or a feature: > > type > Pint = ^int; > int = PInt; > > ? Note that Delphi gives error "Type 'PInt' is not yet completely defined". Mattias ___

Re: [fpc-pascal] Read comments via fcl-passrc

2018-04-23 Thread Mattias Gaertner
On Mon, 23 Apr 2018 12:24:26 +0200 Michael Fuchs wrote: > Hi, > > while working with fcl-passrc I search for a possibility to get the > comments of a source file in the parsed tree. > > I found TPasTreeContainer.NeedComments but it does nothing. Set that to true. Then create the parser. Read P

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

2018-04-23 Thread Mattias Gaertner
On Mon, 23 Apr 2018 12:13:01 + Sven Barth via fpc-pascal wrote: > LacaK schrieb am Mo., 23. Apr. 2018, 13:34: > > > Hi , > > > > I am sure that this was already discussed, but I can not find any > > conclusion. > > > > Is planned support for multiple class(objet, record) helpers in a way, >

Re: [fpc-pascal] Next language feature for pas2js...

2018-04-26 Thread Mattias Gaertner
On Thu, 26 Apr 2018 13:13:25 +0200 (CEST) Michael Van Canneyt wrote: > On Thu, 26 Apr 2018, Benito van der Zander wrote: > > > > > Hi, > > > > I would like to vote for pointer support... > > "Pointers to records" are supported. Basically pointers are implemented as JS references. For example

Re: [fpc-pascal] Next language feature for pas2js...

2018-05-01 Thread Mattias Gaertner
On Tue, 1 May 2018 12:11:37 +0700 Ryan Joseph wrote: >[...] > const > GLfloat = MAP_TO_SOMETHING; // do we have external consts? GLFloat is a type, not a const. type GLFloat = double; Mattias ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.

Re: [fpc-pascal] Next language feature for pas2js...

2018-05-01 Thread Mattias Gaertner
On Tue, 1 May 2018 15:03:30 +0700 Ryan Joseph wrote: > > On May 1, 2018, at 2:55 PM, Mattias Gaertner > > wrote: > > > > GLFloat is a type, not a const. > > > > type GLFloat = double; > > Yeah I mistyped. We shouldn’t be redefining GLfloat th

Re: [fpc-pascal] Next language feature for pas2js...

2018-05-01 Thread Mattias Gaertner
On Tue, 1 May 2018 14:20:12 +0700 Ryan Joseph wrote: > > On May 1, 2018, at 2:03 PM, Michael Van Canneyt > > wrote: > > > > Of sorts. > > MyClass = Class external name 'my' > > const > >MyConst : integer > > end; > > > > Will emit MyClass.MyConst. The compiler needs to know the type.

Re: [fpc-pascal] Next language feature for pas2js...

2018-05-01 Thread Mattias Gaertner
On Tue, 1 May 2018 15:36:59 +0700 Ryan Joseph wrote: >[...] > > Constants without expression can only exist in an external class. > > Just curious but why can’t you declare a const anywhere for any reasons? You can. > >> Also I mistyped, GLfloat is a type so how do this map to JS, or do I e

Re: [fpc-pascal] Next language feature for pas2js...

2018-05-01 Thread Mattias Gaertner
On Tue, 1 May 2018 15:23:25 +0700 Ryan Joseph wrote: >[...] > what do we do for records then? We often need to pass arrays of specific > types for functions such as glBufferData. > > type > TVec2f = record > x, y: GLfloat; > end; > > type > TVec2b = record > x, y: GLubyte; > en

Re: [fpc-pascal] Next language feature for pas2js...

2018-05-01 Thread Mattias Gaertner
On Tue, 1 May 2018 10:52:32 +0200 (CEST) Michael Van Canneyt wrote: >[...] > > Note that the 'var' is a workaround till eventually pas2js supports > > external 'const' without expression. > > Well, I specially did not mention this, because I consider it a dirty hack. > a var doesn't protect yo

Re: [fpc-pascal] pas2js Webgl unit committed

2018-05-01 Thread Mattias Gaertner
On Tue, 1 May 2018 15:28:45 +0200 (CEST) Michael Van Canneyt wrote: >[...] > The "new web project" wizard will make the HTML file for you, if you > installed the pas2js_dsgn.lpk package in Lazarus. I think it is available > with the distributed latest lazarus, No. It was added in 1.9. Mattias _

Re: [fpc-pascal] pas2js Webgl unit committed

2018-05-02 Thread Mattias Gaertner
On Wed, 2 May 2018 16:28:10 +0700 Ryan Joseph wrote: > > On May 2, 2018, at 2:08 PM, Michael Van Canneyt > > wrote: > > > > Yes. the fpmkunit needs to be the latest version, for the AddLibrary call. > > I will see if I can work around it. > > So I need to build the entire compiler and I ge

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

2018-05-05 Thread Mattias Gaertner
On Sun, 6 May 2018 09:11:23 +0700 Ryan Joseph wrote: > > On May 6, 2018, at 12:23 AM, Sven Barth via fpc-pascal > > wrote: > > > > For some users it might be cumbersome however to write the complete names > > (even though their IDE of choice might support them here) or maybe they > > have di

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

2018-05-07 Thread Mattias Gaertner
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 without that felt so stupid. >[...] Nevertheless the prefix of such a unit (in my example "MyUnits") is >cal

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

2018-05-07 Thread Mattias Gaertner
On Mon, 7 May 2018 21:49:26 +0200 Sven Barth via fpc-pascal wrote: > Am 07.05.2018 um 10:35 schrieb Mattias Gaertner: > >> [...] > >> The compiler is told about a default namespace using the new -FN > >> parameter, > > Lazarus now checks for the -FN

Re: [fpc-pascal] pas2js Webgl unit committed

2018-05-08 Thread Mattias Gaertner
On Wed, 9 May 2018 09:03:29 +0700 Ryan Joseph wrote: > > On May 9, 2018, at 8:41 AM, Ryan Joseph wrote: > > > > Ok it finally worked. > > Making progress but the wiki is incomplete I think. I figured out how to add > the rtl with -Fu but I’m getting an error. What’s wrong with that name? Ca

Re: [fpc-pascal] pas2js Webgl unit committed

2018-05-09 Thread Mattias Gaertner
On Wed, 9 May 2018 15:42:41 +0700 Ryan Joseph wrote: >[...] > On May 9, 2018, at 1:46 PM, Ryan Joseph >wrote: > > > > Ok got it working now finally. Now I need to learn how to do anything at > > all besides writeln. :) > > Finally got a context open and working. Next things: These questio

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

2018-05-20 Thread Mattias Gaertner
On Sun, 20 May 2018 14:23:25 +0200 Sven Barth via fpc-pascal wrote: > Hello together! > > I'm pleased to announce that after nearly a year various extensions for > dynamic arrays have been finished. This includes the following features: > > - support for array constructors using "[...]" syntax

[fpc-pascal] Lazarus Release 1.8.4

2018-05-22 Thread Mattias Gaertner
The Lazarus team is glad to announce the release of Lazarus 1.8.4. This is a bugfix release. The release was built with FPC 3.0.4. Here is the list of changes for Lazarus and Free Pascal: http://wiki.lazarus.freepascal.org/Lazarus_1.8.0_release_notes http://wiki.lazarus.freepascal.org/User_Change

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

2018-06-02 Thread Mattias Gaertner
> Sven Barth via fpc-pascal hat am 2. Juni > 2018 um 09:42 geschrieben: > > denisgolovan < denisgolo...@yandex.ru> schrieb am Sa., 2. Juni 2018, 09:18: > > @Sven > > Please reconsider "+" operator for arrays if your changes really forbid to > > overload operators for arrays now. > >   > I

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

2018-06-03 Thread Mattias Gaertner
On Sun, 3 Jun 2018 11:34:33 + Mark Morgan Lloyd wrote: > On 02/06/18 13:00, Mattias Gaertner wrote: > >> Sven Barth via fpc-pascal hat am 2. Juni > >> 2018 um 09:42 geschrieben: > > denisgolovan < denisgolo...@yandex.ru> > >> schrieb am Sa.,

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

2018-06-03 Thread Mattias Gaertner
On Sun, 3 Jun 2018 14:59:46 +0200 Florian Klämpfl wrote: >[...] > > Yes, that's one of the reasons I vote for keeping the new feature > > and allow to overload the operator. > > There is still concat which provides exactly the same functionality. True. Same as in Delphi. Is there a problem h

Re: [fpc-pascal] Anchors on a child form

2018-06-04 Thread Mattias Gaertner
On Sun, 3 Jun 2018 13:06:59 +0100 Martin Wynne wrote: > If I create a child form by setting Parent:=other_form; in FormCreate, > it cannot be dragged to a new position by the user. Correct. Setting aForm.Parent makes the form a "normal" control like a frame or panel. If you want dragging, you n

Re: [fpc-pascal] Migrate Delphi XE5 to FPC/Lazarus, any advice?

2018-06-08 Thread Mattias Gaertner
On Fri, 08 Jun 2018 09:04:57 +0200 Bo Berglund wrote: > On Fri, 08 Jun 2018 07:25:21 +0200, Bo Berglund > wrote: > > >I think I will change foot here and look at the 1D first since this is > >a pure Delphi native application. Uses Delphi's own graphics. > > Forgot to ask if Lazarus is able t

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

2018-06-12 Thread Mattias Gaertner
On Mon, 11 Jun 2018 10:01:13 +0200 Michael Schnell wrote: > There has been a long winding discussion on the German Forum. > > IMHO this is not really relevant, as relying on the exact value of a > real number is erroneous, anyway. So a real number never can be > considered to *exactly* *be* 1.

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

2018-06-14 Thread Mattias Gaertner
On Thu, 14 Jun 2018 16:44:40 +0700 Ryan Joseph wrote: >[...] > The idea of “with” inside records is so interesting because it basically > mimics inheritance without going full class. If you only want that, why not use objects? Mattias ___ fpc-pascal

Re: [fpc-pascal] Proper preprocessor?

2018-06-20 Thread Mattias Gaertner
On Wed, 20 Jun 2018 16:25:39 +0700 Ryan Joseph wrote: > > On Jun 20, 2018, at 3:50 PM, Michael Van Canneyt > > wrote: > > > > Because it is simply a bad idea ? > > Yeah that’s what the programming gurus in ivory towers and professors keep > saying but what about the person actually trying

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

2018-06-21 Thread Mattias Gaertner
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 would like to use that for objfpc. Is there a command line flag to enable a modeswitch? Mattias

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

2018-06-21 Thread Mattias Gaertner
On Thu, 21 Jun 2018 15:17:39 +0700 Ryan Joseph wrote: >[...] > Finally got to try this. It’s really satisfying being able to do: >[...] > for i in arr do Note: This was supported for a long time. Mattias ___ fpc-pascal maillist - fpc-pascal@

[fpc-pascal] how to get rid of hints

2018-06-25 Thread Mattias Gaertner
Hi, How to get rid of hint 6068? With fpc 3.1.1 using some units like fgl the compiler emits: .../fpc/rtl/objpas/fgl.pp(899,1) Hint: "inherited" not yet supported inside inline procedure/function .../fpc/rtl/objpas/fgl.pp(899,1) Hint: Inlining disabled There is no clue, what of my code triggers

[fpc-pascal] macos make 3.1.1 fails

2018-06-25 Thread Mattias Gaertner
Hi, Trying to compile fpc 3.1.1 i386 on Mac High Sierra 10.13.5: make CPU_TARGET=i386 PP=/usr/local/lib/fpc/3.0.4/ppc386 all The CPU_TARGET seems to be ignored: /Applications/Xcode.app/Contents/Developer/usr/bin/make compiler_cycle RELEASE=1 /Applications/Xcode.app/Contents/Developer/usr/bin/ma

Re: [fpc-pascal] macos make 3.1.1 fails

2018-06-26 Thread Mattias Gaertner
On Tue, 26 Jun 2018 09:07:00 +0100 C Western wrote: >[...] > Carbon is i386 only, so i386 is still needed. I haven't figured out all > the options, but the command line that works for me is: > > FPC=/usr/local/lib/fpc/3.0.4/ppc386 make distclean install PREFIX=~/usr > CPU_SOURCE=i386 > > (All

Re: [fpc-pascal] List of chars for case

2018-07-02 Thread Mattias Gaertner
On Sun, 1 Jul 2018 16:51:08 -0600 Ryan Joseph wrote: > Is there a way to make a constant for a list of chars which I can use in a > case statement? I’ve got a bunch of code duplication happening I’d like to > clean up. > > const > TChars = ('[', ']', '(', ')', '{', '}', '=', ‘:’); > > > ca

Re: [fpc-pascal] FPC_PCHAR_LENGTH dog slow

2018-07-03 Thread Mattias Gaertner
On Tue, 3 Jul 2018 09:15:16 -0600 Ryan Joseph wrote: > I was just parsing something and found that a call to length on a pchar was > taking 90+% of the time in FPC_PCHAR_LENGTH. > > Why is that so crazy slow? Does it need to iterate the entire length of the > string to know it’s length? Yes.

Re: [fpc-pascal] access violation?

2018-07-27 Thread Mattias Gaertner
On Fri, 27 Jul 2018 11:06:11 -0600 Ryan Joseph wrote: >[...] > I’m totally confused now. Since when was it ok to call methods on nil > objects? You can't if you compile with -CR. The RTL is not compiled with objectchecks, so it works there. > According to this test not only can you call metho

Re: [fpc-pascal] access violation?

2018-07-27 Thread Mattias Gaertner
On Fri, 27 Jul 2018 11:41:51 -0600 Ryan Joseph wrote: >[...] > How do I disable this? I just ran this test program with -CR and I still > calls the method statically. You are right. I just tested myself. Either I'm confusing the flag or it has been changed. Once upon a time Lazarus used the sam

Re: [fpc-pascal] Concatenating CP Strings

2018-09-14 Thread Mattias Gaertner via fpc-pascal
On Sat, 15 Sep 2018 01:38:33 +0200 Martok wrote: > Hi all, > > concatenating codepage strings is documented to be a bit weird: > > > Knowing this, how does one achieve the following? > > - have a string in any dynamic codep

<    4   5   6   7   8   9   10   11   12   >