But is used like one. Why is that so?
2012/2/24 Jonas Maebe jonas.ma...@elis.ugent.be
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 -
On 28 Feb 2012, at 13:25, Everton Vieira wrote:
2012/2/24 Jonas Maebe jonas.ma...@elis.ugent.be
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
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 jonas.ma...@elis.ugent.be
On 28 Feb 2012, at 13:25, Everton Vieira wrote:
2012/2/24 Jonas Maebe jonas.ma...@elis.ugent.be
On 24 Feb 2012, at 18:07, Everton
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:
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 pascaldra...@googlemail.com
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
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:
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;
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
On Fri, Feb 24, 2012 at 6:29 PM, Everton Vieira tonvie...@gmail.com 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:
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}
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 jonas.ma...@elis.ugent.be
On 24 Feb 2012, at 17:50, kyan wrote:
Sorry, I forgot to mention that advanced record syntax works in Delphi
mode only.
static; should be a keyword, doesn't?
2012/2/24 Everton Vieira tonvie...@gmail.com
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 jonas.ma...@elis.ugent.be
On 24 Feb 2012, at 17:50, kyan
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
13 matches
Mail list logo