On 05 Mar 2011, at 00:09, José Mejuto wrote:
> Calling test is ok, but if I define test as:
>
> MyInterf = interface
> []
>procedure test(constref param: pmyrec); safecall;
> end;
>
> it fails with a sigsegv. Are both expected to have the same behavior
> in this case ? (pointer to re
Where a unit exports an instance of an object, what's best practice for
making this read-only? I'm referring to the object reference itself
here, not properties of the object.
Where I've done this in the past I've used a function:
interface
function InitText: TFormattedString;
implementation
Hi,
http://alexmogurenko.com/blog/programming/android-building-free-pascal-compiler-for-android/
How can I do this on a Mac OS?
Thank you!
Lennie De Villiers
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailm
Hello FPC-Pascal,
Saturday, March 5, 2011, 12:24:24 PM, you wrote:
>> it fails with a sigsegv. Are both expected to have the same behavior
>> in this case ? (pointer to record).
JM> "constref" is basically the same as "var" as far as passing
JM> the parameter is concerned. That means that in the
On Sat, Mar 5, 2011 at 8:24 AM, Mark Morgan Lloyd
wrote:
> Where a unit exports an instance of an object, what's best practice for
> making this read-only? I'm referring to the object reference itself here,
> not properties of the object.
>
> Where I've done this in the past I've used a function:
Marcos Douglas wrote:
On Sat, Mar 5, 2011 at 8:24 AM, Mark Morgan Lloyd
wrote:
Where a unit exports an instance of an object, what's best practice for
making this read-only? I'm referring to the object reference itself here,
not properties of the object.
Where I've done this in the past I've u
On Sat, Mar 5, 2011 at 7:05 PM, Mark Morgan Lloyd
wrote:
> Marcos Douglas wrote:
>>
>> On Sat, Mar 5, 2011 at 8:24 AM, Mark Morgan Lloyd
>> wrote:
>>>
>>> Where a unit exports an instance of an object, what's best practice for
>>> making this read-only? I'm referring to the object reference itsel
I need to perform a Hash of data stored at a TMemoryStream...
But unfortunately, the following program spits out different results
if i run it in sucession... Note that the file being read (test6.pas)
never changes.
Uses
Classes,
SHA1;
Var
Data : TMemoryStream;
Ha
In our previous episode, Jorge Aldo G. de F. Junior said:
> Uses
> Classes,
> SHA1;
>
> Var
> Data : TMemoryStream;
> Hash : TSHA1Digest;
>
> Begin
> Data := TMemoryStream.Create;
> Data.LoadFromFile('test6.pas');
Data.Position:=0;
> Hash := SHA1Buffer(
On Sat, Mar 5, 2011 at 8:15 PM, Marcos Douglas wrote:
> On Sat, Mar 5, 2011 at 7:05 PM, Mark Morgan Lloyd
> wrote:
>> Marcos Douglas wrote:
>>>
>>> On Sat, Mar 5, 2011 at 8:24 AM, Mark Morgan Lloyd
>>> wrote:
Where a unit exports an instance of an object, what's best practice for
On Sat, Mar 5, 2011 at 7:05 PM, Mark Morgan Lloyd
wrote:
> Marcos Douglas wrote:
>>
>> On Sat, Mar 5, 2011 at 8:24 AM, Mark Morgan Lloyd
>> wrote:
>>>
>>> Where a unit exports an instance of an object, what's best practice for
>>> making this read-only? I'm referring to the object reference itsel
Found the solution,
untyped var parameters expects a real variable so it "internally"
generates a pointer out of the address of the variable.
SHA1Buffer uses an untyped parameter, so, passing a pointer to it
makes it try to hash the pointer itself (and the rest of the memory
positioned exactly be
i have a problem with TBlowfishDecryptStream :
Try
lBuffer := TMemoryStream.Create;
lSource := (aObject As TMemoryStream);
lSource.Seek(0, soFromBeginning);
If circular reference not is a good practice (even if to use a
implementation section) then I have to put all code, that works
together, in the same unit, right?
So, I ask: Is there a limit of characters at an unit?
Marcos Douglas
___
fpc-pascal maillis
On Sun, Mar 6, 2011 at 02:14, Marcos Douglas wrote:
> On Sat, Mar 5, 2011 at 7:05 PM, Mark Morgan Lloyd
> wrote:
>> Marcos Douglas wrote:
>>>
>>> On Sat, Mar 5, 2011 at 8:24 AM, Mark Morgan Lloyd
>>> wrote:
Where a unit exports an instance of an object, what's best practice for
ma
On Sat, 5 Mar 2011 23:07:45 -0300
Marcos Douglas wrote:
> If circular reference not is a good practice (even if to use a
> implementation section) then I have to put all code, that works
> together, in the same unit, right?
No, only compatibility or your boss can force you to do that.
You can us
16 matches
Mail list logo