On Thu, 8 Oct 2020 23:00:32 +0200 (CEST), Michael Van Canneyt via
fpc-pascal
wrote:
>
>
>On Thu, 8 Oct 2020, Ryan Joseph via fpc-pascal wrote:
>
>>
>>
>>> On Oct 8, 2020, at 5:14 AM, gabor via fpc-pascal
>>> wrote:
>>>
>>> You can define typed constant and assign it to variable.
>>>
>>> type
> On Oct 8, 2020, at 3:01 PM, Michael Van Canneyt via fpc-pascal
> wrote:
>
> Should be easy enough.
Great, glad this is happening. Let me know if you want some help with these
additions or if it's best for you to just blast through it on you own. Seems
like you know what's best for the RTL
On Thu, 8 Oct 2020, Ryan Joseph via fpc-pascal wrote:
On Oct 6, 2020, at 2:12 AM, Michael Van Canneyt via fpc-pascal
wrote:
// Read raw content as bytes
Function GetFileContents(Const aFileName : RawByteString) : TBytes;
Function GetFileContents(Const aFileName : UnicodeString) : TBytes
On Thu, 8 Oct 2020, Ryan Joseph via fpc-pascal wrote:
On Oct 8, 2020, at 5:14 AM, gabor via fpc-pascal
wrote:
You can define typed constant and assign it to variable.
type
TMyRecord = record
X, Y: Integer;
S: String;
end;
const
MYDEFREC: TMyRecord = (X: 1; Y: 2; S: 'ABC');
I
> On Oct 6, 2020, at 2:12 AM, Michael Van Canneyt via fpc-pascal
> wrote:
>
> // Read raw content as bytes
>
> Function GetFileContents(Const aFileName : RawByteString) : TBytes;
> Function GetFileContents(Const aFileName : UnicodeString) : TBytes;
> Function GetFileContents(Const aHandle : T
> On Oct 8, 2020, at 5:14 AM, gabor via fpc-pascal
> wrote:
>
> You can define typed constant and assign it to variable.
>
> type
> TMyRecord = record
>X, Y: Integer;
>S: String;
> end;
>
> const
> MYDEFREC: TMyRecord = (X: 1; Y: 2; S: 'ABC');
I never understood why we can't init
> On Oct 7, 2020, at 11:15 AM, Ryan Joseph wrote:
>
> Some interesting stuff here, thanks. Almost there but for some reason
> Scanner.pas is not found even though it's in the same directory as
> TOMLParser.pas. The compiler did find TOMLParser despite /sources not being
> explicitly included
On Thu, 8 Oct 2020 13:04:43 +0200 (CEST), Michael Van Canneyt via
fpc-pascal
wrote:
>> OK,
>> is it possible to define the TMyRecord with default values so that
>> when I do Default(TMyRecord) it will be non-zero defaults written
>> instead of zeros?
>
>No. You will always need code for that.
OK
On Thu, 8 Oct 2020 09:37:06 -0300
"Marcos Douglas B. Santos via fpc-pascal"
wrote:
>[...]
> > > unit TOML;
> > > interface
> > > uses
> > > TOMLParser in '/sources',
> > > TOMLTypes in '/sources';
> >
> > uses
> > TOMLParser in 'sources/TOMLParser.pas',
> > TOMLTypes in 'sources/TOMLTyp
On Wed, Oct 7, 2020 at 2:02 PM Mattias Gaertner via fpc-pascal
wrote:
>
> On Wed, 7 Oct 2020 10:53:16 -0600
> Ryan Joseph via fpc-pascal wrote:
>
> > I'm trying "uses in" which I never knew existed before.
> >
> > The idea is that I provide a path to TOML.pas using -Fu then use the
> > "in" synta
OK,
is it possible to define the TMyRecord with default values so that
when I do Default(TMyRecord) it will be non-zero defaults written
instead of zeros?
You can define typed constant and assign it to variable.
type
TMyRecord = record
X, Y: Integer;
S: String;
end;
const
MYDEFRE
On Thu, 8 Oct 2020, Bo Berglund via fpc-pascal wrote:
On Thu, 8 Oct 2020 10:47:52 +0200 (CEST), Michael Van Canneyt via
fpc-pascal
wrote:
On Thu, 8 Oct 2020, Bo Berglund via fpc-pascal wrote:
I would like to know if data containers of type packed record are
zeroed when the item is decla
On Thu, 8 Oct 2020 10:47:52 +0200 (CEST), Michael Van Canneyt via
fpc-pascal
wrote:
>
>
>On Thu, 8 Oct 2020, Bo Berglund via fpc-pascal wrote:
>
>> I would like to know if data containers of type packed record are
>> zeroed when the item is declared?
>>
>> type
>> TMyRecord = packed record
>>
On Thu, 8 Oct 2020, Peter via fpc-pascal wrote:
I'm curious about who wins, if switches/directives are set to different values
in different places.
They could be set in
fpg.cfg
Command line or Lazarus lpi
Directives in the code.
Is there some AND/OR logic, or is it a strict precedence order?
I'm curious about who wins, if switches/directives are set to different values
in different places.
They could be set in
fpg.cfg
Command line or Lazarus lpi
Directives in the code.
Is there some AND/OR logic, or is it a strict precedence order? Is it the same
for all switches?
I can see for exam
On Thu, 8 Oct 2020, Bo Berglund via fpc-pascal wrote:
I would like to know if data containers of type packed record are
zeroed when the item is declared?
type
TMyRecord = packed record
AField1: byte;
AField2: word;
AField3: single;
AField4: boolean;
AField5: array[0..15] of Ca
I would like to know if data containers of type packed record are
zeroed when the item is declared?
type
TMyRecord = packed record
AField1: byte;
AField2: word;
AField3: single;
AField4: boolean;
AField5: array[0..15] of Cardinal;
end;
procedure SomeProc;
var
myRec: TMyR
17 matches
Mail list logo