Hi,
I was following a discussion in the delphi.non-technical newsgroup.
They raised an issue about distinct types. I tried the following
example under FPC and unexpectedly, FPC doesn't raise any errors!
If you declare a distinct type as follows:
type TMyInteger = type Integer;
The type TMyInte
On Thu, 18 Sep 2008, Graeme Geldenhuys wrote:
> Hi,
>
> I was following a discussion in the delphi.non-technical newsgroup.
> They raised an issue about distinct types. I tried the following
> example under FPC and unexpectedly, FPC doesn't raise any errors!
>
> If you declare a distinct type
On Thu, Sep 18, 2008 at 9:42 AM, Michael Van Canneyt
<[EMAIL PROTECTED]> wrote:
>>
>> The type TMyInteger <> Integer so you are not supposed to be allowed
>> to assign one to the other. Yet you can. See the following program.
>
> But obviously delphi also allows it ? It compiles everything,
> just
On Thu, 18 Sep 2008, Graeme Geldenhuys wrote:
> On Thu, Sep 18, 2008 at 9:42 AM, Michael Van Canneyt
> <[EMAIL PROTECTED]> wrote:
> >>
> >> The type TMyInteger <> Integer so you are not supposed to be allowed
> >> to assign one to the other. Yet you can. See the following program.
> >
> > But ob
In our previous episode, Michael Van Canneyt said:
> And it is also very annoying because
>
> Type
> MyString = type string;
>
> Const
> AString = 'something';
>
> Var
> M : MyString;
>
> begin
> M:=AString;
> end.
>
> Will no longer compile if you are too strict. They should at least
On Thu, 18 Sep 2008, Florian Klaempfl wrote:
> Michael Van Canneyt schrieb:
> >
> > On Thu, 18 Sep 2008, Graeme Geldenhuys wrote:
> >
> > > Hi,
> > >
> > > I was following a discussion in the delphi.non-technical newsgroup.
> > > They raised an issue about distinct types. I tried the following
Michael Van Canneyt schrieb:
On Thu, 18 Sep 2008, Graeme Geldenhuys wrote:
Hi,
I was following a discussion in the delphi.non-technical newsgroup.
They raised an issue about distinct types. I tried the following
example under FPC and unexpectedly, FPC doesn't raise any errors!
If you declare
From: "Florian Klaempfl" <[EMAIL PROTECTED]>
Michael Van Canneyt schrieb:
On Thu, 18 Sep 2008, Graeme Geldenhuys wrote:
Hi,
I was following a discussion in the delphi.non-technical
newsgroup.
They raised an issue about distinct types. I tried the following
example under FPC and unexpectedl
On Thu, Sep 18, 2008 at 10:11 AM, Michael Van Canneyt
<[EMAIL PROTECTED]> wrote:
>
> And it is also very annoying because
>
> Type
> MyString = type string;
>
> Const
> AString = 'something';
>
> Var
> M : MyString;
>
> begin
> M:=AString;
> end.
>
> Will no longer compile if you are too strict
Graeme Geldenhuys schrieb:
On Thu, Sep 18, 2008 at 10:11 AM, Michael Van Canneyt
<[EMAIL PROTECTED]> wrote:
And it is also very annoying because
Type
MyString = type string;
Const
AString = 'something';
Var
M : MyString;
begin
M:=AString;
end.
Will no longer compile if you are too stric
Yury Sidorov schrieb:
From: "Florian Klaempfl" <[EMAIL PROTECTED]>
Michael Van Canneyt schrieb:
On Thu, 18 Sep 2008, Graeme Geldenhuys wrote:
Hi,
I was following a discussion in the delphi.non-technical newsgroup.
They raised an issue about distinct types. I tried the following
example unde
Graeme Geldenhuys schrieb:
> Hi,
>
> I was following a discussion in the delphi.non-technical newsgroup.
> They raised an issue about distinct types. I tried the following
> example under FPC and unexpectedly, FPC doesn't raise any errors!
>
> If you declare a distinct type as follows:
> type TMy
Hello,
The sockets unit for Mac OS X (FPC 2.2.2) does not contain
MSG_NOSIGNAL, which is necessary for the correct functioning of the
Synapse library.
I modifyed the Synapse source (locally) to use $2 for
MSG_NOSIGNAL, which is the same value for FreeBSD/NetBSD.
Note that I have very little
On Thu, Sep 18, 2008 at 11:34 AM, Florian Klaempfl
<[EMAIL PROTECTED]> wrote:
>>
>> That's the whole point - it shouldn't be assignment compatible. You
>> are creating a new MyString type, irrespective of what base-type it
>> was based on. Only MyString types should be assigned to MyString
>> typ
Graeme Geldenhuys schrieb:
eg: #2
type
MyType = type Double;
MyOtherType = type Double;
Otherwise, what's the different between a "alias" type (eg #1) and a
"distinct" type (eg #2)??
As I said: overloading. It means: compatible but not equal. If you want
distinct: use as said, classes
In our previous episode, Felipe Monteiro de Carvalho said:
> The sockets unit for Mac OS X (FPC 2.2.2) does not contain
> MSG_NOSIGNAL, which is necessary for the correct functioning of the
> Synapse library.
>
> I modifyed the Synapse source (locally) to use $2 for
> MSG_NOSIGNAL, which is th
Some searching says it doesn't exist in Mac OS X:
http://lists.apple.com/archives/macnetworkprog/2002/Dec/msg00091.html
But they have an equivalent.
Curiously, my very simple webserver worked when hardcoding the constant =P
http://wiki.lazarus.freepascal.org/Networking#Webserver_example
--
Fe
In our previous episode, Felipe Monteiro de Carvalho said:
> Some searching says it doesn't exist in Mac OS X:
>
> http://lists.apple.com/archives/macnetworkprog/2002/Dec/msg00091.html
>
> But they have an equivalent.
I checked on my 10.4 and it is as there. It is not in the headers, and
SO_nosi
From: "Florian Klaempfl" <[EMAIL PROTECTED]>
Yury Sidorov schrieb:
From: "Florian Klaempfl" <[EMAIL PROTECTED]>
Michael Van Canneyt schrieb:
On Thu, 18 Sep 2008, Graeme Geldenhuys wrote:
Hi,
I was following a discussion in the delphi.non-technical
newsgroup.
They raised an issue about di
Yury Sidorov schrieb:
Yes. But it works only partially. For example the following code is
not compilable:
Well, I wouldn't know either what you expect :)
I expect that compiler will choose DoTest with ansistring parameter in
that case.
What rule do you apply to say this?
//--
type
From: "Florian Klaempfl" <[EMAIL PROTECTED]>
To: "FPC developers' list"
Sent: Thursday, September 18, 2008 4:14 PM
Subject: Re: [fpc-devel] Bug in FPC and declaring distinct types
Yury Sidorov schrieb:
Yes. But it works only partially. For example the following code
is not compilable:
Well,
Yury Sidorov schrieb:
From: "Florian Klaempfl" <[EMAIL PROTECTED]>
To: "FPC developers' list"
Sent: Thursday, September 18, 2008 4:14 PM
Subject: Re: [fpc-devel] Bug in FPC and declaring distinct types
Yury Sidorov schrieb:
Yes. But it works only partially. For example the following code is
On Thu, Sep 18, 2008 at 3:40 PM, Florian Klaempfl
<[EMAIL PROTECTED]> wrote:
>>> What rule do you apply to say this?
>>
>> Compiler treats '1234' as ansistring constant. Therefore ansistring
>> overload must be choosen here.
>
> No, '1234' is taken as generic string constant.
And which type is a g
From: "Florian Klaempfl" <[EMAIL PROTECTED]>
Yury Sidorov schrieb:
From: "Florian Klaempfl" <[EMAIL PROTECTED]>
To: "FPC developers' list"
Sent: Thursday, September 18, 2008 4:14 PM
Subject: Re: [fpc-devel] Bug in FPC and declaring distinct types
Yury Sidorov schrieb:
Yes. But it works only
Florian Klaempfl wrote:
Yury Sidorov schrieb:
Yury Sidorov schrieb:
Yes. But it works only partially. For example the following code
is not compilable:
Well, I wouldn't know either what you expect :)
I expect that compiler will choose DoTest with ansistring parameter
in that case.
What rule
Graeme Geldenhuys schrieb:
On Thu, Sep 18, 2008 at 3:40 PM, Florian Klaempfl
<[EMAIL PROTECTED]> wrote:
What rule do you apply to say this?
Compiler treats '1234' as ansistring constant. Therefore ansistring
overload must be choosen here.
No, '1234' is taken as generic string constant.
And w
Yury Sidorov schrieb:
From: "Florian Klaempfl" <[EMAIL PROTECTED]>
Yury Sidorov schrieb:
From: "Florian Klaempfl" <[EMAIL PROTECTED]>
To: "FPC developers' list"
Sent: Thursday, September 18, 2008 4:14 PM
Subject: Re: [fpc-devel] Bug in FPC and declaring distinct types
Yury Sidorov schrieb:
On Thu, Sep 18, 2008 at 3:50 PM, Yury Sidorov <[EMAIL PROTECTED]> wrote:
>
> It makes implementation of utf8string impossible using this approach...
>
I agree. I created a distinct string type (TfpgString) in fpGUI. That
way I could ensure TfpgString is a UTF-8 string and String is a
AnsiString s
From: "Florian Klaempfl" <[EMAIL PROTECTED]>
Yury Sidorov schrieb:
From: "Florian Klaempfl" <[EMAIL PROTECTED]>
Yury Sidorov schrieb:
From: "Florian Klaempfl" <[EMAIL PROTECTED]>
To: "FPC developers' list"
Sent: Thursday, September 18, 2008 4:14 PM
Subject: Re: [fpc-devel] Bug in FPC and decl
On Thu, Sep 18, 2008 at 3:55 PM, Florian Klaempfl
<[EMAIL PROTECTED]> wrote:
>
> Without any further code, the type 'asdf' is not defined, $H means only
> ansistring might be prefered.
So does that mean if you have {$H+} enabled, then in the example
below, the p1(ansistring) version will be calle
Yury Sidorov schrieb:
We discussed this once and concluded, that something like this hurts
more than it helps because an overloaded assignment operator allows
the compiler always to mess really around :)
Maybe.
But you stated that it is possible to create fully functional utf8string
type f
On Thu, Sep 18, 2008 at 10:51 AM, Florian Klaempfl
<[EMAIL PROTECTED]> wrote:
>
> This is not true. The main purpose is to be able to overload
> functions/operators:
>
> type
> TUTF8String = type ansistring;
>
> enables you to overload all procedure already defined for ansistrings with
> UTF8Strin
Hi,
How far will Unicode support go in FPC when it is one day implemented?
Anybody know if the following is allowed in D2009?
Please add to the list... :-)
eg:
1..) My I have the following class names?
type
TMyåClaß = class(TObject)
end;
2..) What about function
Graeme Geldenhuys wrote:
Please add to the list... :-)
eg:
1..) My I have the following class names?
type
TMyåClaß = class(TObject)
end;
2..) What about function and parameter names?
type
TMyåClaß = class(TObject)
public
property Nã
On Thu, Sep 18, 2008 at 4:45 PM, Graeme Geldenhuys
<[EMAIL PROTECTED]> wrote:
>
> Anybody know if the following is allowed in D2009?
Oops, as a joke I posted the same message in the Delphi newsgroups.
To my *huge* surprise, unicode identifiers _are_ supported in D2009.
I guess CodeGear is a bit a
On Thu, Sep 18, 2008 at 4:45 PM, Graeme Geldenhuys
<[EMAIL PROTECTED]> wrote:
> Hi,
>
> How far will Unicode support go in FPC when it is one day implemented?
> Anybody know if the following is allowed in D2009?
For those that haven't see it yet, here is D2009's take on this...
http://windemo1.c
In our previous episode, Graeme Geldenhuys said:
> > How far will Unicode support go in FPC when it is one day implemented?
> > Anybody know if the following is allowed in D2009?
>
> For those that haven't see it yet, here is D2009's take on this...
>
> http://windemo1.codegear.com/Tiburon/Launc
On 18 Sep 2008, at 11:47, Felipe Monteiro de Carvalho wrote:
The sockets unit for Mac OS X (FPC 2.2.2) does not contain
MSG_NOSIGNAL, which is necessary for the correct functioning of the
Synapse library.
See http://bugs.freepascal.org/view.php?id=9401
Jonas
Op Thu, 18 Sep 2008, schreef Graeme Geldenhuys:
Hi,
How far will Unicode support go in FPC when it is one day implemented?
type
TMyåClaß = class(TObject)
public
property Nãàm: unicodestring read ;
end;
Never say never, but the compiler uses shortstring
Hi,
I'm working on the Apache application (TCustomApacheApplication)
simultaneous request handling.
When the Apache module tries to create additional instances of the web
module I get
`Error: Duplicate name: A component named "FPWebModule1" already exists`
How can we create multiple instanc
On Thu, 18 Sep 2008, ABorka wrote:
> Hi,
>
> I'm working on the Apache application (TCustomApacheApplication) simultaneous
> request handling.
>
> When the Apache module tries to create additional instances of the web module
> I get
> `Error: Duplicate name: A component named "FPWebModule1" al
41 matches
Mail list logo