Re: [fpc-pascal] case statement

2023-12-17 Thread Bernd Oppolzer via fpc-pascal
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

Re: [fpc-pascal] More syntax questions (part 3)

2023-12-17 Thread Adriaan van Os via fpc-pascal
Michael Van Canneyt via fpc-pascal wrote: 28. The documentation for macpas "UNIV" is missing ? I have no idea what this is ? UNIV is macpas specific (as mentioned in Appendix D.6 of the Programmer's Manual) With UNIV, ... ":" [ "ARRAY" "OF" ] type-identifier ... in the syntax

Re: [fpc-pascal] More syntax questions (part 4)

2023-12-17 Thread Adriaan van Os via fpc-pascal
Michael Van Canneyt via fpc-pascal wrote: 37. Shouldn't the macpas "mwpascal" modifier be added to ? call-modifiers = "register" | "cdecl" | "pascal" | "stdcall" | "safecall" | "inline" | "mwpascal" . call-modifiers = "cdecl" | "inline" | "local" | "nostackframe" | "overload" | "pasca

Re: [fpc-pascal] More syntax questions (part 3)

2023-12-17 Thread Adriaan van Os via fpc-pascal
On Sat, 16 Dec 2023, Adriaan van Os via fpc-pascal wrote: More questions about the FreePascal Language Reference (version 3.2.0) part 3 26. Am I correct to assume the following equivalents for rules that I couldn't find a definiton for: formal-parameter-list =

Re: [fpc-pascal] More syntax questions (part 3)

2023-12-17 Thread Adriaan van Os via fpc-pascal
Another use of UNIV is type-compatibility of procedural parameters. For example with function BinaryFind ( theValuePtr : univ UnivPtr; theFirstIndex : Int32; theLastIndex : Int32; function SmallerThan (

Re: [fpc-pascal] More syntax questions (part 4)

2023-12-17 Thread Adriaan van Os via fpc-pascal
Michael Van Canneyt via fpc-pascal wrote: On Sat, 16 Dec 2023, Adriaan van Os via fpc-pascal wrote: More questions about the FreePascal Language Reference (version 3.2.0), part 4 34. Are macpas LEAVE and CYCLE statements undocumented ? Yes. Well, according to Appendix D.6 of the Pro

Re: [fpc-pascal] More syntax questions (part 2)

2023-12-17 Thread Adriaan van Os via fpc-pascal
Michael Van Canneyt via fpc-pascal wrote: On Sat, 16 Dec 2023, Adriaan van Os via fpc-pascal wrote: More questions about the FreePascal Language Reference (version 3.2.0) part 2 17. For the following rules, I couldn't find a definition in the Language Reference. Can I assume they can

Re: [fpc-pascal] method-definition

2023-12-17 Thread Sven Barth via fpc-pascal
Michael Van Canneyt via fpc-pascal schrieb am Sa., 16. Dez. 2023, 09:43: > The requirement for parameters in record constructors I guess comes from > C++ builder by Embarcadero. > There are some limitations imposed by C++. > > Whether they could be dropped in FPC is something Sven Barth should an

Re: [fpc-pascal] case statement

2023-12-17 Thread Adriaan van Os via fpc-pascal
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

[fpc-pascal] Labels

2023-12-17 Thread Adriaan van Os via fpc-pascal
According to Section 13.0 of the FreePascal Language Reference (version 3.2.0) "A label can be an identifier or an integer digit." What may be meant is that a label can be an identifier or an integer digit-sequence (and that's what the compiler accepts) label := digit-sequence

Re: [fpc-pascal] case statement

2023-12-17 Thread Bernd Oppolzer via fpc-pascal
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

Re: [fpc-pascal] More syntax questions (part 3)

2023-12-17 Thread Adriaan van Os via fpc-pascal
Michael Van Canneyt wrote: 32. Are the set operators "include", "exclude" missing in the syntax diagrams ? Is "><" missing (specifically) as set operator in the syntax diagrams ? Include/Exclude are not operators. They are procedure calls. Section 12.8.5 says "Elements can be added or remov