Is true, in that case here isn't the place. But nice that why isn't a
keyword is clear now.
2012/2/28 Sven Barth
> Am 28.02.2012 14:13, schrieb Everton Vieira:
>
> I see. I only said so because i thought would became more pretty if his
>> was bolded like de inline next to him.
>>
>>
> If this i
Am 28.02.2012 14:13, schrieb Everton Vieira:
I see. I only said so because i thought would became more pretty if his
was bolded like de inline next to him.
If this is your problem then you should ask this on the Lazarus list.
This is a problem of the highlighter not of the compiler.
Note: T
I see. I only said so because i thought would became more pretty if his
was bolded like de inline next to him.
2012/2/28 Jonas Maebe
>
> On 28 Feb 2012, at 13:25, Everton Vieira wrote:
>
> 2012/2/24 Jonas Maebe
>>
>> On 24 Feb 2012, at 18:07, Everton Vieira wrote:
>>>
>>> static; should be a
On 28 Feb 2012, at 13:25, Everton Vieira wrote:
2012/2/24 Jonas Maebe
On 24 Feb 2012, at 18:07, Everton Vieira wrote:
static; should be a keyword, doesn't?
No, it's not a keyword.
But is used like one. Why is that so?
It's not used like one. Keyword means "it's a reserved word by the
But is used like one. Why is that so?
2012/2/24 Jonas Maebe
>
> On 24 Feb 2012, at 18:07, Everton Vieira wrote:
>
> > static; should be a keyword, doesn't?
>
> No, it's not a keyword.
>
>
> Jonas
> ___
> fpc-pascal maillist - fpc-pascal@lists.freepas
On 24 Feb 2012, at 18:07, Everton Vieira wrote:
> static; should be a keyword, doesn't?
No, it's not a keyword.
Jonas
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
static; should be a keyword, doesn't?
2012/2/24 Everton Vieira
> Is true, with {$modeswitch advancedrecords} worked. But i dont see much
> sense in put a diretive for enable a new feature.
>
> 2012/2/24 Jonas Maebe
>
>>
>> On 24 Feb 2012, at 17:50, kyan wrote:
>>
>> Sorry, I forgot to mention t
Is true, with {$modeswitch advancedrecords} worked. But i dont see much
sense in put a diretive for enable a new feature.
2012/2/24 Jonas Maebe
>
> On 24 Feb 2012, at 17:50, kyan wrote:
>
> Sorry, I forgot to mention that advanced record syntax works in Delphi
> mode only. To compile it you must
On 24 Feb 2012, at 17:50, kyan wrote:
Sorry, I forgot to mention that advanced record syntax works in Delphi
mode only. To compile it you must change {$mode objfpc} to {$mode
Delphi}.
Or add {$modeswitch advancedrecords} after {$mode objfpc}
Jonas
On Fri, Feb 24, 2012 at 6:29 PM, Everton Vieira wrote:
> Doesn't work this code doesn't compile:
Sorry, I forgot to mention that advanced record syntax works in Delphi
mode only. To compile it you must change {$mode objfpc} to {$mode
Delphi}.
See also:
http://wiki.freepascal.org/FPC_New_Feature
Doesn't work this code doesn't compile:
type
{ TRec }
TRec = record
Nome: String;
class function Create(aNome: String): TRec; static; inline;
end;
procedure ShowTRec(rec: TRec);
implementation
{$R *.lfm}
procedure ShowTRec(rec: TRec);
begin
ShowMessage(rec.Nome);
end;
{ TRec }
>> Is there any how to do it?
You can use advanced record syntax and do something like this:
type
TRec = record
Numero: Integer;
Nome: String;
class function Create(ANumero: Integer; const ANome: string):
TRec; static; inline;
end;
...
class function TRec.Create(ANumero: Integer
Is contructions like this that aren't available:
type
TRec = record
Numero: Integer;
Nome: String;
end;
implementation
{$R *.lfm}
procedure ShowTRec(rec: TRec);
begin
ShowMessage(rec.Nome);
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
ShowTRec((Numero: 1; Nome: 'P
13 matches
Mail list logo