[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.javascript

Definition of a script in JavaScript

ram

2/4/2015 7:36:00 PM

I want to use JavaScript® - not ECMAScript, so my reference is
the Mozilla Developer Network (MDN).

I wanted to know what a script is. For example, In HTML5 we use:

<script src="javascript.js"></script>

Now, let's look at »javascript.js«, assume that it contains:

lo, world" );

This would be a syntax error, ok?

So, there must be some syntax rule (grammar rule) for what
one can write into a script and what not.

I am trying to find this grammar rule. So far, I only found
this in the MDN:

»The HTML <script> element is used to embed or reference an
executable script within an HTML or XHTML document.«
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
But were is the definition of »executable script«?
Where is the grammar rule for »executable script«?

For example, the language C defines what a »translation-unit«
(aka »C source file«) is as follows:

translation-unit:
external-declaration
translation-unit external-declaration

Where does the MDN give the syntax for what one can write
in the file »javascript.js«?

31 Answers

Rock FZYGC

11/4/2010 12:06:00 AM

0

On Nov 3, 5:52 pm, JohnB <johnbo...@tinyworld.co.uk> wrote:
> On Nov 3, 10:36 pm, "Raja, The Great" <zepflo...@yahoo.com> wrote:
>
> > On Nov 3, 3:42 pm, iarwain <iarwai...@hotmail.com> wrote:
>
> > > >"classic rock" is more a radio format than an actual "genre."
>
> > > So Ray said.  Interesting, I wasn't aware that was where the term got
> > > its start.
> > > It's hard for me not to think of it as a legitimate genre however,
> > > especially since it does share some characteristics.
> > > By the way, the Beatles have fallen off a lot of these "classic rock"
> > > stations.  Is that supposed to mean they aren't classic rock?
>
> > They fall under oldies these days... at least the early stuff before
> > Rubber Soul
>
> ... and everything has to have a label, doesn't it?

Why not? There was an oldies station (its gone now) in Houston and
they played Beatles on lot on that. But they hardly play Beatles on
the classic rock station (we have two of them)

moonpie

11/4/2010 1:39:00 PM

0

On Wed, 3 Nov 2010 13:42:06 -0700 (PDT), iarwain
<iarwain_8@hotmail.com> wrote:

>>"classic rock" is more a radio format than an actual "genre."
>
>So Ray said. Interesting, I wasn't aware that was where the term got
>its start.
>It's hard for me not to think of it as a legitimate genre however,
>especially since it does share some characteristics.
>By the way, the Beatles have fallen off a lot of these "classic rock"
>stations. Is that supposed to mean they aren't classic rock?


here in atlanta, they dont get played on the "classic rock" station,
they get played on the "oldies" station

richforman

11/4/2010 3:31:00 PM

0

On Nov 2, 6:54 pm, "Raja, The Great" <zepflo...@gmail.com> wrote:
> On Nov 2, 3:44 pm, poisoned rose <pro...@wipingbottoms.com> wrote:
>
> > "Raja, The" <zepflo...@gmail.com> wrote:
> > > Punk rock is a form of hard rock anyway.
>
> > Oh dear.
>
> > > > I've also wondered if Guns N Roses was the last Classic Rock band.
>
> > > Yes you are right about this.
>
> > There's no "right" answer to such a nebulous question. And classic-rock
> > stations play some bands more recent than GnR. The Black Crowes, Alice
> > in Chains, Pearl Jam, Nirvana, Foo Fighters....
>
> Wrong... I have never heard any one of these on a classic rock
> station.
>

You have never heard The Black Crowes, GnR, Pearl Jam or Nirvana on a
classic rock station, wtf????

richforman

poisoned rose

11/4/2010 7:46:00 PM

0

iarwain <iarwain_8@hotmail.com> wrote:

> >"classic rock" is more a radio format than an actual "genre."
>
> So Ray said. Interesting, I wasn't aware that was where the term got
> its start.
> It's hard for me not to think of it as a legitimate genre however,
> especially since it does share some characteristics.

But you can post to countless bands who have the right sound but aren't
labeled "classic rock" just because they aren't POPULAR enough. When
that variable is in play rather than pure musical style, something is
screwy.

"Top 40" isn't a genre either.

> By the way, the Beatles have fallen off a lot of these "classic rock"
> stations. Is that supposed to mean they aren't classic rock?

It means that a large part of their material isn't "rock" enough for the
format.

Ivan Maximus Lendl

11/4/2010 8:14:00 PM

0

On Nov 4, 10:30 am, richforman <rforma...@msn.com> wrote:
> On Nov 2, 6:54 pm, "Raja, The Great" <zepflo...@gmail.com> wrote:
>
>
>
>
>
> > On Nov 2, 3:44 pm, poisoned rose <pro...@wipingbottoms.com> wrote:
>
> > > "Raja, The" <zepflo...@gmail.com> wrote:
> > > > Punk rock is a form of hard rock anyway.
>
> > > Oh dear.
>
> > > > > I've also wondered if Guns N Roses was the last Classic Rock band.
>
> > > > Yes you are right about this.
>
> > > There's no "right" answer to such a nebulous question. And classic-rock
> > > stations play some bands more recent than GnR. The Black Crowes, Alice
> > > in Chains, Pearl Jam, Nirvana, Foo Fighters....
>
> > Wrong... I have never heard any one of these on a classic rock
> > station.
>
> You have never heard The Black Crowes, GnR, Pearl Jam or Nirvana on a
> classic rock station, wtf????

GNR yes... but nothing else... not in Houston 93.7 (the arrow) or
107.5 (the eagle) . I listen to radio quite often. We have 94.5 the
Buzz which plays alternative rock... but I hate the whiny songs they
play.



iarwain

11/5/2010 1:09:00 PM

0

> It means that a large part of their material isn't "rock" enough for the format.

I've heard a few classic rock stations that will not play any Beatles
except for While My Guitar Gently Weeps. I guess it gets the nod
because of the Clapton connection. And it is one of the more modern
sounding Beatles tracks IMO.

richforman

11/5/2010 4:04:00 PM

0

On Nov 4, 4:14 pm, "Raja, The Great" <zepflo...@yahoo.com> wrote:
> On Nov 4, 10:30 am, richforman <rforma...@msn.com> wrote:
>
>
>
>
>
> > On Nov 2, 6:54 pm, "Raja, The Great" <zepflo...@gmail.com> wrote:
>
> > > On Nov 2, 3:44 pm, poisoned rose <pro...@wipingbottoms.com> wrote:
>
> > > > "Raja, The" <zepflo...@gmail.com> wrote:
> > > > > Punk rock is a form of hard rock anyway.
>
> > > > Oh dear.
>
> > > > > > I've also wondered if Guns N Roses was the last Classic Rock band.
>
> > > > > Yes you are right about this.
>
> > > > There's no "right" answer to such a nebulous question. And classic-rock
> > > > stations play some bands more recent than GnR. The Black Crowes, Alice
> > > > in Chains, Pearl Jam, Nirvana, Foo Fighters....
>
> > > Wrong... I have never heard any one of these on a classic rock
> > > station.
>
> > You have never heard The Black Crowes, GnR, Pearl Jam or Nirvana on a
> > classic rock station, wtf????
>
> GNR yes... but nothing else... not in Houston 93.7 (the arrow) or
> 107.5 (the eagle) . I listen to radio quite often. We have 94.5 the
> Buzz which plays alternative rock... but I hate the whiny songs they
> play.- Hide quoted text -
>

Seems odd to me...especially the Black Crowes; "Hard to Handle,"
"Remedy," "She Talks to Angels," "Jealous Again," and all their other
hits have been mainstays on every classic rock station I know, for
decades. One of my favorites of theirs is a smaller hit, got airplay
in its time but didn't join the perennial playlist, "Good Friday." I
like them a lot and hear them as the closest band to an American
Rolling Stones.

richforman
richforman

The Nice Mean Man

11/5/2010 6:12:00 PM

0

On Nov 5, 9:09 am, iarwain <iarwai...@hotmail.com> wrote:
> > It means that a large part of their material isn't "rock" enough for the format.
>
> I've heard a few classic rock stations that will not play any Beatles
> except for While My Guitar Gently Weeps.  I guess it gets the nod
> because of the Clapton connection.  And it is one of the more modern
> sounding Beatles tracks IMO.

"Modern" sounding Beatles tracks....?? The Beatles' music is totally
timeless. That's what's so great about it. That's what they have that
the others don't. Of course, that music is divided up into two (some
would argue three) eras. The later being the timeless one by today's
standards. The one most likely to fit in.
I don't know where you come from, but the stations around here play
Beatles shit just as often as they'll play anyone else. Always have.
Not to pry, but you sound like you live in or near a college town.
Naturally they won't play anything they sanctamonusly consider "old
school".

LOL...!!! That reminds me of what went down at the job a few months
back.... A young guy there (in his 30s) constantly goes on and on
about how obsolete "old school” rock is. Like he was around for the
birth of cool or something. I had the Woodstock CD there and I opened
it to the sight of the massive crowd. I went over to his station and
flashed it to him and simply said... "See..? OLD SCHOOL". End of
criticisms. Shut that shit down like a broken motor.
We were there first, motherfuckers... And we were there higher, too.
Because our music and musicians were better. Simple as that.





The Nice Mean Man

poisoned rose

11/5/2010 6:21:00 PM

0

iarwain <iarwain_8@hotmail.com> wrote:

> > It means that a large part of their material isn't "rock" enough for the
> > format.
>
> I've heard a few classic rock stations that will not play any Beatles
> except for While My Guitar Gently Weeps. I guess it gets the nod
> because of the Clapton connection. And it is one of the more modern
> sounding Beatles tracks IMO.

I haven't listened to classic-rock radio lately, but my recollection is
that my local station favors the later, less "arranged" tracks with a
strong rhythm-rock feel. Stuff like "Get Back," "Revolution," "Come
Together," "Birthday," "Back in the U.S.S.R." and "While My Guitar
Gently Weeps."

Andreas Bergmaier

2/4/2015 7:46:00 PM

0

Stefan Ram schrieb:
> I want to use JavaScript® - not ECMAScript, so my reference is
> the Mozilla Developer Network (MDN).
>
> [?]
> So, there must be some syntax rule (grammar rule) for what
> one can write into a script and what not.

Yeah, but it might not be documented in the MDN.

> I am trying to find this grammar rule.

I think the closest you will get is from
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/...,
first sentence:

| JavaScript applications consist of statements [?].

If you want to look further, you're encouraged to look at the ECMAScript
definition of "program code".

> So far, I only found this in the MDN:
>
> »The HTML <script> element is used to embed or reference an
> executable script within an HTML or XHTML document.«
> ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
> But were is the definition of »executable script«?

Notice that a HTML "executable script" might not be a JavaScript script.
There are many other scripting languages.

Regards,
Bergi