On Thu, 22 Feb 2018, Darius Blaszyk wrote:
On my machine getlocaleinfo returns ZZZ when requesting the abbrev langname.
The country code is correctly set to NL. This makes gettext.GetLanguageIDs
return zz_NL. What could be causing this?
Also the behavior of GetLocaleInfoIDs does not seem to
Pascal allows type declarations at the procedure level, so you could use type
aliases to reduce your typing and still have code completion:
procedure foo();
type
SVK = NSSomeLongNameOfSomethingValueKey;
var
a: SVK;
begin
a := SVK.some_key_value;
end;
If you tried to use SVK elsewhere an er
On Thu, 22 Feb 2018, Andreas Frieß wrote:
Another possible Problem with the definition
TFPColor (fpc) record with word <> TColor (lazarus)
-$7FFF-1..$7FFF <> TFPReportColor (fpreport) UInt32
So you cannot use in Lazarus the 'well known' TColors. With TColor it is
also Delphi comp
On my machine getlocaleinfo returns ZZZ when requesting the abbrev langname.
The country code is correctly set to NL. This makes gettext.GetLanguageIDs
return zz_NL. What could be causing this?
Also the behavior of GetLocaleInfoIDs does not seem to be according to the
gettext manual. On windows
Another possible Problem with the definition
TFPColor (fpc) record with word <> TColor (lazarus)
-$7FFF-1..$7FFF <> TFPReportColor (fpreport) UInt32
So you cannot use in Lazarus the 'well known' TColors. With TColor it is
also Delphi compatible.
If the defines are Lazarus compatibl
On Wed, 21 Feb 2018, Mattias Gaertner wrote:
On Wed, 21 Feb 2018 19:54:55 +
Graeme Geldenhuys wrote:
[...]
> Because UInt32 is not a JSON dataformat.
Well, then I'll say that FPC's JSON needs to be extended to support
UInt32, as it is a perfectly valid Object Pascal data type.
How
Hi Fpc-pascal Users,
I simply rely on my IDE (Lazarus, Visual Studio) to complete long
identifier names for me so that I don't have to. *shrugs*
but you still need to read the identifiers and when they are too long,
that takes time, too
How does that look?
No idea how it looked, but
On Wed, 21 Feb 2018 19:54:55 +
Graeme Geldenhuys wrote:
>[...]
> > Because UInt32 is not a JSON dataformat.
>
> Well, then I'll say that FPC's JSON needs to be extended to support
> UInt32, as it is a perfectly valid Object Pascal data type.
How should FPC's JSON support something, that
In our previous episode, Ryan Joseph said:
> > Having to decide a variable is scoped or not when it is declared is not the
> > most ideal solution anyway. Logically you would decide that when creating
> > the scope, iow when importing, like in Modula2 or (afaik also) Extended
> > Pascal.
>
> How
On 2018-02-21 08:48, Andreas Frieß wrote:
The definition is TFPReportColor = type UInt32;
That was designed and defined to handle AARRGGBB values of $
(max 256 for each color channel and alpha), and that fits perfectly in a
UInt32 data type.
Should the definition for TFPReportCol
Am 21.02.2018 um 16:29 schrieb Ryan Joseph:
On Feb 21, 2018, at 10:13 PM, Michael Van Canneyt
wrote:
You lose an important type safety if you replace them with constants.
I like enums also but you can imagine when they were proposed the compiler
teams probably compared them to constants an
On Wed, Feb 21, 2018 at 12:11 PM, Darius Blaszyk wrote:
> On my machine getlocaleinfo returns ZZZ when requesting the abbrev langname.
> The country code is correctly set to NL. This makes gettext.GetLanguageIDs
> return zz_NL. What could be causing this?
Maybe the same as:
http://www.hu.freep
> On Feb 21, 2018, at 10:13 PM, Michael Van Canneyt
> wrote:
>
> You lose an important type safety if you replace them with constants.
I like enums also but you can imagine when they were proposed the compiler
teams probably compared them to constants and decided if they were worth it
bloat
> On Feb 21, 2018, at 10:18 PM, Marco van de Voort wrote:
>
> Having to decide a variable is scoped or not when it is declared is not the
> most ideal solution anyway. Logically you would decide that when creating
> the scope, iow when importing, like in Modula2 or (afaik also) Extended
> Pasc
In our previous episode, Ryan Joseph said:
> Adding compiler features is a slippery slope and I have no idea where to
> draw lines. Scoped enums aren?t necessary and in fact enums in general
> could be replaced with constants easily enough so that feature was
> probably debated at some point also
On Wed, 21 Feb 2018, Ryan Joseph wrote:
On Feb 21, 2018, at 5:16 PM, Sven Barth via fpc-pascal
wrote:
I simply rely on my IDE (Lazarus, Visual Studio) to complete long identifier
names for me so that I don't have to. *shrugs*
Sure enough it’s not a pressing matter by any means but I
> On Feb 21, 2018, at 5:16 PM, Sven Barth via fpc-pascal
> wrote:
>
> I simply rely on my IDE (Lazarus, Visual Studio) to complete long identifier
> names for me so that I don't have to. *shrugs*
Sure enough it’s not a pressing matter by any means but I thought it was worth
asking about si
Am 21.02.2018 um 10:45 schrieb Michael Van Canneyt:
> I was waiting for this reply from you. You didn't disappoint ;)
Got an image to maintain ;-)
Took me long enough to come up with that actually fairly simple workaround,
might as well save others the trouble.
That stuff is like "bad keming", I
Andreas Frieß wrote:
> when i compile in Lazarus the Reportdesigner with activated
> RangeCheck it gives a lot of runtimeerror with rangeerrors.
>
For explanation what i mean in my previous post, UInt32 is not an
integer or JSON compatible size (and actual rangecheck unsafe).
ANdreas
On 02/21/2018 05:16 AM, Sven Barth via fpc-pascal wrote:
I simply rely on my IDE (Lazarus, Visual Studio) to complete long identifier
names for me so that I don't have to. *shrugs*
exactly my thoughts, too...
--
NOTE: No off-list assistance is given without prior approval.
*Please k
On my machine getlocaleinfo returns ZZZ when requesting the abbrev langname.
The country code is correctly set to NL. This makes gettext.GetLanguageIDs
return zz_NL. What could be causing this?
Also the behavior of GetLocaleInfoIDs does not seem to be according to the
gettext manual. On windows
On Wed, 21 Feb 2018, Sven Barth via fpc-pascal wrote:
Am 21.02.2018 09:48 schrieb "Ryan Joseph" :
On Feb 21, 2018, at 2:57 PM, Michael Van Canneyt
wrote:
The job of the compiler is to create correct code. Not to ensure you
write readable code. Every feature that is introduced
offers
Am 21.02.2018 09:48 schrieb "Ryan Joseph" :
> On Feb 21, 2018, at 2:57 PM, Michael Van Canneyt
wrote:
>
> The job of the compiler is to create correct code. Not to ensure you
write readable code. Every feature that is introduced
> offers more scope for abuse (generics jump to mind).
I think yo
On Wed, 21 Feb 2018, Martok wrote:
I doubt that many would be using scopedenums for that.
Isn't that what they're for?
{$SCOPEDENUMS ON}
type
TTileSortingFlag = (Static,
Ramp,
Ignore,
Particle,
Floor,
On Wed, 21 Feb 2018 16:14:13 +0700
Ryan Joseph wrote:
>[...]
> {$scopedenums on}
> type
> TTileSortingFlag = (Static,
> Ramp,
> Ignore,
> Particle,
> Floor,
>
> I doubt that many would be using scopedenums for that.
Isn't that what they're for?
{$SCOPEDENUMS ON}
type
TTileSortingFlag = (Static,
Ramp,
Ignore,
Particle,
Floor,
Flat,
On Wed, 21 Feb 2018, Ryan Joseph wrote:
On Feb 21, 2018, at 4:09 PM, Mattias Gaertner wrote:
I doubt that many would be using scopedenums for that.
why not? Scoped enums did clean that up a little but still lots of extra typing
during assignments and parameters.
That compared to the p
> On Feb 21, 2018, at 4:09 PM, Mattias Gaertner
> wrote:
>
> I doubt that many would be using scopedenums for that.
why not? Scoped enums did clean that up a little but still lots of extra typing
during assignments and parameters.
That compared to the previous is a still win though (less co
On Wed, 21 Feb 2018 15:58:12 +0700
Ryan Joseph wrote:
>[...]
> type
> TTileSortingFlag = (kTileSortingStatic,
> kTileSortingRamp,
> kTileSortingIgnore,
> kTileSortingParticle,
>
> On Feb 21, 2018, at 3:45 PM, Mattias Gaertner
> wrote:
>
> I think this would be confusing:
>
> {$scopedenums on}
> type
> TMyType = (A, B, C);
> {$scopedenums off}
> var
> A: integer;
>
> procedure DoThis (t: TMyType; i: integer);
> begin
> end;
>
> DoThis(A,A);
yes it would be.
when i compile in Lazarus the Reportdesigner with activated RangeCheck
it gives a lot of runtimeerror with rangeerrors.
The definition is TFPReportColor = type UInt32;
Loading and saving in JSON is done by
function ReadInteger(AName: String; ADefault: Integer): Integer; override;
function Wri
> On Feb 21, 2018, at 2:57 PM, Michael Van Canneyt
> wrote:
>
> The job of the compiler is to create correct code. Not to ensure you write
> readable code. Every feature that is introduced
> offers more scope for abuse (generics jump to mind).
I think you may change your mind if you had to t
On Wed, 21 Feb 2018 09:38:17 +0700
Ryan Joseph wrote:
>[...]Doesn’t the compiler know the type and can infer “A” is relative to the
>scoped enum? I understand there’s a possibility for name conflicts but you
>could just use the full name in that case.
I think this would be confusing:
{$scoped
33 matches
Mail list logo