Re: [fpc-pascal] Untyped var params

2017-01-07 Thread Lars
On Sat, January 7, 2017 2:52 pm, Bart wrote: > On 1/7/17, Andrew Hall wrote: > > >> If you cast your “something” to a typed pointer, the compiler will >> do the work for you in the usual way: >> > > But if you know that at forehand (and you know, since you cast it), > why

Re: [fpc-pascal] FPC hardware accelerated GUI apps. Why?

2017-01-07 Thread Marco van de Voort
In our previous episode, Lars said: > > Could be potential further discussion about FireMonkey moved to > > fpc-other, please? I don't think that it's still related to FPC... > Fine, let me put it this way to keep it 100 percent on topic. > > If FPC was able to create hardware accelerated GUI

Re: [fpc-pascal] Untyped var params

2017-01-07 Thread Dmitry Boyarintsev
On Sat, Jan 7, 2017 at 5:42 PM, Bart wrote: > > procedure X(var Y); > begin > PInteger(Y)^ := 3; //syntax may be wrong, too lazy to test > end; > > To me this completely defies the purpose of an untyped var parameter, > since in this exmaple you do know, @design time,

Re: [fpc-pascal] Untyped var params

2017-01-07 Thread Bart
On 1/8/17, Dmitry Boyarintsev wrote: > Think about something like a var-type variable, where the actual type of Y > might vary. > > procedure XX(var Y; YType: integer); > begin > case YType of > T_INT: PInteger(@Y)^:= 3; > T_SINGLE: PSingle(@Y)^:=3; >

Re: [fpc-pascal] Untyped var params

2017-01-07 Thread Dmitry Boyarintsev
On Sat, Jan 7, 2017 at 6:53 PM, Bart wrote: > OK, I can imagine more complex examples where this may come in handy. > > And thanks for the rest of the explanation. And only more complex examples should be used :) There're much better ways to implement var-type variables.

Re: [fpc-pascal] ppcjvm issues

2017-01-07 Thread Jon Foster
On 01/07/2017 03:06 AM, Tomas Hajny wrote: On Sat, January 7, 2017 03:12, Jon Foster wrote: Hello, You didn't mention that you weren't subscribed to the list, but since this seemed to be the case, I included your address in Cc:. Thanks for this. I get a lot of mail from the FPC lists ... but

Re: [fpc-pascal] ppcjvm issues

2017-01-07 Thread Lars
On Sat, January 7, 2017 10:09 am, Jon Foster wrote: > On 01/07/2017 03:06 AM, Tomas Hajny wrote: > >> On Sat, January 7, 2017 03:12, Jon Foster wrote: >> >> >> >> Hello, >> >> >> You didn't mention that you weren't subscribed to the list, but since >> this seemed to be the case, I included your

Re: [fpc-pascal] Untyped var params

2017-01-07 Thread Dmitry Boyarintsev
On Sat, Jan 7, 2017 at 6:02 PM, Lars wrote: > Some brave soldiers once tried to reinvent generics using these tricks.. Well, Pascal run-time has been using "hidden" generics forever. As an example: http://www.freepascal.org/docs-html/rtl/system/val.html Val() declares the

Re: [fpc-pascal] Untyped var params

2017-01-07 Thread Lars
On Sat, January 7, 2017 4:29 am, Ryan Joseph wrote: > >> On Jan 4, 2017, at 11:07 PM, Dmitry Boyarintsev >> wrote: >> >> >> Treat is as a pointer (it's an implicit pointer anyway) >> >> > > So I need to need to use Move to write memory directly to “var >

Re: [fpc-pascal] FPC clean room project

2017-01-07 Thread Lars
On Fri, January 6, 2017 12:51 pm, Sven Barth wrote: > Ehm... Delphi's compiler is written in C++, not Delphi as far as we > know. Also their NEXTGEN compiler is utilizing LLVM, something we won't > purely do. Yes the exe signature was c/c++ That does not forgive copyright just because

Re: [fpc-pascal] Untyped var params

2017-01-07 Thread Dmitry Boyarintsev
On Sat, Jan 7, 2017 at 2:37 PM, Andrew Hall wrote: > If you cast your “something” to a typed pointer, the compiler will do the > work for you in the usual way: > > PDouble(something)^ := myDouble; > or rather PDouble(@something)^ := myDouble; ? thanks, Dmitry

Re: [fpc-pascal] Untyped var params

2017-01-07 Thread Dmitry Boyarintsev
On Sat, Jan 7, 2017 at 4:52 PM, Bart wrote: > > But if you know that at forehand (and you know, since you cast it), > why then use an untyped var parameter at all? > http://www.freepascal.org/docs-html/rtl/system/fillchar.html ? thanks, Dmitry

Re: [fpc-pascal] Untyped var params

2017-01-07 Thread Andrew Hall
If you cast your “something” to a typed pointer, the compiler will do the work for you in the usual way: PDouble(something)^ := myDouble; PAnsiString(something)^ := myAnsiString; myRecordStructure := PMyRecordStructure(something)^; Or less elegantly: AnsiString(Pointer(something)^) :=

Re: [fpc-pascal] FPC hardware accelerated GUI apps. Why?

2017-01-07 Thread Lars
On Fri, January 6, 2017 10:06 am, Tomas Hajny wrote: > Hello, > > > Could be potential further discussion about FireMonkey moved to > fpc-other, please? I don't think that it's still related to FPC... > > Thank you > > > Tomas > (one of FPC mailing list moderators) > Fine, let me put it this way

Re: [fpc-pascal] Untyped var params

2017-01-07 Thread Bart
On 1/7/17, Andrew Hall wrote: > If you cast your “something” to a typed pointer, the compiler will do the > work for you in the usual way: > But if you know that at forehand (and you know, since you cast it), why then use an untyped var parameter at all? Bart

Re: [fpc-pascal] Untyped var params

2017-01-07 Thread Bart
On 1/7/17, Dmitry Boyarintsev wrote: >> But if you know that at forehand (and you know, since you cast it), >> why then use an untyped var parameter at all? >> > > http://www.freepascal.org/docs-html/rtl/system/fillchar.html ? That does not realy answer my question.

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

2017-01-07 Thread Sven Barth
Am 07.01.2017 11:33 schrieb "Bo Berglund" : > make all install FPC="/home/pi/bin/fpc/3.0.0" > INSTALL_PREFIX="/home/pi/bin/fpc/3.0.2RC1" OPT="-dFPC_ARMHF" > > Will this put the binaries into the /home/pi/bin/fpc/3.0.2RC1 ? > > I really do not want the make install command

Re: [fpc-pascal] ppcjvm issues

2017-01-07 Thread Bart
On 1/7/17, Tomas Hajny wrote: > I can't comment the first part, but where exactly is a type named "float" > defined in FPC (which unit)? Float is defined in math unit. It is an alias to float128, if that type exists, else extende, or else to double, or else to single. Bart

Re: [fpc-pascal] ppcjvm issues

2017-01-07 Thread leledumbo
> The first issue I ran into is this: > > procedure Cppp1Activity.onResume; > begin > inherited onResume; > with AAAlertDialog.InnerBuilder(self) do begin > setTitle(R.strings.app_name); > end; > end; I don't check by running the code directly, but looking at the

Re: [fpc-pascal] ppcjvm issues

2017-01-07 Thread Tomas Hajny
On Sat, January 7, 2017 03:12, Jon Foster wrote: Hello, You didn't mention that you weren't subscribed to the list, but since this seemed to be the case, I included your address in Cc:. . . > The second issue I ran into: > > function f(x, y: integer): float; > begin >

Re: [fpc-pascal] FPC clean room project

2017-01-07 Thread Michael Schnell
On 06.01.2017 17:21, Graeme Geldenhuys wrote: you can build hardware accelerated GUI applications using that toolkit. Not Really the point. Can you use the toolkit plus fpc to compile and run Delphi Firemonkey application source code (after a decent amount of tweaking) ? -Michael

Re: [fpc-pascal] FPC clean room project

2017-01-07 Thread Juha Manninen
On Fri, Jan 6, 2017 at 6:41 PM, Michael Schnell wrote: > Can you use the toolkit plus fpc to compile and run Delphi Firemonkey > application source code (after a decent amount of tweaking) ? No. You should continue a Firemonkey discussion in fpc-other list, as Tomas Hajny

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

2017-01-07 Thread Bo Berglund
I went ahead and tried the command but it failed miserably... pi@rpi3-jessie:~/dev/fpc/3.0.2RC1 $ make all install FPC="/home/pi/bin/fpc/3.0.0" INSTALL_PREFIX="/home/pi/bin/fpc/3.0.2RC1" OPT="-dFPC_ARMHF" make: execvp: /home/pi/bin/fpc/3.0.0: Permission denied make compiler_cycle RELEASE=1

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

2017-01-07 Thread Karoly Balogh (Charlie/SGR)
Hi On Sat, 7 Jan 2017, Bo Berglund wrote: > I went ahead and tried the command but it failed miserably... > > pi@rpi3-jessie:~/dev/fpc/3.0.2RC1 $ make all install > FPC="/home/pi/bin/fpc/3.0.0" > INSTALL_PREFIX="/home/pi/bin/fpc/3.0.2RC1" OPT="-dFPC_ARMHF" With FPC, You need to specify the

Re: [fpc-pascal] Untyped var params

2017-01-07 Thread Ryan Joseph
> On Jan 4, 2017, at 11:07 PM, Dmitry Boyarintsev > wrote: > > Treat is as a pointer (it's an implicit pointer anyway) > So I need to need to use Move to write memory directly to “var something”? That makes sense I guess and could be useful is some cases but not

Re: [fpc-pascal] FPC 3.0.X next to 2.6.4 on Linux

2017-01-07 Thread Mark Morgan Lloyd
On 06/01/17 20:30, Michael Van Canneyt wrote: On Fri, 6 Jan 2017, Krzysztof wrote: Hi, I have installed FPC 2.6.4 for a long time on my Linux with install.sh script in /usr dirs. I would like to install FPC 3.0.0 but keep 2.6.4 as What I do is to have all installs in

[fpc-pascal] ppcjvm issues

2017-01-07 Thread Jon Foster
I've been working on building an app for Android using the FPC's JVM target. I'm using fpc 3.0.0. I've run into a couple of things that I'm not sure if they're bugs or I just don't know what I'm doing. I was using fpc to avoid having to learn Java and have discovered that's not entirely

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

2017-01-07 Thread Bo Berglund
On Thu, 5 Jan 2017 02:07:00 +0100 (CET), "Karoly Balogh (Charlie/SGR)" wrote: >Hi, > >On Thu, 5 Jan 2017, Bo Berglund wrote: > >> I just need the seed compiler to be able to build FPC from sources. >> And build Lazarus of course. > >Then you need "ppcarm" from that