Re: [fpc-pascal] Operator overloading collection for vector operation using Intel SIMD SSE instruction

2019-03-13 Thread Zamrony P. Juhara via fpc-pascal
Yes I plan to add matrix operation too. Sent from Yahoo Mail on Android On Thu, Mar 14, 2019 at 11:04, Anthony Walter wrote: ___ fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pasc

Re: [fpc-pascal] Operator overloading collection for vector operation using Intel SIMD SSE instruction

2019-03-13 Thread Anthony Walter
Zam, That's great. Do you have any plans to add a 4x4 matrix type allowing for both SIMD / SSE versions of vector to matrix multiplication transforms, and matrix to matrix multiplication transforms? ___ fpc-pascal maillist - fpc-pascal@lists.freepascal

[fpc-pascal] Operator overloading collection for vector operation using Intel SIMD SSE instruction

2019-03-12 Thread Zamrony P. Juhara via fpc-pascal
In case anyone interested, I just want to announce a repository which is collection of operator overloading for vector operation using Intel SIMD SSE instruction. https://github.com/zamronypj/oprsimd Zamrony P. Juhara Fano Framework, web application framework for modern Pascal programming lang

Re: [fpc-pascal] Operator overloading with Text labels or words

2017-01-30 Thread Sven Barth
Am 30.01.2017 09:12 schrieb "Michael Van Canneyt" : > > > > Hi, > > You can use words. But only words that the compiler defines. See the documentation. That's not what he meant. Even if one overloads operator "Less" then one still has to use it as "<". Regards, Sven __

Re: [fpc-pascal] Operator overloading with Text labels or words

2017-01-30 Thread Sven Barth
Am 30.01.2017 08:47 schrieb "Lars" : > > It's not possible to define an operator like: > > Operator AbcXyz(r : real; z1 : complex) z : complex; > begin > end; > > Is it? > > Has to be a symbol? Only existing operators can be overloaded. For everything else, use a function. Regards, Sven _

Re: [fpc-pascal] Operator overloading with Text labels or words

2017-01-30 Thread Michael Van Canneyt
Hi, You can use words. But only words that the compiler defines. See the documentation. Michael. On Mon, 30 Jan 2017, Lars wrote: It's not possible to define an operator like: Operator AbcXyz(r : real; z1 : complex) z : complex; begin end; Is it? Has to be a symbol? If one could use w

[fpc-pascal] Operator overloading with Text labels or words

2017-01-29 Thread Lars
It's not possible to define an operator like: Operator AbcXyz(r : real; z1 : complex) z : complex; begin end; Is it? Has to be a symbol? If one could use words or text as operators this might be very interesting, although, probably a double edged sword like Lisp where you could embed programmin

Re: [fpc-pascal] Operator overloading and generic class

2014-08-26 Thread Xiangrong Fang
Sorry, I asked similar question long time ago, I found it in my gmail. Please ignore this question. However, I hope FPC will add this feature in future release anyway. 2014-08-26 16:17 GMT+08:00 Xiangrong Fang : > Hi All, > > While I try to compile this code: > > program demo; > {$mode objfpc}

[fpc-pascal] Operator overloading and generic class

2014-08-26 Thread Xiangrong Fang
Hi All, While I try to compile this code: program demo; {$mode objfpc}{$H+} uses tree; type TIntTree = class(specialize TTree) end; TITTree = class(specialize TTree) end; operator <(it1, it2: TIntTree): Boolean; begin Result := it1.Data < it2.Data; end; var itt: TITTree; begin end.

Re: [fpc-pascal] operator overloading and counting references / creating / destoying anonymous instances

2011-07-31 Thread Bernd
2011/7/31 Honza : > 2011/7/28 Bernd : >> ¹ I depend on OpenSSL already anyways, so I thought why not make use >> of its bignum too when I need it. > > I hope you're aware of the FPC GMP bindings: > > http://wiki.freepascal.org/gmp It seems the author fought with the same kind of problems and now t

Re: [fpc-pascal] operator overloading and counting references / creating / destoying anonymous instances

2011-07-31 Thread Honza
2011/7/28 Bernd : > ¹ I depend on OpenSSL already anyways, so I thought why not make use > of its bignum too when I need it. I hope you're aware of the FPC GMP bindings: http://wiki.freepascal.org/gmp The section http://wiki.freepascal.org/gmp#Extensions_bindings_.26_types discuses extended bi

Re: [fpc-pascal] operator overloading and counting references / creating / destoying anonymous instances

2011-07-29 Thread Sven Barth
Am 29.07.2011 12:11, schrieb Mark Morgan Lloyd: Sven Barth wrote: Am 28.07.2011 23:04, schrieb Mark Morgan Lloyd: I wonder if I could ask a silly question here, without displaying too much ignorance. I generally understand the significance of an interface in the Windows context, where COM (or

Re: [fpc-pascal] operator overloading and counting references / creating / destoying anonymous instances

2011-07-29 Thread Mark Morgan Lloyd
Sven Barth wrote: Am 28.07.2011 23:04, schrieb Mark Morgan Lloyd: I wonder if I could ask a silly question here, without displaying too much ignorance. I generally understand the significance of an interface in the Windows context, where COM (or whatever today's name for it) is integrated fairl

Re: [fpc-pascal] operator overloading and counting references / creating / destoying anonymous instances

2011-07-29 Thread Sven Barth
Am 28.07.2011 23:04, schrieb Mark Morgan Lloyd: I wonder if I could ask a silly question here, without displaying too much ignorance. I generally understand the significance of an interface in the Windows context, where COM (or whatever today's name for it) is integrated fairly deeply into the O

Re: [fpc-pascal] operator overloading and counting references / creating / destoying anonymous instances

2011-07-28 Thread Mark Morgan Lloyd
Bernd wrote: Hi, I am just trying to wrap (parts of) the OpenSSL¹ bignum library (large integer arithmetic) into something that makes using it look at least a little bit more elegant than using the naked procedural C API while at the same time trying to not overdo it and not create a heavy code

[fpc-pascal] operator overloading and counting references / creating / destoying anonymous instances

2011-07-28 Thread Bernd
Hi, I am just trying to wrap (parts of) the OpenSSL¹ bignum library (large integer arithmetic) into something that makes using it look at least a little bit more elegant than using the naked procedural C API while at the same time trying to not overdo it and not create a heavy code monster instea

Re: [fpc-pascal] Operator overloading

2009-09-21 Thread Mark Morgan Lloyd
Jonas Maebe wrote: On 19 Sep 2009, at 22:21, Mark Morgan Lloyd wrote: Is there any way of overloading the ^ (dereference) operator for a user-defined type? No, it isn't. Shucks :-) I remember that JPI v1 had what they called "virtual pointers" which specified a dereference function and co

Re: [fpc-pascal] Operator overloading

2009-09-21 Thread Jonas Maebe
On 19 Sep 2009, at 22:21, Mark Morgan Lloyd wrote: Is there any way of overloading the ^ (dereference) operator for a user-defined type? No, it isn't. Jonas ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/m

[fpc-pascal] Operator overloading

2009-09-19 Thread Mark Morgan Lloyd
Is there any way of overloading the ^ (dereference) operator for a user-defined type? I'm looking at a simple Prolog interpreter written in TP3, i.e. 16-bit code, and I think I might even have a fun use for it. Obviously it's chock-full of segment:offset pointers but if ^ could be overloaded

Re: [fpc-pascal] operator overloading question

2007-05-08 Thread Daniël Mantione
Op Tue, 8 May 2007, schreef Alexey Pavluchenko: > the compiler (2.0.4) stops with the "impossible operator overload" > message. Two questions arise: 1) why is it considered impossible Overloading pointers turned out to be too problematic in the past, so it was to be disabled. Overloading dynam

[fpc-pascal] operator overloading question

2007-05-08 Thread Alexey Pavluchenko
Hello all, When trying to compile the following code === cut=== unit foo; interface type tbar = record somefield: integer; end; pbar = ^tbar; operator + (a: pbar; b: pbar) c: pbar; implementation operator + (a: pbar; b: pbar) c: pbar; begin end; end. === cut=== the c

[fpc-pascal] operator overloading

2006-08-23 Thread Kendall Bell
I can't seem to be able to overload the = operator for classes. Every time I try I get the following error: Error: Impossible operator overload I can overload all other operators just fine. Is this a bug, or dos the compiler just not allow overloading of the = operator for classes. _

Re: [fpc-pascal] Operator overloading broken in 1.9.6?

2005-01-03 Thread Vinzent Hoefler
On Monday 03 January 2005 13:33, Peter Vreman wrote: > > operator * (const C : Char; const Len : byte) s : String; [doesn't work anymore] > > There must be at least one complex type record/string/array involved. > Your example is only using 2 ordinal types. At the time that the > expression is par

Re: [fpc-pascal] Operator overloading broken in 1.9.6?

2005-01-03 Thread Peter Vreman
> Hi, > > just installed 1.9.6 to see if any of our current code will break and > unfortunately I wasn't disappointed. ;-) > > stripped down code: > > -- 8< -- snip -- > unit >StrTools; > > interface > > operator * (const C : Char; const Len : byte) s : String; > > implementation > > operator *

[fpc-pascal] Operator overloading broken in 1.9.6?

2005-01-03 Thread Vinzent Hoefler
Hi, just installed 1.9.6 to see if any of our current code will break and unfortunately I wasn't disappointed. ;-) stripped down code: -- 8< -- snip -- unit StrTools; interface operator * (const C : Char; const Len : byte) s : String; implementation operator * (const C : Char; const Len