Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #122238 > unrolled thread

Re: Statement-Continuation Rule

Started byLawrence D'Oliveiro <ldo@nz.invalid>
First post2024-02-20 06:03 +0000
Last post2024-02-22 10:16 +0000
Articles 4 — 2 participants

Back to article view | Back to comp.lang.javascript

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Statement-Continuation Rule Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-02-20 06:03 +0000
    Re: Statement-Continuation Rule John Harris <niam@jghnorth.org.uk.invalid> - 2024-02-20 11:04 +0000
      Re: Statement-Continuation Rule Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-02-20 19:40 +0000
        Re: Statement-Continuation Rule John Harris <niam@jghnorth.org.uk.invalid> - 2024-02-22 10:16 +0000

#122238 — Re: Statement-Continuation Rule

FromLawrence D'Oliveiro <ldo@nz.invalid>
Date2024-02-20 06:03 +0000
SubjectRe: Statement-Continuation Rule
Message-ID<ur1fbi$2bqel$4@dont-email.me>
Another example. This doesn’t work:

    return
        {
            source : "/autocomplete/search-widget.php",
            select :
                function (event, ui)
                  {
                    $("#select_widget_name").val(ui.item.label)
                    $("#select_widget_id").val(ui.item.value)
                  } /*function*/,
        }

but this does:

    res =
        {
            source : "/autocomplete/search-widget.php",
            select :
                function (event, ui)
                  {
                    $("#select_widget_name").val(ui.item.label)
                    $("#select_widget_id").val(ui.item.value)
                  } /*function*/,
        }
    return res

[toc] | [next] | [standalone]


#122324

FromJohn Harris <niam@jghnorth.org.uk.invalid>
Date2024-02-20 11:04 +0000
Message-ID<ur210q$2f9ce$1@dont-email.me>
In reply to#122238
On 20/02/2024 06:03, Lawrence D'Oliveiro wrote:
> Another example. This doesn’t work:
> 
>      return
>          {
>              source : "/autocomplete/search-widget.php",
>              select :
>                  function (event, ui)
>                    {
>                      $("#select_widget_name").val(ui.item.label)
>                      $("#select_widget_id").val(ui.item.value)
>                    } /*function*/,
>          }

   <snip>

Why do you call it "Statement-Continuation Rule"? Isn't it expression 
evaluation?

   John

[toc] | [prev] | [next] | [standalone]


#122660

FromLawrence D'Oliveiro <ldo@nz.invalid>
Date2024-02-20 19:40 +0000
Message-ID<ur2v78$2lhr7$2@dont-email.me>
In reply to#122324
On Tue, 20 Feb 2024 11:04:57 +0000, John Harris wrote:

> Why do you call it "Statement-Continuation Rule"? Isn't it expression
> evaluation?

No, it’s about when a statement is considered to continue onto another 
line, and when it isn’t.

[toc] | [prev] | [next] | [standalone]


#124082

FromJohn Harris <niam@jghnorth.org.uk.invalid>
Date2024-02-22 10:16 +0000
Message-ID<ur76t0$3qc4j$1@dont-email.me>
In reply to#122660
On 20/02/2024 19:40, Lawrence D'Oliveiro wrote:
> On Tue, 20 Feb 2024 11:04:57 +0000, John Harris wrote:
> 
>> Why do you call it "Statement-Continuation Rule"? Isn't it expression
>> evaluation?
> 
> No, it’s about when a statement is considered to continue onto another
> line, and when it isn’t.

Is that what ECMA 262 calls "automatic semicolon insertion" ?

   John

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.javascript


csiph-web