• Procedure type compatibility

    From cfbsoftware@gmail.com@21:1/5 to ds...@eml.cc on Mon Oct 23 14:57:14 2017
    On Tuesday, October 24, 2017 at 1:10:27 AM UTC+10:30, ds...@eml.cc wrote:

    I neither consider a string an expression, because in Expression 8.1 only variables are considered as operand (I guess that constant designators are considered to be propagated as literal values).
    He left "string" in the grammar because it includes single character constants.


    Are you serious?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Diego Sardina@21:1/5 to cfbso...@gmail.com on Tue Oct 24 09:55:08 2017
    On Monday, October 23, 2017 at 11:57:15 PM UTC+2, cfbso...@gmail.com wrote:

    Are you serious?


    Yes, what is the type of "abc"? What operations are defined for it? If you know nothing about it, how do you put something like this in an expression?

    The only known operation is the compatibility in assignment with array of characters.

    What allowed the possibility of passing literal strings as parameters was the assignment rule for value parameters, that was ruled out in Oberon-07 (except for basic types).


    But I'm happy that you don't have doubts about it, for me reasoning and understanding are important.


    --
    Diego Sardina

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From cfbsoftware@gmail.com@21:1/5 to Diego Sardina on Tue Oct 24 14:28:22 2017
    On Wednesday, October 25, 2017 at 3:25:08 AM UTC+10:30, Diego Sardina wrote:
    On Monday, October 23, 2017 at 11:57:15 PM UTC+2, cfbso...@gmail.com wrote:


    Yes, what is the type of "abc"?

    As you quoted earlier:

    '...strings are (implicitely) regarded and implemented as arrays of characters"

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From August Karlstrom@21:1/5 to Diego Sardina on Wed Oct 25 09:51:53 2017
    On 2017-10-24 18:55, Diego Sardina wrote:
    On Monday, October 23, 2017 at 11:57:15 PM UTC+2, cfbso...@gmail.com wrote:

    Are you serious?


    Yes, what is the type of "abc"?

    I think of a string literal as having type `string'. It's like the
    opposite of BYTE in the sense that there are only constants of this type
    but no variables.

    What operations are defined for it?

    We can't tell simply by reading the language report. In my book, except
    being assigned to character array variables, string literals must be
    allowed to be passed as actual value parameters and be compared with
    character array variables. This is how strings work in Oberon-2.
    Anything less makes the language artificially inconvenient to use and is
    more in line with "Make it as simple ass possible and then simpler".

    If you know nothing about it, how do you put something like this in an expression?

    The same argument can be applied to NIL. It is never mentioned
    explicitly that NIL can be compared with pointer or procedure variables.


    -- August

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Diego Sardina@21:1/5 to cfbso...@gmail.com on Wed Oct 25 02:25:14 2017
    On Tuesday, October 24, 2017 at 11:28:23 PM UTC+2, cfbso...@gmail.com wrote:

    As you quoted earlier:

    '...strings are (implicitely) regarded and implemented as arrays of characters"


    Indeed this doesn't mean strings ARE array of characters.


    On Wednesday, October 25, 2017 at 9:51:54 AM UTC+2, August Karlstrom wrote:

    The same argument can be applied to NIL. It is never mentioned
    explicitly that NIL can be compared with pointer or procedure variables.


    You are right here, indeed in Oberon-2 they added at the end:
    "The relations = and # also apply to BOOLEAN and SET, as well as to pointer and procedure types (including the value NIL)."


    Guys, there is a reason why they improved Oberon-2 report in term of definitions and clarity in a lot of points. That means there was a *concrete problem* while reading the report.


    --
    Diego Sardina

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From cfbsoftware@gmail.com@21:1/5 to Diego Sardina on Wed Oct 25 05:23:55 2017
    On Wednesday, October 25, 2017 at 7:55:14 PM UTC+10:30, Diego Sardina wrote:

    Indeed this doesn't mean strings ARE array of characters.


    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)