On Sun, 4 Jun 2023, Juha Manninen via fpc-pascal wrote:
On Sunday, June 4, 2023, Mattias Gaertner via fpc-pascal <
fpc-pascal@lists.freepascal.org> wrote:
Correct. Property RecInstance is read only.
No, I can define it as :
property RecInstance: TMyRec read fRecInstance write fRecIns
Martin Frb via fpc-pascal schrieb am So.,
4. Juni 2023, 18:10:
> On 04/06/2023 17:49, Martin via fpc-pascal wrote:
> > On 04/06/2023 15:04, Juha Manninen via fpc-pascal wrote:
> >> Why the following code fails to compile?
> >> MyObj.RecInstance.ii := 123;
> > Technically you can modify the member
Travis Siegel via fpc-pascal said on Sun, 4 Jun 2023 19:38:44 +
>
>On 6/4/2023 1:37 PM, Steve Litt via fpc-pascal wrote:
>> Henry Vermaak via fpc-pascal said on Fri, 2 Jun 2023 09:38:17 +0100
>>
>>> On Fri, 2 Jun 2023 at 01:36, Steve Litt via fpc-pascal
>>> wrote:
fillchar(j
On Sun, Jun 4, 2023 at 11:58 AM Graeme Geldenhuys via fpc-pascal
wrote:
> Initially I was leaning towards the Range exception, but now I'm
> thinking that maybe the Argument exception is more appropriate
> (based on the descriptions seen in the linked docs).
I would go for range exception, since
OK, I understand mostly. Thanks.
Juha
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Depending on the compiler *not* to overwrite local variables is most
certainly the wrong way to go with this. You really should create
either a global record/object, or use functions to pass around the
information you need. Expecting the operating system to keep local
variables after the area
On 04/06/2023 17:49, Martin via fpc-pascal wrote:
On 04/06/2023 15:04, Juha Manninen via fpc-pascal wrote:
Why the following code fails to compile?
MyObj.RecInstance.ii := 123;
Technically you can modify the members of the temp record (just to
have the work thrown away afterwards).
So I guess
On 04/06/2023 15:04, Juha Manninen via fpc-pascal wrote:
Why the following code fails to compile?
TMyRec = record
...
property
RecInstance: TMyRec read fRecInstance;// write fRecInstance;
...
MyObj.RecInstance.ii := 123;
Access through property seems to be the problem. Accessing
fRecI
On 04/06/2023 15:04, Juha Manninen via fpc-pascal wrote:
Why the following code fails to compile?
TMyRec = record
...
property
RecInstance: TMyRec read fRecInstance;// write fRecInstance;
...
MyObj.RecInstance.ii := 123;
Access through property seems to be the problem. Accessing
fRecI
On Sunday, June 4, 2023, Mattias Gaertner via fpc-pascal <
fpc-pascal@lists.freepascal.org> wrote:
>
> Correct. Property RecInstance is read only.
>
No, I can define it as :
property RecInstance: TMyRec read fRecInstance write fRecInstance;
and still get the same error.
Juha
On Sun, 4 Jun 2023 16:04:48 +0300
Juha Manninen via fpc-pascal wrote:
> Why the following code fails to compile?
>
> type
> TMyRec = record
> ss: String;
> ii: Integer;
> end;
> TMyClass = class
> private
> fName: String;
> fRecInstance: TMyRec;
> property
> RecInst
Ralf Quint via fpc-pascal said on Thu, 1 Jun 2023 17:43:58 -0700
>On 6/1/2023 5:36 PM, Steve Litt via fpc-pascal wrote:
>>
>> What is the best way for me to construct newperson() so that every
>> time called it would return a new variable?
>W.T.F.?
>
>Sorry, but for how long are you programmin
Henry Vermaak via fpc-pascal said on Fri, 2 Jun 2023 09:38:17 +0100
>On Fri, 2 Jun 2023 at 01:36, Steve Litt via fpc-pascal
> wrote:
>> fillchar(junkvar, junkvar_size, 'b');
>> person := modperson(person, 'Martin');
>> person := modperson(person2, 'Maria');
>
>Maybe a typ
Formatting was a little weird. This is what I meant, but the error remains :
type
TMyRec = record
ss: String;
ii: Integer;
end;
TMyClass = class
private
fName: String;
fRecInstance: TMyRec;
public
property RecInstance: TMyRec read fRecInstance;// write fRecInstance;
Compiler version is FPC 3.2.2 on Linux.
Juha
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Why the following code fails to compile?
type
TMyRec = record
ss: String;
ii: Integer;
end;
TMyClass = class
private
fName: String;
fRecInstance: TMyRec;
property
RecInstance: TMyRec read fRecInstance;// write fRecInstance;
end;
var
MyObj : TMyClass;
begin
MyObj
Hi,
I'm working on code where the function take a (x, y) set of coordinates.
If the coordinates are out of range/bounds, I want to raise an exception
with a message explaining the reason and limits. I definitely don't want
to "silently do nothing".
Looking at these set of built-in exceptions:
h
17 matches
Mail list logo