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] 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] {$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] {$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] 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] 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] 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

[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] 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 ___

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-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] 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] 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] 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] 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] 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] 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] 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 > >

[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] fpGUI on macOS

2017-06-09 Thread Mattias Gaertner
On Thu, 08 Jun 2017 17:40:45 -0500 nore...@z505.com wrote: >[...] > I'm concerned about Carbon being unusable in the future, and apps like > Lazaurs are built on Carbon, right? Yes. > So will lazarus be converting the IDE over to cocoa? Probably. Mattias __

Re: [fpc-pascal] Large file support

2017-06-02 Thread Mattias Gaertner
On Sat, 3 Jun 2017 01:02:35 +0200 (CEST) mar...@stack.nl (Marco van de Voort) wrote: > In our previous episode, Mattias Gaertner said: > > mar...@stack.nl (Marco van de Voort) wrote: > > > > >[...] > > > {$if not defined(fs32bit)} > > > off_t

Re: [fpc-pascal] Large file support

2017-06-02 Thread Mattias Gaertner
On Fri, 2 Jun 2017 12:50:57 +0200 (CEST) mar...@stack.nl (Marco van de Voort) wrote: >[...] > {$if not defined(fs32bit)} > off_t= cint64; { used for file sizes } > {$else} > off_t= cint; > {$endif} >[...] > Maybe we could clean it out. Why the documentation tool p

Re: [fpc-pascal] GLM library alternative?

2017-05-29 Thread Mattias Gaertner
On Mon, 29 May 2017 15:29:24 +0700 Ryan Joseph wrote: > > On May 29, 2017, at 12:58 PM, Anthony Walter wrote: >[...] > It’s buried now but look at the “FPC Graphics options” thread from a few days > ago and spanning back weeks I think. After all that I still failed to get a > clear answer I co

Re: [fpc-pascal] download mirror is missing

2017-05-25 Thread Mattias Gaertner
On Wed, 24 May 2017 22:24:51 +0200 (CEST) mar...@stack.nl (Marco van de Voort) wrote: > In our previous episode, Mattias Gaertner said: > > > > https://www.freepascal.org/down/x86_64/linux-netherlands.var > > > > 550 /pub/fpc/dist/3.0.2/x86_64-linux > > Not

[fpc-pascal] download mirror is missing

2017-05-24 Thread Mattias Gaertner
Hi, https://www.freepascal.org/down/x86_64/linux-netherlands.var 550 /pub/fpc/dist/3.0.2/x86_64-linux Mattias ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] FPC Graphics options?

2017-05-19 Thread Mattias Gaertner
On Fri, 19 May 2017 14:34:40 +0200 (CEST) mar...@stack.nl (Marco van de Voort) wrote: >[...] > Not the point, the point is, does javascript generate exceptions on division > by zero by default? No. It creates Infinity. Mattias ___ fpc-pascal maillist

Re: [fpc-pascal] FPC Graphics options?

2017-05-19 Thread Mattias Gaertner
On Fri, 19 May 2017 10:54:25 +0200 Sven Barth via fpc-pascal wrote: >[...] > Even though FPC might use SSE for maths it will still use the x87 to > transfer floating values to/from function, especially if they take Extended > as parameter/result. Can you elaborate on this? I thought on x64 does

Re: [fpc-pascal] Best way to check SimpleIPC for messages

2017-05-17 Thread Mattias Gaertner
On Wed, 17 May 2017 01:50:32 -0500 nore...@z505.com wrote: > On 2017-05-17 00:54, Sven Barth via fpc-pascal wrote: > > OnIdle() is called when there is no more event waiting in the > > widgetset's event queue, basically meaning that the application has > > nothing better to do anyway. It has nothi

Re: [fpc-pascal] List pre-defined defines

2017-05-16 Thread Mattias Gaertner
On Tue, 16 May 2017 14:45:42 -0700 Jon Foster wrote: > I've looked several times over the years for a way to get fpc to dump all > of the predefined "defines" for the target selected. Things like "fpc", > "linux", "unix", "android", "cpuarm", "cpui386", ... and who knows what > else. Seems lik

[fpc-pascal] mssqlconn.ppu on darwin

2017-05-13 Thread Mattias Gaertner
Hi, The unit mssqlconn is not compiled on FPC 3.0.2/3.0.3 on Darwin. Why? Mattias ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Call for testing: array constructors

2017-05-08 Thread Mattias Gaertner
On Fri, 5 May 2017 00:06:25 +0200 Sven Barth via fpc-pascal wrote: >[...] > Since revision 36105 FPC now supports the use of array constructors > using the "[...]" syntax inside ordinary code blocks like Delphi does > since - I think - XE8. And yes, even nested ones are supported (take a > look a

Re: [fpc-pascal] machine readable grammar of object pascal?

2017-05-08 Thread Mattias Gaertner
On Mon, 8 May 2017 09:22:48 +0100 Graeme Geldenhuys wrote: > On 2017-05-08 04:26, nore...@z505.com wrote: > > which is like a variable, but called a const ;-) > > I'm slowly but surely loosing all hope for Object Pascal. The language > is becoming more and more mangled with every new release o

Re: [fpc-pascal] Coroutines and VirtualAlloc

2017-04-20 Thread Mattias Gaertner
On Thu, 20 Apr 2017 07:40:44 + Mark Morgan Lloyd wrote: > Turning it around a little: are there still FPC targets that don't have > threads? Last month Karoly added one: WASM. Mattias ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org ht

Re: [fpc-pascal] Array clearing

2017-04-13 Thread Mattias Gaertner
On Thu, 13 Apr 2017 19:15:13 +0700 Ryan Joseph wrote: > > On Apr 13, 2017, at 7:08 PM, Mattias Gaertner > > wrote: > > > >> as I understood from > >> (http://wiki.freepascal.org/Dynamic_array<http://wiki.freepascal.org/Dynamic_array>), > >

Re: [fpc-pascal] Array clearing

2017-04-13 Thread Mattias Gaertner
On Thu, 13 Apr 2017 13:17:37 +0200 MARCOU Gilles wrote: > Regarding this code: > > > SetLength(Array,Length(Array)+1); > > Array[High(Array)] := … > > as I understood from (http://wiki.freepascal.org/Dynamic_array > ), SetLength will create a copy of

Re: [fpc-pascal] Platform Dependent Integer Types

2017-04-06 Thread Mattias Gaertner
On Thu, 6 Apr 2017 18:25:40 -0300 African Wild Dog wrote: > Which integer types have their size dependent on platform? > E.g. in Delphi, LongInt can 32 or 64 bits depending on the platform. Why do you think that Delphi's longint has 64bits anywhere? Delphi's NativeInt is 32 or 64bit depending on

Re: [fpc-pascal] Array clearing

2017-04-04 Thread Mattias Gaertner
On Tue, 4 Apr 2017 16:46:02 +0200 Sven Barth via fpc-pascal wrote: >[...] > SetLength() allocates a single block of memory, To avoid misunderstanding: SetLength(a,dim1,dim2) allocates one block for the dim1 array and then for each element another block. Mattias _

Re: [fpc-pascal] Questions About Constructors

2017-03-30 Thread Mattias Gaertner
On Thu, 30 Mar 2017 03:47:59 -0300 African Wild Dog wrote: > Hello, > > 1 - What happens if my constructor raise an exception? Is my destructor > automatically called? Yes. > 2 - Are the class fields automatically initialized to Default(T) just like > in Delphi? They are all initialized. I'm

Re: [fpc-pascal] Critical Section and Recursive Calls

2017-03-30 Thread Mattias Gaertner
On Thu, 30 Mar 2017 03:36:02 -0300 African Wild Dog wrote: > Hello, > > I'm writing a function protected by a critical section which can have > recursive calls under certain conditions. > > Using the TCriticalSection class, after my thread acquires a critical > section, if my thread make 6 addi

Re: [fpc-pascal] Delphi for Linux is out

2017-03-23 Thread Mattias Gaertner
On Thu, 23 Mar 2017 16:08:20 +0100 (CET) Michael Van Canneyt wrote: >[...] > > When did FPC start to run on Linux? 1999? > > I got the first "hello world" around 1995-1996, I think, > together with Mark May. (if memory serves well) Well, Delphi didn't start with a "Hello World". So that woul

Re: [fpc-pascal] Delphi for Linux is out

2017-03-23 Thread Mattias Gaertner
On Thu, 23 Mar 2017 13:15:20 +0100 (CET) "Karoly Balogh (Charlie/SGR)" wrote: > Hi, > > On Thu, 23 Mar 2017, Graeme Geldenhuys wrote: > > > Just thought I would mention, yesterday Delphi 10.2 was released which > > includes Linux support (I assume a cross-compiler). It is only available > > in

Re: [fpc-pascal] WebAssembly Target

2017-03-16 Thread Mattias Gaertner
On Thu, 16 Mar 2017 14:07:51 +0100 (CET) "Karoly Balogh (Charlie/SGR)" wrote: >[...] > Also, WebAssembly is a descendant of asm.js, Maybe historically. Technically asm.js is higher lvl than webassembly. > which was basically striped > down Javascript with some integer/pointer type tagging. As

Re: [fpc-pascal] Warning for anybody else using Linux Mint Debian ('Betsy')

2017-03-07 Thread Mattias Gaertner
> brian hat am 8. März 2017 um 00:16 geschrieben: >[...] > > /usr/bin/ld: /usr/lib/fpc/3.0.2/units/x86_64-linux/rtl/cprt0.o: > > unrecognized relocation (0x2a) in section `.text' > > /usr/bin/ld: final link failed: Bad value >[...] > Trying to build a simple 'Hello, World' from the 3.0.2 FP IDE

[fpc-pascal] 3.0.0 for 3.0.3

2017-03-02 Thread Mattias Gaertner
Hi, Why do I need fpc 3.0.0 to build 3.0.3? Shouldn't that be 3.0.2? Mattias ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] Lazarus Release 1.6.4

2017-03-01 Thread Mattias Gaertner
The Lazarus team is glad to announce the release of Lazarus 1.6.4. This is a bugfix release. This release was built with FPC 3.0.2. The previous release Lazarus 1.6.2 was built with FPC 3.0.0. Here is the list of fixes for Lazarus 1.6.x: http://wiki.freepascal.org/Lazarus_1.6_fixes_branch Here i

[fpc-pascal] Typecast class-of to class

2017-02-18 Thread Mattias Gaertner
Hi, FPC allows to type cast a class-of variable to a class instance. Is this a bug or a feature? var c: TClass; begin TObject(c).ClassName; // crash end. Mattias ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal

Re: [fpc-pascal] uses myunit in '../src/myunit.pas' ?

2017-02-13 Thread Mattias Gaertner
On Mon, 13 Feb 2017 16:47:38 -0700 (MST) fredvs wrote: >[...] > This works (Mathias way): That's not my way. In my opinion you should not put paths into Pascal sources and the directive should be disabled in units. >[...] > Congratulation Mathias, you come late, but you win. No, I lost. Even

Re: [fpc-pascal] uses myunit in '../src/myunit.pas' ?

2017-02-13 Thread Mattias Gaertner
On Mon, 13 Feb 2017 09:34:09 -0700 (MST) fredvs wrote: > > The compiler already does this. > Yes, that I know, for one unit, but try this: I guess you are searching for {$unitpath Documents} The problem with this directive is that it only works correct in the program. FPC allows it in units

Re: [fpc-pascal] uses myunit in '../src/myunit.pas' ?

2017-02-12 Thread Mattias Gaertner
On Sun, 12 Feb 2017 16:17:01 +0100 (CET) mar...@stack.nl (Marco van de Voort) wrote: >[...] > > One example might be when you are writing a quick program and don't want > > to send in a whole bunch of -Fu options and go into dialog boxes in > > lazarus configuring it, so you just quickly write it

Re: [fpc-pascal] uses myunit in '../src/myunit.pas' ?

2017-02-12 Thread Mattias Gaertner
On Sun, 12 Feb 2017 15:33:23 +0800 Tim Veldhuizen wrote: > Indeed, I can confirm Delphi does this. I think since 2009 or XE or so, > but AFAIK it doesn't need to. It does it only for the files that are > explicitly added to the project, but those are also in the dproj file. > And it would comp

Re: [fpc-pascal] class property accessor static

2017-02-07 Thread Mattias Gaertner
On Tue, 7 Feb 2017 23:20:18 +0100 Sven Barth wrote: > Am 07.02.2017 19:59 schrieb "Maciej Izak" : > > > > > > 2017-02-07 19:49 GMT+01:00 Mattias Gaertner : > >> > >> In FPC static class methods can be virtual as well. > > > > &

Re: [fpc-pascal] class property accessor static

2017-02-07 Thread Mattias Gaertner
On Tue, 7 Feb 2017 19:23:52 +0100 Sven Barth wrote: >[...] > Oh and don't forget that non-static class methods can be virtual (sometimes > I really miss that in C++). In FPC static class methods can be virtual as well. Mattias ___ fpc-pascal maillist

Re: [fpc-pascal] class property accessor static

2017-02-07 Thread Mattias Gaertner
On Tue, 7 Feb 2017 13:31:10 + Graeme Geldenhuys wrote: >[...] > Couldn't that simply be > > Writeln(TFoo.F); Yes. > I never understood Object Pascal's class methods/properties either? > Unlike Java, not everything needs to be in a class. We are allowed to > have procedures or functi

Re: [fpc-pascal] class property accessor static

2017-02-07 Thread Mattias Gaertner
On Tue, 7 Feb 2017 13:25:16 +0100 Maciej Izak wrote: > 2017-02-07 13:11 GMT+01:00 Mattias Gaertner : >[...] > > Sorry, I don't get it. > > Why is using a static method as accessor an advantage? > > > > You can use Get/Set pair of static methods in "pro

Re: [fpc-pascal] class property accessor static

2017-02-07 Thread Mattias Gaertner
On Tue, 7 Feb 2017 12:30:26 +0100 Maciej Izak wrote: > 2017-02-07 12:10 GMT+01:00 Mattias Gaertner : >[...] > Generally "static" means no hidden parameter "self". "static" for methods > is used for methods designed for callbacks from external API. That

[fpc-pascal] class property accessor static

2017-02-07 Thread Mattias Gaertner
Hi, The getter/setter of a class-property must be "static" (Delphi compatible). If I understand "static" correctly, then "static" simply omits passing the class as parameter. So a static class procedure is just a dumber version of a normal class procedure. What is the advantage of using "static"

fpc-pascal@lists.freepascal.org

2017-02-05 Thread Mattias Gaertner
On Sun, 5 Feb 2017 14:24:46 + Howard Page-Clark wrote: > Consider this program, which returns False: > > program Project1; > > uses sysutils; > > var >&begin: boolean; > > begin >&begin:=IsValidIdent('&begin'); >WriteLn('IsValidIdent(''&begin'') evaluates to ', &begin); > end.

Re: [fpc-pascal] How to use pipes ?

2017-02-01 Thread Mattias Gaertner
On Wed, 1 Feb 2017 05:02:05 -0700 (MST) fredvs wrote: > Hello. > > I have done lot of search on internet about pipes without success. > Even for Delphi. no demo nor explanation. > The same in fpc wki page. > > For example, how to use bytesavailable with pipes ? http://wiki.freepascal.org/Execu

Re: [fpc-pascal] for loop vs while loop

2017-02-01 Thread Mattias Gaertner
On Wed, 1 Feb 2017 11:49:34 + Graeme Geldenhuys wrote: > Hi, > > Just curious (been in a discussion with somebody else). Is there a > performance difference between a FOR loop and a WHILE loop? Yes, for-loop calculates the end value only once. > Not sure if it will make a difference, but

Re: [fpc-pascal] destructor

2017-01-24 Thread Mattias Gaertner
On Tue, 24 Jan 2017 15:33:30 +0100 Maciej Izak wrote: > 2017-01-24 12:48 GMT+01:00 Mattias Gaertner : > > > fpc allows to declare a method with the destructor keyword, that is > > not a real destructor, because it does not free the memory. For what is > > this feature g

[fpc-pascal] destructor

2017-01-24 Thread Mattias Gaertner
Hi, fpc allows to declare a method with the destructor keyword, that is not a real destructor, because it does not free the memory. For what is this feature good for? For example: Type TClassA = class public destructor Foo; end; destructor TClassA.Foo; begin end; var o: TClass; begin

Re: [fpc-pascal] FPC run (run program after compile)

2017-01-16 Thread Mattias Gaertner
On Mon, 16 Jan 2017 13:15:40 -0700 "Lars" wrote: >[...] > Does instantfpc make it mandatory that you put this at the top of every > source file: > > #!/usr/local/bin/fpc.d/3.0.0/instantfpc --set-cache=./ No. That's only needed if you want to run the Pascal file directly: ./project1.pas > f

Re: [fpc-pascal] FPC run (run program after compile)

2017-01-16 Thread Mattias Gaertner
On Mon, 16 Jan 2017 05:22:14 -0700 "Lars" wrote: >[...] > That instantfpc has catch22 like you cant compule multiple projects with > the same name, i.e. it caches file name only (caveat) whereas fpcrun would > compile it in current directory, as normal, no special cache dir needed Feel free to a

Re: [fpc-pascal] FPC run (run program after compile)

2017-01-16 Thread Mattias Gaertner
On Mon, 16 Jan 2017 00:06:59 -0700 "Lars" wrote: > Is there a way to compile a program with fpc at the command line and run > it right after? > > Something like > fpc run project1.pas -Fu../ instantfpc -Fu../ project1.pas > The only thing I could find was InstantFpc, which may serve simila

Re: [fpc-pascal] PascalScript broken by FPC 3.0 ?

2017-01-15 Thread Mattias Gaertner
On Sun, 15 Jan 2017 13:36:14 +0100 Bart wrote: > On 1/15/17, Kapibara Pas wrote: > > > What has happened? Is it possible to get it to work again without going back > > to Lazarus 1.4 and fpc 2.6.4? > > As a workaround you can switch back to fpc 2.6.4 for the time being. > Lazarus 1.6 branch

Re: [fpc-pascal] FPC 3.0.0 seed compiler for Rasperry Pi ARM?

2017-01-10 Thread Mattias Gaertner
On Tue, 10 Jan 2017 14:26:20 +0100 Bo Berglund wrote: >[...] > I found the system.ppu as follows: > > ~ $ find /home/pi/ -name system.ppu > /home/pi/lib/fpc/3.0.0/units/arm-linux/rtl/system.ppu > > Given that path, what would the correct fpc.cfg setting be? > Something like this perhaps: > > -

Re: [fpc-pascal] FPC 3.0.0 seed compiler for Rasperry Pi ARM?

2017-01-10 Thread Mattias Gaertner
On Tue, 10 Jan 2017 09:08:55 +0100 Bo Berglund wrote: >[...] > It looks like Lazarus needs to know where the fpc sources are located > because I always get this error when trying to build lazarus bigide > the first time: Lazarus does not need the FPC sources for building. >[...] > (3104) Comp

Re: [fpc-pascal] questions on fpimage

2017-01-05 Thread Mattias Gaertner
On Tue, 03 Jan 2017 02:54:05 +0100 Marc Santhoff wrote: > Hi, > > firstly a happy new year to you all and keep on rocking! > > While reading the fpimage unit code I found some pieces I don't > understand and could not clear up reading the docs. Here we go: > > > TFPCustomImage = class(TPersis

Re: [fpc-pascal] FPC clean room project

2017-01-02 Thread Mattias Gaertner
On Mon, 2 Jan 2017 05:23:06 + (UTC) Mr Bee wrote: > Hi all, > There's someone accusing that Free Pascal (and some parts of Lazarus) is just > a reverse engineering of Delphi. FPC runs on 80 platforms. Delphi only runs on MS Windows 32/64 and can cross compile to a few more. FPC supports Del

Re: [fpc-pascal] FPImage and mult-page TIFF support

2016-12-09 Thread Mattias Gaertner
On Fri, 9 Dec 2016 12:39:54 +0100 (CET) mar...@stack.nl (Marco van de Voort) wrote: >[...] > Are there still no ways around the 64-bit storage format? I thought > TLazintfImage was meant to be a step in that direction? There are various image formats (TLazintfImage, TFPCompactImgRGBA8Bit, TFPComp

Re: [fpc-pascal] FPImage and mult-page TIFF support

2016-12-08 Thread Mattias Gaertner
On Thu, 8 Dec 2016 15:15:55 + Graeme Geldenhuys wrote: > On 2016-12-08 14:22, Mattias Gaertner wrote: >[...] > It's not rocket science. ;-) Even rocket scientists can't read minds. Will you create the patch or should I? Mattias ___

Re: [fpc-pascal] FPImage and mult-page TIFF support

2016-12-08 Thread Mattias Gaertner
On Thu, 8 Dec 2016 14:09:53 + Graeme Geldenhuys wrote: > On 2016-12-08 14:01, Mattias Gaertner wrote: > > That would be a 64bit per pixel image, wasting a lot of memory. > > Why FPImage uses 64bit per pixel is beyond me! The original author of > FPImage clearly

Re: [fpc-pascal] FPImage and mult-page TIFF support

2016-12-08 Thread Mattias Gaertner
On Thu, 8 Dec 2016 12:12:27 + Graeme Geldenhuys wrote: > On 2016-12-07 17:47, Mattias Gaertner wrote: > >> > t := TFPReaderTiff.Create; > > t.OnCreateImage:=@... > > > > Thanks that solved it. > > But why can't TFPReaderTif

Re: [fpc-pascal] FPImage and mult-page TIFF support

2016-12-07 Thread Mattias Gaertner
On Wed, 7 Dec 2016 15:34:13 + Graeme Geldenhuys wrote: >[...] > fs := TFileStream.Create('/tmp/multipage_tiff_example.tif', fmOpenRead); > t := TFPReaderTiff.Create; t.OnCreateImage:=@... > t.LoadFromStream(fs, true); Mattias ___ fpc-pascal

Re: [fpc-pascal] FPImage and mult-page TIFF support

2016-12-07 Thread Mattias Gaertner
On Wed, 7 Dec 2016 09:58:13 + Graeme Geldenhuys wrote: > Hi, > > Does anybody know if FPImage supports multi-page TIFF's? Reading or > Writing. Do you mean multiple IFD? TFPReaderTiff and TFPWriterTiff support multiple IFD using multiple TFPCustomImage. Mattias ___

Re: [fpc-pascal] Using the LCL without Lazarus

2016-12-01 Thread Mattias Gaertner
On Thu, 1 Dec 2016 15:15:36 -0200 luciano de souza wrote: > Yes, this is a very good feature. As I can't see, the single way to > not extrapass the space is the automatic layout. > To become perfect, it would be fantastic if there is also automatic > positioning like in Wx or GTK. Maybe this pag

Re: [fpc-pascal] Using the LCL without Lazarus

2016-12-01 Thread Mattias Gaertner
On Thu, 1 Dec 2016 14:57:42 -0200 luciano de souza wrote: > I am also blind and this topic really interesses me. > In the given example, heith and width were specified in pixels. > Is there a way to write the same example using automatic adjustments, > in other words, setting to the layout incres

Re: [fpc-pascal] For..in enumerator for generic records?

2016-11-30 Thread Mattias Gaertner
On Wed, 30 Nov 2016 18:24:11 +0700 Ryan Joseph wrote: >[...] I can wrap my head around nested types in classes because they’re >necessary for generics I just learned but nested classes feel messy. Is there >at least some namespace protection? Yes. And it follows visibility rules. > That would

Re: [fpc-pascal] Using the LCL without Lazarus

2016-11-30 Thread Mattias Gaertner
On Tue, 29 Nov 2016 20:42:36 -0500 "BobJ" wrote: >[...] > Begin web-site excerpt > > Using the LCL without Lazarus > > 1How to use the LCL without the Lazarus IDE? > 1.1Requirements > 1.2Introduction > 1.3The installation process > 1.4The settings > 1.5The code > 1.6Lazarus 1.

Re: [fpc-pascal] Underscores in numerical literals - grouping

2016-11-22 Thread Mattias Gaertner
On Tue, 22 Nov 2016 13:32:03 + Graeme Geldenhuys wrote: > On 2016-11-22 13:26, Sven Barth wrote: > > I think the difference a tab versus a couple of spaces makes (even if > > across a whole file or a whole project) will be insignificant > > Well, for every byte in the file, the parser need

Re: [fpc-pascal] MySQL 5.7 and FreePascal

2016-11-19 Thread Mattias Gaertner
On Sun, 20 Nov 2016 00:33:23 +0100 (CET) Michael Van Canneyt wrote: >[...] > It depends. MySQL 5.7 is supported in the mysql57dyn.pp unit, but I am not > sure it is included in Lazarus 1.6. It is shipped with fpc 3.0.0, so yes. Mattias ___ fpc-pascal

[fpc-pascal] Lazarus Release 1.6.2

2016-11-15 Thread Mattias Gaertner
The Lazarus team is glad to announce the release of Lazarus 1.6.2. This is a bugfix release. This release was built with FPC 3.0.0. The previous release Lazarus 1.6 was built with FPC 3.0.0 too. Here is the list of fixes for Lazarus 1.6.x: http://wiki.freepascal.org/Lazarus_1.6_fixes_branch Here

Re: [fpc-pascal] Docs: Type A = Integer?

2016-11-13 Thread Mattias Gaertner
On Sun, 13 Nov 2016 21:21:16 +0100 Ewald wrote: > Hello, > > Section 1.2.40 of Programmers guide > (http://www.freepascal.org/docs-html/prog/progsu40.html#x47-460001.2.40) > says, somewhere in the middle: > > Type > A = Integer; > > Is it supposed to be there? If so, what is it supposed

Re: [fpc-pascal] FreeBSD distro with fpc as star.

2016-11-09 Thread Mattias Gaertner
On Wed, 9 Nov 2016 09:39:40 + Graeme Geldenhuys wrote: > On 2016-11-08 11:04, Michael Schnell wrote: > > Sadly in my compiled "trunk" version 1.7 on Linux the <"LCLWidgetType"> > > drop down menu is not shown any more :-(. > > The redesign of Lazarus's compiler options dialog, is now dep

Re: [fpc-pascal] Missing messages

2016-11-03 Thread Mattias Gaertner
>[...]Then there is also the issue of them not conforming > to Unicode standards eg: the Lazarus Forum. What do you mean? Mattias ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pasca

[fpc-pascal] server down?

2016-10-17 Thread Mattias Gaertner
Hi, On the bug tracker login page http://mantis.freepascal.org/login_page.php?return=%2Fmy_view_page.php%3F I see this text: Do you already have a login at Free Pascal Community? You can use that login here (use your e-mail address as username). When clicking on the "Free Pascal Community" link

Re: [fpc-pascal] with no if assigned() there are bugs

2016-09-21 Thread Mattias Gaertner
On Wed, 21 Sep 2016 22:43:57 -0600 "Lars" wrote: > On Wed, September 21, 2016 6:27 am, Pierre Free Pascal wrote: > > There is also the -gc option: > > -gcGenerate checks for pointers > > > > > > This is another debugging option, that is not used very often, > > > I could not find this

Re: [fpc-pascal] Does FCL Image support transparency?

2016-09-16 Thread Mattias Gaertner
On Fri, 16 Sep 2016 17:48:33 +0200 (CEST) Michael Van Canneyt wrote: > On Fri, 16 Sep 2016, Reimar Grabowski wrote: > > > Hi, > > > > I want to put watermarks on images in a command line application. > > This doesn't do the trick: > > > > ScaledImage:=TFPCompactImgRGBA8Bit.Create(Width, Height);

Re: [fpc-pascal] Test for valid ip address

2016-07-28 Thread Mattias Gaertner
On Thu, 28 Jul 2016 10:26:32 +0200 Jonas Maebe wrote: > On 28/07/16 10:14, Koenraad Lelong wrote: > > I need a way to test if an string containing an ipv4-address is really > > an ipv4-address. > > I tried > > tmpAddress:=HostAddrToStr(StrToHostAddr(IPAddressStr)); > > writeln(tmpAddress); > > i

Re: [fpc-pascal] Weird string behavior

2016-07-26 Thread Mattias Gaertner
On Tue, 26 Jul 2016 12:03:21 +0200 Jonas Maebe wrote: > Mattias Gaertner wrote on Tue, 26 Jul 2016: > > > It seems the Delphi rules for non rawbytestrings are: > > - Concatenate two same declared strings: append bytes, copy dyn. cp > > from left operand. Declared cp o

Re: [fpc-pascal] Weird string behavior

2016-07-26 Thread Mattias Gaertner
On Tue, 26 Jul 2016 11:01:28 +0200 Jonas Maebe wrote: >[...] > Could you try the same program with u1 as plain ansistring instead of > utf8string? (with an additional > "setcodepage(rawbytestring(u1),65001,false);" after assigning u1) Sure: {$APPTYPE CONSOLE} type tcp866 = type ansistri

Re: [fpc-pascal] Weird string behavior

2016-07-25 Thread Mattias Gaertner
On Mon, 25 Jul 2016 23:23:23 +0200 Jonas Maebe wrote: > On 25/07/16 23:07, Mattias Gaertner wrote: > > DefaultSystemCodePage = 1252 > > s3 = "abcdef" cp = 65001 > > Thanks. So the rule for concatenation appears to be: > * the dynamic code page of the result

Re: [fpc-pascal] Weird string behavior

2016-07-25 Thread Mattias Gaertner
On Mon, 25 Jul 2016 22:25:59 +0200 Jonas Maebe wrote: > On 23/07/16 13:31, Petr Kohut wrote: > > Hello, > > here are results: > > Thanks a lot. Could you test one more? I think I will have all > information I need then. > > > Jonas > > {$APPTYPE CONSOLE} > > type >tcp866 = type ansist

Re: [fpc-pascal] Weird string behavior

2016-07-22 Thread Mattias Gaertner
On Sat, 23 Jul 2016 00:29:32 +0200 Bart wrote: > On 7/22/16, Jonas Maebe wrote: > > >> ResultA := AnsiToUTF8(AnsiStrA + AnsiStrA); // UTF-8 ResultB := > >> AnsiToUTF8(AnsiStrA) + AnsiToUTF8(AnsiStrA); // Win-1252 > >> > >> > >> And resultA is not equal to ResultB > >> > >> It doesn't look

Re: [fpc-pascal] Initialization of packed record local variables?

2016-07-22 Thread Mattias Gaertner
On Fri, 22 Jul 2016 11:03:23 +0200 (CEST) Michael Van Canneyt wrote: > On Fri, 22 Jul 2016, leledumbo wrote: > > >> OK, I did not know about the default keyword. > >> > >> Is "default" zero? > > > > http://wiki.lazarus.freepascal.org/FPC_New_Features_3.0#New_compiler_intrinsic_Default > > >

Re: [fpc-pascal] what is the correct way to write {$IFDEF FPC Version > 3.0}

2016-07-08 Thread Mattias Gaertner
On Fri, 8 Jul 2016 18:47:19 +0800 Dennis wrote: > what is the correct way to write {$IFDEF FPC Version > 3.0} {$IF FPC_FULLVERSION>3} Mattias ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/l

Re: [fpc-pascal] What is the difference between TThread.Queue(aMethod: TThreadMethod) and Application.QueueAsyncCall(AMethod: TDataEvent; Data: PtrInt);

2016-07-01 Thread Mattias Gaertner
On Fri, 1 Jul 2016 17:47:58 +0200 (CEST) Michael Van Canneyt wrote: >[...] > Application.QueueAsyncCall has nothing to do with threads. > This is an LCL method which can be used to insert a callback in the message > loop. > I think it unlikely that this is thread-safe, I suspect it is only for

Re: [fpc-pascal] Single threaded application on multicore CPU

2016-06-22 Thread Mattias Gaertner
On Wed, 22 Jun 2016 13:36:08 +0100 Graeme Geldenhuys wrote: > On 2016-06-22 13:14, Mattias Gaertner wrote: > > On my Linux it does not swap the CPU and I can't find any hard data that > > Windows is swapping because of hotspot problems, > > It’s not just a Windows t

Re: [fpc-pascal] Single threaded application on multicore CPU

2016-06-22 Thread Mattias Gaertner
On Wed, 22 Jun 2016 07:41:04 -0400 Stephen Chrzanowski wrote: > Everything has a cost. But swapping CPU threads isn't as costly as a fried > CPU. Keeping the CPU cool at all costs is better than having a hotspot on > the die which COULD damage the heat sink. On my Linux it does not swap the CP

Re: [fpc-pascal] How to find the return type of a for..in ?

2016-06-16 Thread Mattias Gaertner
On Thu, 16 Jun 2016 17:49:53 +0200 (CEST) Michael Van Canneyt wrote: >[...] > The return type of the GetEnumerator function tells you what the class is. > > It is a good idea for a Lazarus IDE extension. Lazarus' code completion supports for-in loop since a long time. Mattias _

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