Gerhard Scholz via fpc-pascal said on Sat, 16 Dec 2023 20:07:45 +0100
>I never had the problem because before the else I always inserted a ";"
I know it's 50+ years too late for me to submit ideas for the Pascal
language, but in my perfect world you could put a semicolon at the end
of anything,
Am 17.12.2023 um 16:36 schrieb Adriaan van Os via fpc-pascal:
As the otherwise-clause is not in ISO-7185 Pascal, it seems more
plausible that Borland invented the else-clause (without semicolon)
independently. All other Pascals I have looked at, use an
otherwise-clause (with an obligatory sem
Tony Whyman via fpc-pascal wrote:
Back in the early eighties, I worked at ICL and we made extensive use of
the Prospero Pascal compiler building embedded systems based on the Z80
microprocessor. I still have a 1988 edition of the language
specification, and this uses EBNF to define the case st
Am 17.12.2023 um 06:12 schrieb Adriaan van Os via fpc-pascal:
Anyway, the innocent looking case-statement does have some interesting
aspects.
Indeed.
My Stanford compiler tries to be portable across platforms;
due to its IBM mainframe heritage even on platforms that have "strange"
charact
I find the idea of a "closest containing value" rather weird. For me, programming is strict logic,
not finding something "closest".
What I wrote here, is nonsense. "Closest containing" is rather a grammatical concept, that I
misunderstood.
Regards,
Adriaan van Os
__
Tony Whyman via fpc-pascal wrote:
Prospero Pascal was close to ISO Pascal (although I have lost my
original copy of ISO Pascal) and I would guess that the above is copied
from ISO Pascal.
You can find the ISO-7185 document on the internet, just search for
"iso7185.pdf".
A less known aspect
On 16/12/2023 19:07, Gerhard Scholz via fpc-pascal wrote:
ELSE/OTHERWISE
I assume that came historically; the first implementation of a PASCAL
compiler I have seen had no else or otherwise in the case startement.
Some ater dialects introduced ELSE, other dialect(s) used OTHERWISE,
FPC then a
the problem because before the else I always inserted a ";"
----- Original Message -
From: "Adriaan van Os via fpc-pascal"
To: "FPC-Pascal users discussions"
Cc: "Adriaan van Os"
Sent: Thursday, December 14, 2023 4:53 PM
Subject: [fpc-pascal] ca
On Fri, 15 Dec 2023, Adriaan van Os wrote:
Michael Van Canneyt via fpc-pascal wrote:
The fact that the semicolon before the else is optional ?
I don't see a semicolon in the formal syntax.
This works:
OK, than an optional semicolon must be added to the rule
exceptionhandlers = [ ex
Jean SUZINEAU via fpc-pascal wrote:
Le 15/12/2023 à 10:39, Adriaan van Os via fpc-pascal a écrit :
I don't see a semicolon in the formal syntax.
May be included in the ' "DO" statement ' ?
No, have a look at the syntax diagrams, statements never end with a semicolon.
Regards,
Adriaan van Os
Michael Van Canneyt via fpc-pascal wrote:
The fact that the semicolon before the else is optional ?
I don't see a semicolon in the formal syntax.
This works:
OK, than an optional semicolon must be added to the rule
exceptionhandlers = [ exception-handler { ";" exception-handler } [ ";"
Le 15/12/2023 à 10:39, Adriaan van Os via fpc-pascal a écrit :
I don't see a semicolon in the formal syntax.
May be included in the ' "DO" statement ' ?
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/ma
On Fri, 15 Dec 2023, Adriaan van Os via fpc-pascal wrote:
Michael Van Canneyt via fpc-pascal wrote:
On Fri, 15 Dec 2023, Adriaan van Os via fpc-pascal wrote:
Note that the same ambiguity exists in the syntax (and
this is less well known)
exceptionhandlers = [ exception-handler { ";"
Michael Van Canneyt via fpc-pascal wrote:
On Fri, 15 Dec 2023, Adriaan van Os via fpc-pascal wrote:
Note that the same ambiguity exists in the syntax
(and this is less well known)
exceptionhandlers = [ exception-handler { ";" exception-handler } [
"ELSE" statement-list ] | statement-list
On Fri, 15 Dec 2023, Adriaan van Os via fpc-pascal wrote:
Note that the same ambiguity exists in the syntax (and
this is less well known)
exceptionhandlers = [ exception-handler { ";" exception-handler } [ "ELSE"
statement-list ] | statement-list ] .
exception-handler = "ON" [ identifier
Note that the same ambiguity exists in the syntax (and this
is less well known)
exceptionhandlers = [ exception-handler { ";" exception-handler } [ "ELSE" statement-list ] |
statement-list ] .
exception-handler = "ON" [ identifier ":" ] class-type-identifier "DO"
statement .
as ends with
ber 14, 2023 3:16 PM
To: fpc-pascal@lists.freepascal.org
Cc: Martin Wynne
Subject: Re: [fpc-pascal] case statement
I've been using ELSE in IF statements and in CASE statements for 25 years
without realising there was a problem. What a dim-wit I have been.
Martin.
__
I've been using ELSE in IF statements and in CASE statements for 25
years without realising there was a problem. What a dim-wit I have been.
Martin.
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailma
James Richters via fpc-pascal wrote:
I didn’t know there was such a thing as OTHERWISE. Is there any functional
difference between OTHERWISE and ELSE?
No. It is just that OTHERWISE doesn't have the IF-THEN-ELSE ambiguity. Macintosh Pascal compilers
had OTHERWISE but not ELSE. Maybe, OTHERWIS
James Richters via fpc-pascal schrieb am
Do., 14. Dez. 2023, 20:13:
> I didn’t know there was such a thing as OTHERWISE. Is there any
> functional difference between OTHERWISE and ELSE?
>
"otherwise" is what had been defined by ISO Extended Pascal for the
cause-statement.
Aside from not having
I didn’t know there was such a thing as OTHERWISE. Is there any functional
difference between OTHERWISE and ELSE?
James
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Michael Van Canneyt via fpc-pascal wrote:
On Thu, 14 Dec 2023, Adriaan van Os via fpc-pascal wrote:
I am looking in detail at the syntax diagrams in the Freepascal
Language Reference (version 3.2.0)
Section 13.2.2 discusses the case-statement. Translated to EBNF (WSN)
the syntax is
cas
On Thu, 14 Dec 2023, Adriaan van Os via fpc-pascal wrote:
I am looking in detail at the syntax diagrams in the Freepascal Language
Reference (version 3.2.0)
Section 13.2.2 discusses the case-statement. Translated to EBNF (WSN) the
syntax is
case-statement = "CASE" expression "OF" case
On Thu, Dec 14, 2023 at 5:01 PM Adriaan van Os via fpc-pascal
wrote:
> I always use "OTHERWISE instead of ELSE, but that's my personal
> preference.
+1
Seeing OTHERWISE in source code just makes me smile.
--
Bart
___
fpc-pascal maillist - fpc-pasc
I am looking in detail at the syntax diagrams in the Freepascal Language
Reference (version 3.2.0)
Section 13.2.2 discusses the case-statement. Translated to EBNF (WSN) the
syntax is
case-statement = "CASE" expression "OF" case { ";" case } [ else-part ] [ ";" ]
.
case = constant [ ".." con
> On Jan 20, 2022, at 8:10 PM, Ryan Joseph wrote:
>
> I just check at https://gitlab.com/freepascal.org/fpc/source/-/merge_requests
> and I don't see my merge request appeared. If it were GitHub I would expect
> to see it there. What did I do wrong?
So what I did was created a merge request
> On Jan 20, 2022, at 9:11 AM, Ryan Joseph wrote:
>
> The problem was my remote for the branch got lost after rebasing but I think
> I fixed it by re-pulling.
>
> It looks like some unrelated commits are included in my merge request but
> maybe that happened because I rebased the repo after
> On Jan 19, 2022, at 8:14 PM, Ryan Joseph wrote:
>
> Ok I got this almost done (mirroring is great I didn't know I could do that)
> and did the rebase which shows the linear history now.
>
> First a question, do I need to do the "rebase main" again before I push to
> remote or does it stay
Ok I got this almost done (mirroring is great I didn't know I could do that)
and did the rebase which shows the linear history now.
First a question, do I need to do the "rebase main" again before I push to
remote or does it stay this way now?
Problem is I go to push the changes to the my remo
On Wed, 19 Jan 2022, Ryan Joseph via fpc-pascal wrote:
On Jan 19, 2022, at 4:19 PM, Ryan Joseph wrote:
Still not following this. Do you need me to do a pull-rebase from main and then
make my pull request?
I used git at work everyday but I'm still a newbie in many ways. Reading this
no
> On Jan 19, 2022, at 4:19 PM, Ryan Joseph wrote:
>
> Still not following this. Do you need me to do a pull-rebase from main and
> then make my pull request?
I used git at work everyday but I'm still a newbie in many ways. Reading this
now but I'm confused because it seems too late. Please p
> On Jan 19, 2022, at 4:15 PM, Michael Van Canneyt
> wrote:
>
> It's explained in the page that Sven referred to ?
>
> It's only when you merge into your feature branch from the main branch that
> you will see an effect.
Still not following this. Do you need me to do a pull-rebase from main
On Wed, 19 Jan 2022, Ryan Joseph via fpc-pascal wrote:
On Jan 19, 2022, at 1:26 PM, Sven Barth wrote:
We also take merge requests. If you have a fork anyway, then a merge request is
probably easier. Though you need to have your repository set up to use rebasing
instead of merging, see h
> On Jan 19, 2022, at 1:26 PM, Sven Barth wrote:
>
> We also take merge requests. If you have a fork anyway, then a merge request
> is probably easier. Though you need to have your repository set up to use
> rebasing instead of merging, see here:
> https://wiki.freepascal.org/FPC_git#Update
Am 19.01.2022 um 02:48 schrieb Ryan Joseph via fpc-pascal:
On Jan 18, 2022, at 5:28 AM, Sven Barth wrote:
The values will have the same differences between each other upon each start so
ideally this would work anyway, but if one also throws dynamic packages into
the mix things would get mes
> On Jan 18, 2022, at 5:28 AM, Sven Barth wrote:
>
> The values will have the same differences between each other upon each start
> so ideally this would work anyway, but if one also throws dynamic packages
> into the mix things would get messed up. So better stay with the if-clauses.
Here's
Am 17.01.2022 um 13:58 schrieb Ryan Joseph via fpc-pascal:
On Jan 17, 2022, at 5:09 PM, Sven Barth wrote:
The VMT writer already does that, cause the VMT pointer is required for each
constructor call.
The pointer to the VMT table is just PVmt(self) right? If I make a program and
do:
writ
> On Jan 17, 2022, at 5:09 PM, Sven Barth wrote:
>
> The VMT writer already does that, cause the VMT pointer is required for each
> constructor call.
>
The pointer to the VMT table is just PVmt(self) right? If I make a program and
do:
writeln(PtrUInt(TObject.ClassType));
the address chan
Ryan Joseph via fpc-pascal schrieb am
Mo., 17. Jan. 2022, 08:53:
>
>
> > On Jan 17, 2022, at 1:55 PM, Sven Barth
> wrote:
> >
> > Question then is how you get the VMT address as a constant at compile
> time.
> >
> > I'll need to get back to you with that.
> >
>
> I didn't test yet but I think wh
> On Jan 17, 2022, at 1:55 PM, Sven Barth wrote:
>
> Question then is how you get the VMT address as a constant at compile time.
>
> I'll need to get back to you with that.
>
I didn't test yet but I think what you're saying is that VMT writer would need
to have generated this address in ad
Ryan Joseph via fpc-pascal schrieb am
Mo., 17. Jan. 2022, 02:38:
>
>
> > On Jan 16, 2022, at 11:15 PM, Sven Barth
> wrote:
> >
> > The class type already is a unique "ID" for each class type when doing
> an equal comparison. You can essentially take the address of the VMT as the
> constant value
> On Jan 16, 2022, at 11:15 PM, Sven Barth wrote:
>
> The class type already is a unique "ID" for each class type when doing an
> equal comparison. You can essentially take the address of the VMT as the
> constant values that the loaded value is compared against.
Does that look something lik
Am 16.01.2022 um 15:25 schrieb Ryan Joseph via fpc-pascal:
On Jan 16, 2022, at 9:01 PM, Ryan Joseph wrote:
case PtrUInt(o.ClassType) of
4500656856: writeln('TObject');
end;
I may have spoken too soon and without thinking the through clearly (it's
getting late here!). For this to wor
> On Jan 16, 2022, at 9:01 PM, Ryan Joseph wrote:
>
> case PtrUInt(o.ClassType) of
>4500656856: writeln('TObject');
> end;
I may have spoken too soon and without thinking the through clearly (it's
getting late here!). For this to work we would need a unique ID in the RTTI,
right? I don
> On Jan 16, 2022, at 8:18 PM, Ryan Joseph wrote:
>
> https://gitlab.com/genericptr/free-pascal/-/commits/case_label_classref
I just realized too late that the way I implemented this may be not the best
idea. If the class type had an ordinal representation then you could use a
normal case st
> On Jan 16, 2022, at 8:38 PM, Marco van de Voort via fpc-pascal
> wrote:
>
> What does it print in this case? I mean tobject matches, and
> tinterfacedobject too.
>
> The most logic solution would be to only run the most specialized case?
It would print the name of the class if it didn't e
On 16-1-2022 14:18, Ryan Joseph via fpc-pascal wrote:
I had some fun today on my day off and managed to actually implement this based
on the if-statement based string case labels. Is the compiler team interested
in this feature? I think it's a clearly useful addition to OOP and an
appropriate
I had some fun today on my day off and managed to actually implement this based
on the if-statement based string case labels. Is the compiler team interested
in this feature? I think it's a clearly useful addition to OOP and an
appropriate new use of the case statement.
https://gitlab.com/gener
> On Jan 16, 2022, at 2:35 PM, Michael Van Canneyt via fpc-pascal
> wrote:
>
>
> They are.
>
> No "is", because then the order of the label will start to matter, and that
> runs contrary
> to the case statement's intent.
oh of course they are, I don't know why I forgot that. :P
Regards,
On Sun, 16 Jan 2022, Ryan Joseph via fpc-pascal wrote:
On Jan 16, 2022, at 9:21 AM, Ryan Joseph wrote:
There is a possibility for using "as" operator also though
oops I mean "is" operator. Not sure if these are technically different from
ClassType = ClassType though...
They are.
> On Jan 16, 2022, at 9:21 AM, Ryan Joseph wrote:
>
> There is a possibility for using "as" operator also though
oops I mean "is" operator. Not sure if these are technically different from
ClassType = ClassType though...
Regards,
Ryan Joseph
_
> On Jan 15, 2022, at 3:24 PM, Michael Van Canneyt via fpc-pascal
> wrote:
>
> I don't see how an inline variable helps with the casting mess. You'll
> always need a cast.
>
> What I do is Var
> MyInstance : TObject;
> MyNeededClass : TMyNeededClass absolute myInstance:
Yes that's the best
On Sat, 15 Jan 2022, Ryan Joseph via fpc-pascal wrote:
On Jan 15, 2022, at 8:30 AM, Michael Van Canneyt via fpc-pascal
wrote:
I saw a new syntax in Swift which I thought was clever and fits a pattern
I've seen before. Basically it's a case statement for class types which
lets you branc
> On Jan 15, 2022, at 8:30 AM, Michael Van Canneyt via fpc-pascal
> wrote:
>
>> I saw a new syntax in Swift which I thought was clever and fits a pattern
>> I've seen before. Basically it's a case statement for class types which
>> lets you branch depending on which class type the class insta
On Sat, 15 Jan 2022, Ryan Joseph via fpc-pascal wrote:
I saw a new syntax in Swift which I thought was clever and fits a pattern
I've seen before. Basically it's a case statement for class types which
lets you branch depending on which class type the class instance is at run
time.
I think S
I saw a new syntax in Swift which I thought was clever and fits a pattern I've
seen before. Basically it's a case statement for class types which lets you
branch depending on which class type the class instance is at run time.
I wonder if this could be implemented in FPC? The syntax would be kin
In our previous episode, Ryan Joseph said:
> >
> > I think it is important to differentiate between a language feature
> > and its common implementation. Perhaps case statements with variables
> > make sense? Of course, that doesn't mean anyone is going to add them.
>
> I?ve been programming Pasc
> On Oct 29, 2018, at 5:24 PM, R0b0t1 wrote:
>
> I think it is important to differentiate between a language feature
> and its common implementation. Perhaps case statements with variables
> make sense? Of course, that doesn't mean anyone is going to add them.
I’ve been programming Pascal sinc
On 29/10/2018 11:24, R0b0t1 wrote:
I think it is important to differentiate between a language feature
and its common implementation. Perhaps case statements with variables
make sense? Of course, that doesn't mean anyone is going to add them.
"case" also includes a compile time check, that case
On Mon, Oct 29, 2018 at 11:20 AM Michael Van Canneyt
wrote:
>
> > I tried today to make a case that used variables instead of constants and
> > was surprised to get an error. I’m sure this been true since the 80’s but
> > why don’t cases allow variables??? I thought a case statement was just a
> >
> I tried today to make a case that used variables instead of constants and
> was surprised to get an error. I’m sure this been true since the 80’s but
> why don’t cases allow variables??? I thought a case statement was just a
> group of if..else blocks in succession.
Case has never allowed variab
Ryan Joseph schrieb am Mo., 29. Okt. 2018,
10:41:
> I tried today to make a case that used variables instead of constants and
> was surprised to get an error. I’m sure this been true since the 80’s but
> why don’t cases allow variables??? I thought a case statement was just a
> group of if..else
I tried today to make a case that used variables instead of constants and was
surprised to get an error. I’m sure this been true since the 80’s but why don’t
cases allow variables??? I thought a case statement was just a group of
if..else blocks in succession.
Regards,
Ryan Joseph
Marco van de Voort wrote:
In our previous episode, Sven Barth said:
=== example end ===
Alternatively if you don't need to check the hierarchy, but can live
with an exact match you can do this:
=== example begin ===
procedure checkLibrariesAndConnect(db: TSQLConnection);
begin
case Lower
On 3/1/2013 17:57, Sven Barth wrote:
[...]
Alternatively if you don't need to check the hierarchy, but can live with an
exact match you can do this:
=== example begin ===
procedure checkLibrariesAndConnect(db: TSQLConnection);
begin
case LowerCase(db.ClassName) of
// Note: .ClassName won't work
In our previous episode, Sven Barth said:
> === example end ===
>
> Alternatively if you don't need to check the hierarchy, but can live
> with an exact match you can do this:
>
> === example begin ===
>
> procedure checkLibrariesAndConnect(db: TSQLConnection);
> begin
>case LowerCase(db.Cl
Sven Barth wrote:
On 01.03.2013 23:35, Mark Morgan Lloyd wrote:
Given a procedure definition like
procedure checkLibrariesAndConnect(db: TSQLConnection);
is there a more elegant way of performing type-specific actions than
begin
if db is TPQConnection then begin
end;
if db is TIBConn
On 01.03.2013 23:35, Mark Morgan Lloyd wrote:
Given a procedure definition like
procedure checkLibrariesAndConnect(db: TSQLConnection);
is there a more elegant way of performing type-specific actions than
begin
if db is TPQConnection then begin
end;
if db is TIBConnection then begin
Given a procedure definition like
procedure checkLibrariesAndConnect(db: TSQLConnection);
is there a more elegant way of performing type-specific actions than
begin
if db is TPQConnection then begin
end;
if db is TIBConnection then begin
end
end { checkLibrariesAndConnect } ;
i.e. some
On Sat, 24 Nov 2012, Howard Page-Clark wrote:
Describing the Case statement The FPLanguageReference.pdf 10.2.2 says:
The constants appearing in the various case parts must be known at
compile-time, and can be of the following types : enumeration types, Ordinal
types (except boolean), and ch
Describing the Case statement The FPLanguageReference.pdf 10.2.2 says:
The constants appearing in the various case parts must be known at
compile-time, and can be of the following types : enumeration types,
Ordinal types (except boolean), and chars.
Why the "except boolean"? I find the compil
On Oct 8, 2009, at 9:12 AM, Jürgen Hestermann wrote:
And I don't know any other Pascal Compiler who does any checks in
this direction. Do some?
I don't know, but ADA reportedly does.
I don't know the differences to Pascal. Does it have the same syntax
for variant records?
FWIW, here
"Jürgen Hestermann" :
> >> And I don't know any other Pascal Compiler who does any checks in
> >> this direction. Do some?
> > I don't know, but ADA reportedly does.
Yes, but the semantics of discriminants is slightly different than in PASCAL.
> I don't know the differences to Pascal. Does it ha
And I don't know any other Pascal Compiler who does any checks in this
direction. Do some?
I don't know, but ADA reportedly does.
I don't know the differences to Pascal. Does it have the same syntax for
variant records?
Such a feature definitely seems useful to me.
Of course it would b
Given that the OP was asking about learning, maybe it would be worth
mentioning that the way we normally have "data structures which hold
different data" these days is by polymorphism in objects or classes.
Instead of having an array of variant records, each of which might hold
a description of
On 07/10/2009 16:39, Jürgen Hestermann wrote:
IIRC, there is a difference. With the second declaration the compiler
can add a run-time check that the correct memebrs are accessed based
on the value of X.
Unfortunately, I cannot find the compiler switch.
FPC has no support for this.
And I d
Jonas Maebe schrieb:
>
> On 07 Oct 2009, at 17:39, Jürgen Hestermann wrote:
>
>> And I don't know any other Pascal Compiler who does any checks in this
>> direction. Do some?
>
> I don't know, but ADA reportedly does. Such a feature definitely seems
> useful to me.
Afaik GPC does as well?
_
On 07 Oct 2009, at 17:39, Jürgen Hestermann wrote:
And I don't know any other Pascal Compiler who does any checks in
this direction. Do some?
I don't know, but ADA reportedly does. Such a feature definitely seems
useful to me.
Jonas___
fpc-pas
IIRC, there is a difference. With the second declaration the compiler
can add a run-time check that the correct memebrs are accessed based
on the value of X.
Unfortunately, I cannot find the compiler switch.
FPC has no support for this.
And I don't know any other Pascal Compiler who does any
On 07 Oct 2009, at 10:18, Florian Klaempfl wrote:
Vincent Snijders schrieb:
Jonas Maebe schreef:
On 07 Oct 2009, at 09:19, Vincent Snijders wrote:
IIRC, there is a difference. With the second declaration the
compiler
can add a run-time check that the correct memebrs are accessed
based
Vincent Snijders schrieb:
> Jonas Maebe schreef:
>>
>> On 07 Oct 2009, at 09:19, Vincent Snijders wrote:
>>
>>> IIRC, there is a difference. With the second declaration the compiler
>>> can add a run-time check that the correct memebrs are accessed based
>>> on the value of X.
>>>
>>> Unfortunately
Jonas Maebe schreef:
On 07 Oct 2009, at 09:19, Vincent Snijders wrote:
IIRC, there is a difference. With the second declaration the compiler
can add a run-time check that the correct memebrs are accessed based
on the value of X.
Unfortunately, I cannot find the compiler switch.
FPC has no
On 07 Oct 2009, at 09:19, Vincent Snijders wrote:
IIRC, there is a difference. With the second declaration the
compiler can add a run-time check that the correct memebrs are
accessed based on the value of X.
Unfortunately, I cannot find the compiler switch.
FPC has no support for this.
Jürgen Hestermann schreef:
Therefore, there is absolutly no difference between
TFigure = record
X : TShapeList;
case TShapeList of
Rectangle: (Height, Width: Real);
Triangle: (Side1, Side2, Angle: Real);
Circle: (Radius: Real);
On 10/06/2009 06:31 PM, Frank Peelo wrote:
Any new concepts that were introduced, like properties, were applied
only to the new classes and objects were left in a corner, like the
embarrassing relative that you wish you could get rid of, but can't.
However, AFAIK Free Pascal supports properties
On Wed, 2009-10-07 at 07:22 +0200, Jürgen Hestermann wrote:
> Therefore, there is absolutly no difference between
>
> TFigure = record
>X : TShapeList;
>case TShapeList of
> Rectangle: (Height, Width: Real);
> Triangle: (Side1, Side2, Angle: R
AFAIK there has to be some fixed part before the variant, e. g.
TFigure = record
name: string;
case TShapeList of
Rectangle: (Height, Width: Real);
Triangle: (Side1, Side2, Angle: Real);
Circle: (Radius: Real);
Ellipse, Other: ();
end;
The program could then dete
I see. That means if no tag name is given, I should make sure my code
is correct by myself.
Thank you.
2009/10/7 Anton Tichawa :
> On Tue, 2009-10-06 at 23:37 +0800, 章宏九 wrote:
>> Thank you. I saw all the examples you gave, but I still cannot master
>> how to use a variant record without a specif
On Tue, 2009-10-06 at 23:37 +0800, 章宏九 wrote:
> Thank you. I saw all the examples you gave, but I still cannot master
> how to use a variant record without a specified tag.
>
> For example:
> type
> TShapeList = (Rectangle, Triangle, Circle, Ellipse, Other);
> TFigure = record
> case TShap
Thank you. I saw all the examples you gave, but I still cannot master
how to use a variant record without a specified tag.
If you use a specific tag as in
type TFigure = record
case ShapeName : TShapeList of
Rectangle: (Height, Width: Real);
Tr
2009/10/6 章宏九 :
> Thank you. I saw all the examples you gave, but I still cannot master
> how to use a variant record without a specified tag.
>
> For example:
> type
> TShapeList = (Rectangle, Triangle, Circle, Ellipse, Other);
> TFigure = record
> case TShapeList of
> Rectangle: (Height
Thank you. I saw all the examples you gave, but I still cannot master
how to use a variant record without a specified tag.
For example:
type
TShapeList = (Rectangle, Triangle, Circle, Ellipse, Other);
TFigure = record
case TShapeList of
Rectangle: (Height, Width: Real);
Triangl
On 06/10/2009 15:00, Felipe Monteiro de Carvalho wrote:
On Tue, Oct 6, 2009 at 10:13 AM, 章宏九 wrote:
Type
MyRec = Record
X : Longint;
Case byte of
2 : (Y : Longint;
case byte of
3 : (Z : Longint);
);
end;
I think
2009/10/6 Henry Vermaak :
>
> I can't really comment on the scary details, since I'm rubbish at
> object oriented programming :)
And objects aren't deprecated, since the compiler uses them (afaik).
Henry
___
fpc-pascal maillist - fpc-pascal@lists.free
On Tue, Oct 6, 2009 at 10:13 AM, 章宏九 wrote:
> Type
> MyRec = Record
> X : Longint;
> Case byte of
> 2 : (Y : Longint;
> case byte of
> 3 : (Z : Longint);
> );
> end;
I think the cases are useless here. AFAIK th
2009/10/6 章宏九 :
> In the document
> (http://www.freepascal.org/docs-html/ref/refsu15.html#x38-450003.3.2)
> I read the code below:
>
> Type
> MyRec = Record
> X : Longint;
> Case byte of
> 2 : (Y : Longint;
> case byte of
> 3 : (Z : Long
In the document
(http://www.freepascal.org/docs-html/ref/refsu15.html#x38-450003.3.2)
I read the code below:
Type
MyRec = Record
X : Longint;
Case byte of
2 : (Y : Longint;
case byte of
3 : (Z : Longint);
);
I had uploaded the sources to zshare server with the link:
Thanks, I'll have a look at it.
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Hello FPC-Pascal,
Sunday, July 26, 2009, 9:43:06 AM, you wrote:
>> The code is not optimized but if somebody wants to use them please ask
t> Yes please!
I had uploaded the sources to zshare server with the link:
http://www.zshare.net/download/63185150b6099e5d/
The code is not an example of how
Hello FPC-Pascal,
Sunday, July 26, 2009, 9:43:06 AM, you wrote:
t> In your strict sense, AnsiCompareText didn't work either.
Yes, Ansi does not work fine also for some usual languages. But we are
used to "simulate" a comparetext using lowercase(a)=lowercase(b) where
the same character could have
1 - 100 of 135 matches
Mail list logo