Re: [fpc-pascal] GLM library alternative?

2017-05-27 Thread Benjamin Rosseaux
I've put some units of my still work-in-progress UE4-style SupraEngine on my root server, after I've read this mailing list thread => http://rootserver.rosseaux.net/stuff/supraengineunits/ where the SupraEngine.Math.pas + SupraEngine.Math.*.inc + SupraEngine.Types.Standard.pas will be maybe inter

Re: [fpc-pascal] fpc code for Java class and Android.

2017-05-27 Thread Paul Breneman
On 05/26/2017 10:25 PM, Paul Breneman wrote: On 05/26/2017 06:25 AM, fredvs wrote: Paul Breneman wrote I'll try to figure out how to do things (using ideU) first on my 64-bit Xubuntu 16.04. After that is clear it should be easier to try the same thing on Android? Are there any wiki pages for

Re: [fpc-pascal] named parameter

2017-05-27 Thread Graeme Geldenhuys
On 2017-05-27 21:14, nore...@z505.com wrote: f(p3 := true); ; You can do something similar already with source comments SomeProc(true {p3}) That will not work. p3 in his example is the 3rd parameter. You are only passing one parameter, so that will then become p1's value. And if the types d

Re: [fpc-pascal] fpc code for Java class and Android.

2017-05-27 Thread Graeme Geldenhuys
On 2017-05-27 12:00, fredvs wrote: Ho, that will be highly appreciated. +1 :) Regards, Graeme ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] named parameter

2017-05-27 Thread noreply
On 2017-05-27 01:17, Mr Bee via fpc-pascal wrote: Hi, As Pascal mostly well known as a safe, easy to read, and elegant language, don't you think Pascal needs named parameter? I mean for ALL kind of parameters, not just for Variants. When you have a function with many parameters having default va

Re: [fpc-pascal] Why casting interface as Tobject will result in a different reference?

2017-05-27 Thread Sven Barth via fpc-pascal
2017-05-27 18:10 GMT+02:00 Dennis Poon : > > > Sven Barth via fpc-pascal wrote: >> >> The idea itself is valid, cause "(IMyInterfaceVar as TObject) as >> IMyInterface = IMyInterfaceVar" is true if and only if IMyInterface is >> a COM interface. If IMyInterface really is a CORBA interface as Dennis

Re: [fpc-pascal] Why casting interface as Tobject will result in a different reference?

2017-05-27 Thread Dennis Poon
Sven Barth via fpc-pascal wrote: The idea itself is valid, cause "(IMyInterfaceVar as TObject) as IMyInterface = IMyInterfaceVar" is true if and only if IMyInterface is a COM interface. If IMyInterface really is a CORBA interface as Dennis wrote then the compiler should already have complained

Re: [fpc-pascal] named parameter

2017-05-27 Thread Sven Barth via fpc-pascal
2017-05-27 16:12 GMT+02:00 Michael Van Canneyt : > > > On Sat, 27 May 2017, Sven Barth via fpc-pascal wrote: > >> 2017-05-27 9:54 GMT+02:00 Michael Van Canneyt : >>> >>> >>> >>> On Sat, 27 May 2017, Mr Bee via fpc-pascal wrote: >>> Hi, As Pascal mostly well known as a safe, easy to r

Re: [fpc-pascal] named parameter

2017-05-27 Thread Michael Van Canneyt
On Sat, 27 May 2017, Sven Barth via fpc-pascal wrote: 2017-05-27 9:54 GMT+02:00 Michael Van Canneyt : On Sat, 27 May 2017, Mr Bee via fpc-pascal wrote: Hi, As Pascal mostly well known as a safe, easy to read, and elegant language, don't you think Pascal needs named parameter? I mean for

Re: [fpc-pascal] named parameter

2017-05-27 Thread Sven Barth via fpc-pascal
2017-05-27 9:54 GMT+02:00 Michael Van Canneyt : > > > On Sat, 27 May 2017, Mr Bee via fpc-pascal wrote: > >> Hi, >> >> As Pascal mostly well known as a safe, easy to read, and elegant language, >> don't you think Pascal needs named parameter? I mean for ALL kind of >> parameters, not just for Varia

Re: [fpc-pascal] Error cross compiling trunk for AVR

2017-05-27 Thread Christo
On Sat, 2017-05-27 at 12:58 +0200, Schindler Karl-Michael wrote: > > > > Am 27.05.2017 um 11:26 schrieb fpc-pascal-request@lists.freepascal. > > org: > > > > Date: Sat, 27 May 2017 07:58:23 +0200 > > From: Christo > > > > A recent change in 3.1.1 seemed to have broken the AVR compiler... > Sam

Re: [fpc-pascal] Error cross compiling trunk for AVR

2017-05-27 Thread Schindler Karl-Michael
> Am 27.05.2017 um 11:26 schrieb fpc-pascal-requ...@lists.freepascal.org: > > Date: Sat, 27 May 2017 07:58:23 +0200 > From: Christo > To: FPC-Pascal users discussions > Subject: [fpc-pascal] Error cross compiling trunk for AVR > Message-ID: <1495864703.20713.7.ca...@gmail.com> > Content-Type: t

Re: [fpc-pascal] fpc code for Java class and Android.

2017-05-27 Thread fredvs
Paul Breneman wrote > I'll try to help do something similar for console and fpGUI programs > using ideU. Ho, that will be highly appreciated. Many thanks Paul. Fre;D - Many thanks ;-) -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/fpc-code-for-Java-c

Re: [fpc-pascal] GLM library alternative?

2017-05-27 Thread Ryan Joseph
> On May 27, 2017, at 5:16 PM, Mark Morgan Lloyd > wrote: > > But working from a hazy recollection of such things, it's possible to merge > the translation/rotation matrices so that the final transformation can be > reduced to a single operation. Oh I’m sorry, I’m using 3.x core and the fixe

Re: [fpc-pascal] named parameter

2017-05-27 Thread Ryan Joseph
> On May 27, 2017, at 5:29 PM, Mark Morgan Lloyd > wrote: > > I was on the periphery of that discussion, since I thought I needed something > similar (but turned out not to). But you might have noticed some of the > APLisms that I horrify Sven with on occasion... I remember he liked my idea

Re: [fpc-pascal] named parameter

2017-05-27 Thread Mark Morgan Lloyd
On 27/05/17 10:20, Ryan Joseph wrote: On May 27, 2017, at 5:13 PM, Mark Morgan Lloyd wrote:> > someFunction(TPoint(X:0.0; Y:0.0));> > Pascal purists would probably object to that style, since what it's effectively doing is passing the parameters as an explicit list. I mentioned this form of “

Re: [fpc-pascal] GLM library alternative?

2017-05-27 Thread Ryan Joseph
> On May 27, 2017, at 4:30 PM, Graeme Geldenhuys > wrote: > > I've implemented that by porting the Java Game Libirary code to Object > Pascal. Give me a day or two and I'll share the OpenGL code I have on Github. Thanks that would be great if someone had those common functions in Pascal. Not

Re: [fpc-pascal] named parameter

2017-05-27 Thread Ryan Joseph
> On May 27, 2017, at 5:13 PM, Mark Morgan Lloyd > wrote: > > someFunction(TPoint(X:0.0; Y:0.0)); > > Pascal purists would probably object to that style, since what it's > effectively doing is passing the parameters as an explicit list. I mentioned this form of “default constructor" as a sor

Re: [fpc-pascal] GLM library alternative?

2017-05-27 Thread Mark Morgan Lloyd
On 27/05/17 09:40, leledumbo via fpc-pascal wrote: Has anyone converted these to Pascal before or having some similar I couldlook at? I don't usually do the matrix calculation myself, I delegate that by callingOpenGL functions in proper order. But working from a hazy recollection of such thi

Re: [fpc-pascal] named parameter

2017-05-27 Thread Mark Morgan Lloyd
On 27/05/17 09:40, Ryan Joseph wrote: On May 27, 2017, at 4:27 PM, Graeme Geldenhuys wrote:> > Yeah, that was going to be my suggestion too. I've done this many times when many parameters are optional. Use a record as parameter type. The other benefit of this is that it is future and backward

Re: [fpc-pascal] named parameter

2017-05-27 Thread Martin Schreiber
On Saturday 27 May 2017 11:30:38 Ryan Joseph wrote: > > can you show an example of this? Just curious. > In MSEgui most of the public widget methods an method properties use this approach. " type keyeventinfoty = record eventkind: eventkindty; key,keynomod: keyty; chars: msestring; shifts

Re: [fpc-pascal] named parameter

2017-05-27 Thread Bernd Oppolzer
IMO, it's not about named parameters; furthermore, it is not about readability, but this IMO is a maintenance issue. Think about a procedure that has two parameters and a lot of callers and you want to add a third one. it would be nice if you could specify a default value for the new third param

Re: [fpc-pascal] named parameter

2017-05-27 Thread Ryan Joseph
> On May 27, 2017, at 4:27 PM, Graeme Geldenhuys > wrote: > > Yeah, that was going to be my suggestion too. I've done this many times when > many parameters are optional. Use a record as parameter type. The other > benefit of this is that it is future and backwards compatible. You can add or

Re: [fpc-pascal] GLM library alternative?

2017-05-27 Thread Graeme Geldenhuys
On 2017-05-27 02:34, Ryan Joseph wrote: I see FPC has a matrix class but it doesn’t include all the helpers in GLM like rotation, transform, perspective transforms I've implemented that by porting the Java Game Libirary code to Object Pascal. Give me a day or two and I'll share the OpenGL code

Re: [fpc-pascal] named parameter

2017-05-27 Thread Graeme Geldenhuys
On 2017-05-27 09:47, Mark Morgan Lloyd wrote: It would probably be possible to do it by using a record with nullable fields as the parameter. Yeah, that was going to be my suggestion too. I've done this many times when many parameters are optional. Use a record as parameter type. The other be

Re: [fpc-pascal] GLM library alternative?

2017-05-27 Thread Ryan Joseph
> On May 27, 2017, at 4:20 PM, leledumbo via fpc-pascal > wrote: > > I don't usually do the matrix calculation myself, I delegate that by calling > OpenGL functions in proper order. However, just a few days ago I found this: > https://paginas.fe.up.pt/~paco/pmwiki/index.php?n=DynMatrix.DynMatri

Re: [fpc-pascal] GLM library alternative?

2017-05-27 Thread leledumbo via fpc-pascal
> Has anyone converted these to Pascal before or having some similar I could look at? I don't usually do the matrix calculation myself, I delegate that by calling OpenGL functions in proper order. However, just a few days ago I found this: https://paginas.fe.up.pt/~paco/pmwiki/index.php?n=DynMatr

Re: [fpc-pascal] named parameter

2017-05-27 Thread Mark Morgan Lloyd
On 27/05/17 08:00, Michael Van Canneyt wrote: On Sat, 27 May 2017, Mr Bee via fpc-pascal wrote: Hi,>> As Pascal mostly well known as a safe, easy to read, and elegant language,> don't you think Pascal needs named parameter? I mean for ALL kind of> parameters, not just for Variants. When you have

Re: [fpc-pascal] named parameter

2017-05-27 Thread Michael Van Canneyt
On Sat, 27 May 2017, Mr Bee via fpc-pascal wrote: Hi, As Pascal mostly well known as a safe, easy to read, and elegant language, don't you think Pascal needs named parameter? I mean for ALL kind of parameters, not just for Variants. When you have a function with many parameters having default