Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2009-09

FPC reference manual.

8 messages · 5 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Pascal

Hello.
I'm new to FPC.
I've used TP for many years up to TP7 but not Delphi. Then I came to Ada.
FPC seems to bring many enhancements to TP.
First I'm reading some documentation ;-)
I'm looking for a way to program with Cocoa on Mac.

When reading reference guide for Free Pascal, version 2.2.4, I have some questions or noticed little mistakes in:
§1.6 Numbers:
- octal digit is used but not described, maybe something like --- octal digit --- 0 .. 8 ---
- signed number is described but not used later
§ 2.2 Typed constants:
- where are described what are constant, address constant, array constant, record constant, procedural constant ?
§ 4.6 Properties:
- nodefault is not listed in reserved keywords ?
- property definition is not referenced, should be in 13.4 declaration part ?
§ 5.4 Constructors and destructors
- qualified method identifier is not described, maybe like --- qualified method identifier --- identifier ----

^------ . -------|
§ 6.1 Class definitions:
- Class reference type seems to be class of class type "identifier".
- What are two different descriptions of method definition ? seen in 6.1 and 6.3.1
§ 9.1 Expression syntax:
- variable reference is not described in factor
§ 9.2 Function calls:
- method designator and qualified method designator are not described § 11.4 Parameter lists:
- out parameter is written two times in syntax diag § 11.4.1 Value parameters:
- default parameter value is not described
§ 12.2 Operator declarations:
- does parameter list stand for formal parameter list ?
- operator definition is not referenced, should be in 13.4 declaration part?
§ 13.6 Libraries:
- exports clause is not referenced where should it be used? § 14.1 The raise statement:
- exception instance is not described

Hope this help, best, Pascal.
http://blady.pagesperso-orange.fr

Reply by email

Michael Van Canneyt
to Pascal: Hello. I'm new to FPC. I've used TP for many years up to TP7 but not Delphi. Then I came…
Pascal wrote 7 lines
Hello. I'm new to FPC. I've used TP for many years up to TP7 but not Delphi. Then I came to Ada. FPC seems to bring many enhancements to TP. First I'm reading some documentation ;-) I'm looking for a way to program with Cocoa on Mac.

Thank you for the remarks.
I'm currently updating the documentation and I will take your remarks into account.

Show quoted text 9 lines
When reading reference guide for Free Pascal, version 2.2.4, I have some questions or noticed little mistakes in: §1.6 Numbers: - octal digit is used but not described, maybe something like --- octal digit --- 0 .. 8 --- - signed number is described but not used later § 2.2 Typed constants: - where are described what are constant, address constant, array constant, record constant, procedural constant ? § 4.6 Properties: - nodefault is not listed in reserved keywords ?

It is not a keyword. Modifiers are not reserved keywords.

Show quoted text 8 lines
- property definition is not referenced, should be in 13.4 declaration part ? § 5.4 Constructors and destructors - qualified method identifier is not described, maybe like  --- qualified method identifier --- identifier ----                                                                ^------ . -------| § 6.1 Class definitions: - Class reference type seems to be class of class type "identifier". - What are two different descriptions of method definition ? seen in 6.1 and 6.3.1

One is just more detailed.

Show quoted text 15 lines
§ 9.1 Expression syntax: - variable reference is not described in factor § 9.2 Function calls: - method designator and qualified method designator are not described § 11.4 Parameter lists: - out parameter is written two times in syntax diag § 11.4.1 Value parameters: - default parameter value is not described § 12.2 Operator declarations: - does parameter list stand for formal parameter list ? - operator definition is not referenced, should be in 13.4 declaration part? § 13.6 Libraries: - exports clause is not referenced  where should it be used? § 14.1 The raise statement: - exception instance is not described

I will take a closer for pointing these things out, that's very helpful.

Michael.

Reply by email

Marco van de Voort
to Michael Van Canneyt

In our previous episode, Michael Van Canneyt said:

Show quoted text 9 lines
> I'm new to FPC. > I've used TP for many years up to TP7 but not Delphi. > Then I came to Ada. > FPC seems to bring many enhancements to TP. > First I'm reading some documentation ;-) > I'm looking for a way to program with Cocoa on Mac. Thank you for the remarks. I'm currently updating the documentation and I will take your remarks into account.

As we are talking about the ref docs:

I'm mostly ready with the keyword updates to ref.tex btw. and the textmode IDE now supports cross-chm links.

I yesterday updated the CHM snapshot at http://www.stack.nl/~marcov/doc-chm.zip

While working on this, I stumbled on a new problem, how to deal with multiple occurances of keywords in different CHMs.

Within (fpdoc) CHMs these are disambiguated with child nodes in the index, but this isn't possible cross-CHM.

For the normal docs, I don't know how \keywordlink works, but it would great if it could also dump the topic title to the .kwd file. Even though the prog/user/tex index is small, there are duplicates (like CLASS, VAR and CONST which have multiple meanings)

The problem is worse with FPDOC. If you merge multiple CHMs into a general index, and two CHMs contain the same keyword, there is not much info to disambiguate. Maybe all keywords in fpdoc should have context, afaik one can set a visibility on sub-items in cases where this is annoying.

Pierre probably also encountered this, and loaded topic titles to disambiguate, but this delays loading the main index noticably (several seconds) on modern hardware. Apparantly the number of topics grew harder than the hardware became faster :-)

A different solution would be to simply cache the index. More generic, more powerful, but also more work :-)

Reply by email

Pascal

Hello Michael.

I've some more questions about modifiers and keywords :

OTHERWISE
GENERIC
STORED
IMPLEMENTS
MESSAGE
STATIC
BITPACKED
SPECIALIZE
=> are they keywords ?
They missing in keyword lists.
In which list TP ? Delphi ? FPC ?

OVERLOAD
SAVEREGISTERS
SOFTLOAD
VARARGS
INTERRUPT
NODEFAULT
CVAR
RESSOURCESTRING
DEPRECATED
EXPERIMENTAL
PLATFORM
UNIMPLEMENTED
=> are they modifiers ?
They missing in modifier lists.

OTH, Pascal.
http://blady.pagesperso-orange.fr

Show quoted text 29 lines
From: Michael Van Canneyt Subject: Re: [fpc-pascal] FPC reference manual. On Sun, 6 Sep 2009, Pascal wrote: > Hello. > I'm new to FPC. > I've used TP for many years up to TP7 but not Delphi. > Then I came to Ada. > FPC seems to bring many enhancements to TP. > First I'm reading some documentation ;-) > I'm looking for a way to program with Cocoa on Mac. Thank you for the remarks. = I'm currently updating the documentation and I will take your remarks into = account. ... I will take a closer look at these. Thanks for pointing these things out, that's very helpful. Michael.

Reply by email

Michael Van Canneyt
to Pascal
Pascal wrote 14 lines
Hello Michael. I've some more questions about modifiers and keywords : OTHERWISE GENERIC STORED IMPLEMENTS MESSAGE STATIC BITPACKED SPECIALIZE => are they keywords ? They missing in keyword lists.

That's because they are not keywords.

Show quoted text 16 lines
In which list TP ? Delphi ? FPC ? OVERLOAD SAVEREGISTERS SOFTLOAD VARARGS INTERRUPT NODEFAULT CVAR RESSOURCESTRING DEPRECATED EXPERIMENTAL PLATFORM UNIMPLEMENTED => are they modifiers ? They missing in modifier lists.

I will add them.

Michael.

Reply by email

Pascal

Hello Michael.

I really don't want to be too much annoying but you could believe it ;-) I'm updating Pascal to Ada translator (http://sourceforge.net/ projects/p2ada/) to a more modern Pascal syntax as FPC is. As I'm coding the grammar based on FPC, I'm asking some questions regarding FPC language reference manual.

- 1.1 Symbols
Semicolon and apostrophe are missing as single specific characters. .. ** are missing as specific pair characters.
What about @@ defined in TP 7.0 manual?
- 1.3.1 Turbo Pascal reserved words
absolute is also in 1.3.4 Modifiers, not a keyword? on, operator, reintroduce, self are not TP 7.0 keywords, may be Delphi or FPC?
- 1.3.2 Delphi reserved words
packed is already defined in 1.3.1
- 3.1.1 Ordinal types
There is no chart for ordinal type, maybe:
ordinal type : ordinal type identifier | enumerated type | subrange type
- 3.3 Structured Types
packed is defined for all structured type in TP 7.0, isn't it the case for set type and file type in FPC?
- 3.4 Pointers
Is string keyword allowed in identifier?
- 3.3.2 Record types
in variant char, the comma may be inside the loop?
- 3.6 Procedural types
What is the purpose of "of object"?
What is definition of result type? Is it only identifier? Is keyword string accepted?
- 4.2 Variable Declaration
May "identifier list" be more suitable than identifier alone? hintdirective is already included in variable modifiers.
- 5.4 Constructors and destructors
Should constructor and destructor declaration end by semicolon.
- 5.5.1 Methods Declaration
In TP manual virtual may be followed by integer constant. Is it supported by FPC?
- 8.3 Generic class specialization
Is string keyword allowed in identifier list?
- 9.1 Expression syntax
Should first * be replaced by <.
- 9.4 Value typecasts
Is string keyword allowed in identifier?
- 9.7 The @ operator
Is @@ operator allowed as in TP7.0?
- 10 Statements
Is inline directive allowed as in TP7.0?
- 10.2.8 Exception Statements
Does "exception statement" stand for try except statement or try finally statement?
- 10.2.2 The Case statement
Should "statement list" be replaced by statement alone in else part?
- 10.2.7 The With statement
with keyword should be added to chart.
- 11.1 Procedure declaration
Is inline directive allowed in subroutine block as in TP7.0?
- 11.4 Parameter lists
Shouldn't "formal parameter list" have an empty possibility? In parameters, is string keyword allowed in type identifier?
- 11.9 Modifiers
Should near and far be allowed even not used?
- 13 Programs, units, blocks
Shouldn't pascal source code define as either program, unit or library?

HTH, Thanks for your clarifications, Pascal.
http://blady.pagesperso-orange.fr

Le 14 sept. 09 à 12:00, a
écrit :

Show quoted text 48 lines
From: Michael Van Canneyt Subject: Re: [fpc-pascal] FPC reference manual. To: FPC-Pascal users discussions Message-ID: Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed On Sun, 13 Sep 2009, Pascal wrote: > Hello Michael. > > I've some more questions about modifiers and keywords : > > OTHERWISE > GENERIC > STORED > IMPLEMENTS > MESSAGE > STATIC > BITPACKED > SPECIALIZE > => are they keywords ? > They missing in keyword lists. That's because they are not keywords. > In which list TP ? Delphi ? FPC ? > > OVERLOAD > SAVEREGISTERS > SOFTLOAD > VARARGS > INTERRUPT > NODEFAULT > CVAR > RESSOURCESTRING > DEPRECATED > EXPERIMENTAL > PLATFORM > UNIMPLEMENTED > => are they modifiers ? > They missing in modifier lists. I will add them. Michael.

Reply by email

Ralf A. Quint
to Pascal
Pascal wrote 5 lines
Hello Michael. I really don't want to be too much annoying but you could believe it ;-) I'm updating Pascal to Ada translator (http://sourceforge.net/ projects/p2ada/) to a more modern Pascal syntax as FPC is.

You might want to remove the blank in the URL above... ;-)

Ralf

Reply by email