Hi *,
I need store result of floating point calculation (in my example
arctan()) in memory pointed by some variable. See this code:
var a: single; pa: PSingle;
asm
fild dy
fild dx
fpatan
fstp a
fwait
end;
pa^ := a;
It works, but is there any way how to store
On 8/22/2017 5:16 PM, Paul Nance wrote:
> Turbo Pascal also had a BCD unit.
Well, no, there was no unit, rather a version of Turbo Pascal 3.0x had a
version that natively used BCD math for "reals" instead of the 6byte
REAL type, just as there was a x87 version that used hardware x87 FP
(IEEE754) fl
On 8/23/2017 5:11 AM, Benito van der Zander wrote:
>> Btw, anyone know about a BCD math implementation for Free Pascal, like
>> it used to be implemented in DR CBASIC? (those were the days... ;-) )
>
>
> I have one here: http://benibela.de/sources_en.html#bigdecimalmath
Thanks, but that is not quit
On 23.08.2017 20:38, Marcos Douglas B. Santos wrote:
> On Wed, Aug 23, 2017 at 3:25 PM, Sven Barth via fpc-pascal
> wrote:
>> On 23.08.2017 19:57, Marcos Douglas B. Santos wrote:
>>> Would we have any problem of memory leaks using Interface helper with
>>> COM interfaces (refcount)?
>>> I mean, th
On Wed, Aug 23, 2017 at 3:25 PM, Sven Barth via fpc-pascal
wrote:
> On 23.08.2017 19:57, Marcos Douglas B. Santos wrote:
>> Would we have any problem of memory leaks using Interface helper with
>> COM interfaces (refcount)?
>> I mean, the "type helper" has constructor/destructor to create/release
On 23.08.2017 19:57, Marcos Douglas B. Santos wrote:
> On Wed, Aug 23, 2017 at 2:45 PM, Sven Barth via fpc-pascal
> wrote:
>> Am 23.08.2017 19:39 schrieb "Marcos Douglas B. Santos" :
>>>
>>> Wait a minute. Now I realize that procedure IShellLinkHelper.Save is a
>>> real implementation not by a cla
On Wed, Aug 23, 2017 at 2:45 PM, Sven Barth via fpc-pascal
wrote:
> Am 23.08.2017 19:39 schrieb "Marcos Douglas B. Santos" :
>>
>> Wait a minute. Now I realize that procedure IShellLinkHelper.Save is a
>> real implementation not by a class, but by a "interface helper".
>> It's like default methods
Am 23.08.2017 16:01 schrieb "Anthony Walter" :
>
> As to what they are useful for, consider the following:
>
> type
> // IShellLink is define by Microsoft
> IShellLinkHelper = record helper for IShellLink
> public
> procedure Save(const Target, Description, Link: string);
> end;
>
> pro
Am 23.08.2017 19:40 schrieb "Anthony Walter" :
>
> Sven, multiple helpers would be greatly appreciated, especially
considering everyone wants to add their own helpers for types like string.
At least in FPC modes they can use inheritance to solve this (see below) or
by putting their units after the
Am 23.08.2017 19:39 schrieb "Marcos Douglas B. Santos" :
>
> On Wed, Aug 23, 2017 at 11:00 AM, Anthony Walter wrote:
> > Marco, it doesn't work that way.
> >
> > Type helpers simply allow you to extend an existing type with new
methods
> > and/or properties. When you declare a type helper you exte
Sven, multiple helpers would be greatly appreciated, especially considering
everyone wants to add their own helpers for types like string.
Thanks again!
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailm
On Wed, Aug 23, 2017 at 11:00 AM, Anthony Walter wrote:
> Marco, it doesn't work that way.
>
> Type helpers simply allow you to extend an existing type with new methods
> and/or properties. When you declare a type helper you extend all instances
> of said type given that:
>
> A) You 'use' the unit
On Wed, Aug 23, 2017 at 12:13 PM, Sven Barth via fpc-pascal
wrote:
> Am 23.08.2017 16:58 schrieb "Marcos Douglas B. Santos" :
>>
>> Is this compatible with Delphi?
>
> Interface helpers are only supported by FPC. But the other helpers (class,
> record, primitive types) are Delphi compatible.
Alri
Am 23.08.2017 16:01 schrieb "Anthony Walter" :
>
> Marco, it doesn't work that way.
>
> Type helpers simply allow you to extend an existing type with new methods
and/or properties. When you declare a type helper you extend all instances
of said type given that:
>
> A) You 'use' the unit declaring t
Am 23.08.2017 16:59 schrieb "Marcos Douglas B. Santos" :
>
> On Wed, Aug 23, 2017 at 11:07 AM, Anthony Walter wrote:
> > Here is another example:
> >
> > type
> > TDay = (Monday = 0, Tuesday, Wednesday, Thursday, Friday, Saturday,
> > Sunday);
> >
> > TDayHelper = record helper for TDay
> >
Am 23.08.2017 16:58 schrieb "Marcos Douglas B. Santos" :
>
> On Wed, Aug 23, 2017 at 11:00 AM, Anthony Walter wrote:
> > Marcos, it doesn't work that way.
> >
> > Type helpers simply allow you to extend an existing type with new
methods
> > and/or properties. When you declare a type helper you ext
On Wed, Aug 23, 2017 at 11:07 AM, Anthony Walter wrote:
> Here is another example:
>
> type
> TDay = (Monday = 0, Tuesday, Wednesday, Thursday, Friday, Saturday,
> Sunday);
>
> TDayHelper = record helper for TDay
> function AsByte: Byte;
> function ToString: string;
> end;
I didn't
On Wed, Aug 23, 2017 at 11:00 AM, Anthony Walter wrote:
> Marcos, it doesn't work that way.
>
> Type helpers simply allow you to extend an existing type with new methods
> and/or properties. When you declare a type helper you extend all instances
> of said type given that:
>
> A) You 'use' the uni
Here is another example:
type
TDay = (Monday = 0, Tuesday, Wednesday, Thursday, Friday, Saturday,
Sunday);
TDayHelper = record helper for TDay
function AsByte: Byte;
function ToString: string;
end;
function TDayHelper.AsByte: Byte;
begin
Result := Ord(Self);
end;
function TDayHe
Marco, it doesn't work that way.
Type helpers simply allow you to extend an existing type with new methods
and/or properties. When you declare a type helper you extend all instances
of said type given that:
A) You 'use' the unit declaring the type helper in some other unit.
B) No other unit you'r
On Wed, Aug 23, 2017 at 3:50 AM, Florian Klämpfl
wrote:
> Am 22.08.2017 um 15:59 schrieb Martok:
> > As a heads-up: whatever tool you end up using, make sure you do NOT
> translate
> > the C enums in mpfr.h as enumerations. It will work, but create
> unpredictable
> > codegen on the FPC side.
>
>
On 8/21/17, Bart wrote:
> (which may tell you more about me that fpc).
OK, that makes no sense...
I meant to say:
(which may say more about me,than it may say about fpc)
Bart
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.fr
On Wed, Aug 23, 2017 at 6:18 AM, Sven Barth via fpc-pascal
wrote:
> Am 23.08.2017 09:42 schrieb "Michael Van Canneyt" :
>>
>>
>> Any other examples ?
>
> It's the same as for the other kinds of helpers: being syntactic sugar.
> E.g. if I have an interface that has two methods that both return a st
Btw, anyone know about a BCD math implementation for Free Pascal, like
it used to be implemented in DR CBASIC? (those were the days... ;-) )
I have one here: http://benibela.de/sources_en.html#bigdecimalmath
Am 23.08.2017 um 02:16 schrieb Paul Nance:
Turbo Pascal also had a BCD unit.
On Au
Am 23.08.2017 09:42 schrieb "Michael Van Canneyt" :
>
>
>
> On Tue, 22 Aug 2017, Anthony Walter wrote:
>
>> I just wanted to point out that revision 37023 Sven added type helper
>> support for interfaces.
>>
>> Good job and thank you Sven!
>>
>
> I'm having trouble understanding why this could be u
Am 22.08.2017 um 15:59 schrieb Martok:
> If your header looks enough like IDL (which is essentially C++ with
> annotations), you may also be able to use one of the available IDL compilers.
> There are a few dialect issues though, so YMMV. I'd say MPFR has a few defines
> too many for my idlproc (ht
On Tue, 22 Aug 2017, Anthony Walter wrote:
I just wanted to point out that revision 37023 Sven added type helper
support for interfaces.
Good job and thank you Sven!
I'm having trouble understanding why this could be useful (apart from
completeness).
The only thing I can come up with is a
If your header looks enough like IDL (which is essentially C++ with
annotations), you may also be able to use one of the available IDL compilers.
There are a few dialect issues though, so YMMV. I'd say MPFR has a few defines
too many for my idlproc (https://github.com/martok/idlproc), but may come
I'm using Chelper. (http://wiki.freepascal.org/Chelper)
It's my choice, because it preserves comments (which is usually an
important part of open-source libs)
plus, can be configured to handle library header-specific defines.
Naturally, the process is semi-automatic, but get be done quite quick
29 matches
Mail list logo