Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to Pass variable name to a function

25 views
Skip to first unread message

Stan Weiss

unread,
Apr 11, 2012, 12:26:22 PM4/11/12
to
I have this code in a form which calls the save function.

<TR><TD ALIGN="RIGHT">
<b>Valve Diameter in Millimetres </b>
</TD><TD>
<INPUT TYPE="text" NAME="VD" SIZE=7 onChange="save(stanForm.VD.value,
AInput, 'Valve Diameter')">
</TD></TR>

function save( field, vary, text ) {
if( isNaN( field ) )
{
alert( text + " is not numeric" );
}
else
{
AInput = eval(field); // this Works
vary = eval(field); // this does not workWorks
}
}

Can anyone see what I am doing wrong?

Stan

Andreas Bergmaier

unread,
Apr 11, 2012, 1:47:49 PM4/11/12
to
Stan Weiss schrieb:
> save(stanForm.VD.value, AInput, 'Valve Diameter')"
>
> function save( field, vary, text ) {
> if( isNaN( field ) )
> {
> alert( text + " is not numeric" );
> }
> else
> {
> AInput = eval(field); // this Works
> vary = eval(field); // this does not workWorks
> }
> }
>
> Can anyone see what I am doing wrong?

JavaScript does not have call-by-reference. Instead of passing a
reference to the variable where the result should be stored, you pass
the actual value of AInput to the function, where it gets the value of
the local variable "vary". By assigning the result to vary, vary will
get a new value. AInput is forgotten.

Also, you seem to try to parse a number with eval. Urghh. Use
parseFloat() instead.

So, your code should be:

function numeric(field, fallback, name) {
var num = parseFloat(field);
if (isNaN(num)) {
alert(name + " is not numeric");
return fallback;
} else
return num;
}
AInput = numeric(stanForm.VD.value, AInput, 'Valve Diameter');

regards,
Bergi

Stan Weiss

unread,
Apr 11, 2012, 2:21:16 PM4/11/12
to
Thanks for the reply Bergi. It now return the correct value but does not
function the way it did before. If a numeric and alpha are entered it
will take the numeric part and use it. I want it to show any error if
the field is not all numeric.

So I changed
if (isNaN(num)) {
to
if( isNaN( field ) )

Thanks again for your help
Best Regards
Stan

Stefan Weiss

unread,
Apr 11, 2012, 2:53:06 PM4/11/12
to
On 2012-04-11 20:21, Stan Weiss wrote:
> I want it to show any error if the field is not all numeric.
>
> So I changed
> if (isNaN(num)) {
> to
> if( isNaN( field ) )

I couldn't resist adding something to this thread, considering our
similarity in names... so I'll mention that isNaN() is perhaps not
exactly what you're looking for:

isNaN("0x123")
isNaN(".123")
isNaN("2e6")
isNaN("Infinity")

These will all evaluate to false, meaning these values would pass your
test. If you want to mandate a specific numeric format, your best bet
would be a regular expression.

For example,

if (/^[+-]?\d+(?:\.\d+)?$/.test(field)) {
// correct format
}

would accept input like "123", "123.123", "+123.123", "-123.123", but
reject the values listed earlier. You may also want to check for
minimum/maximum allowed values.

- stefan

Stan Weiss

unread,
Apr 11, 2012, 3:16:42 PM4/11/12
to
Thanks Stefan,
while I know it does not catch all errors, I did what to catch things
like 3>3 which should have been 3.3.
Best Regards,
Stan

Evertjan.

unread,
Apr 11, 2012, 5:20:01 PM4/11/12
to
Stan Weiss wrote on 11 apr 2012 in comp.lang.javascript:

> <INPUT NAME="VD" SIZE=7 onChange="save(stanForm.VD.value,
> AInput, 'Valve Diameter')">
>

for "stanForm.VD.value" use:

"this.value"

and if you cannot use "this",
because you are calling from another element in the same form use:

"this.form.elements.VD.value"

and if you are calling from outside such form, use:

"document.forms.stanForm.elements.VD.value"

Why?

Because only in IE an element name
is dangerously misused as an element pointer.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

Thomas 'PointedEars' Lahn

unread,
Apr 11, 2012, 5:56:38 PM4/11/12
to
Yes; it is (at least) the following:

1. Your referencing is proprietary, at best error-prone, needlessly.

stanForm.VD.value

is not appropriate referencing (throw that book away). Assuming that
your control is descendant of a form element named `stanForm' (which you
have not showed), an appropriate, standards-compliant, backwards
compatible and less error-prone referencing would be

document.forms['stanForm'].elements['VD'].value

However, as that code appears to be part of the event-handler attribute
value of the very element that is represented by

document.forms['stanForm'].elements['VD']

you can replace that with

this

so that the element reads

<input type="text" name="VD" size="7"
onchange="save(this.value, AInput, 'Valve Diameter')">

2. You are referring to an identifier before you declare or define it.
`AInput' is neither declared nor defined before save() is called, so for
all we know,

save(this.value, AInput, 'Valve Diameter')

throws a ReferenceError when evaluating `AInput'. Check your error
console.

It is possible that you have

var AInput;

somewhere in your code, or even

<form name="stanForm" …>

<input name="AInput" …>

</form>

(see also <http://stackoverflow.com/questions/9158238/why-js-function-
name-conflicts-with-element-id/9160009#9160009>), but then you should
have posted that.

3. You are using eval().

Given the aforementioned `forms' and `elements' collections, you do not
have to use eval() here. See also <http://jibbering.com/faq/#eval> (in
general, *always* read the FAQ of the newsgroup(s) *before* you post to
them).

4. You are using eval() wrong.

You are passing for the argument of eval() – `field' – the value of the
control that calls the very same function. One could surmise from this
that you might be trying to implement a calculator.

However, this assumption contradicts your programming where you
explicitly do not enter the branch with the eval() calls when the string
value cannot be interpreted as a number, such as a non-trivial equation
(operand operator operand).

It is also rather far-fetched to assume that your user would enter
the names of controls in your form in that input control.

Therefore, your calls to eval() appear to be completely pointless. To
convert a string value to a number value, use the unary `+' operator,
or the parseInt(…, radix) or parseFloat(…) function calls.

5. "Does not work" is not a problem description. Read the FAQ on how to
post when you desire useful answers.

6. You can assign to a function argument, but that does not change the
value passed for that argument. There is no call-by-reference, all
function arguments are values. (But it does not appear as if you were
trying to use the assumed assigned value anywhere, so this appears
to be pointless anyway.)

7. The `change' event occurs on the control when the control loses focus,
not before. Do not have your users rely on that, provide a button for
the computation. You may perform form validation on change, but you
should do it in a non-obtrusive way (like adding color).
Perform any validation that hinders or blocks the user's workflow (like
an alert message) only on submit; the `form' element has an `onsubmit'
event-handler attribute for that.

8. Avoid the window.alert() method. In particular, in recent Gecko-based
browsers, such an alert message disables the entire viewport of a tab
until the message is dismissed, and it is very likely to cover the parts
where the error is. (IMHO yet another incredibly bad design decision
in Geckos that we now need to work around – thanks guys :->)

9. Is your markup Valid? Declare HTML 4.01 Strict or (if necessary) HTML5,
and replace presentational attributes (like `align') and elements with
CSS. <http://validator.w3.org/>

Bottom line: Learn the markup and programming languages before you use an
API with the programming language, and try something much more simple than
this first.


PointedEars
--
Anyone who slaps a 'this page is best viewed with Browser X' label on
a Web page appears to be yearning for the bad old days, before the Web,
when you had very little chance of reading a document written on another
computer, another word processor, or another network. -- Tim Berners-Lee

Gene Wirchenko

unread,
Apr 11, 2012, 6:18:42 PM4/11/12
to
On Wed, 11 Apr 2012 15:16:42 -0400, Stan Weiss <srw...@erols.com>
wrote:

>Stefan Weiss wrote:

[snip]

>> I couldn't resist adding something to this thread, considering our
>> similarity in names... so I'll mention that isNaN() is perhaps not
>> exactly what you're looking for:
>>
>> isNaN("0x123")
>> isNaN(".123")
>> isNaN("2e6")
>> isNaN("Infinity")
>>
>> These will all evaluate to false, meaning these values would pass your
>> test. If you want to mandate a specific numeric format, your best bet
>> would be a regular expression.
>>
>> For example,
>>
>> if (/^[+-]?\d+(?:\.\d+)?$/.test(field)) {
>> // correct format
>> }
>>
>> would accept input like "123", "123.123", "+123.123", "-123.123", but
>> reject the values listed earlier. You may also want to check for
>> minimum/maximum allowed values.
>>
>> - stefan
>
>Thanks Stefan,
>while I know it does not catch all errors, I did what to catch things
>like 3>3 which should have been 3.3.

You are better off doing it right. Stefan suggested a regex to
check the format. If you do not know regexes, you really should read
up about them. Properly used, they can simplify programming
immensely. I have been working on a test page, and some time ago, I
was working on checking input for type validity -- exactly what you
are concerned about here -- and found regexes very useful.

Yes, regexes can easily get into write-only if you do not watch
it, but the example above should be in your repetoire. (I admit that
I had to read it slowly to be sure and did not already know what
?:<string>
does.

I could do with a complete reference for JavaScript's regex use.
W3Schools's is not complete. I could use more examples. Even with
this difficulty, regexes are worth checking out.

Sincerely,

Gene Wirchenko

Stan Weiss

unread,
Apr 12, 2012, 12:48:05 AM4/12/12
to
Is this a moderated group?
Are you the group moderator?

I poster enough code to get the answer I needed. While you seem to want
to make all kinds of ASSumptions about things that were not posted.

Thanks for looking

Stan

PS Some old habits - presentational attributes (like `align') go back to
when I used to do this back in 1997. You know what people tell me that
those old scripts still work great.

Andrew Poulos

unread,
Apr 12, 2012, 1:21:36 AM4/12/12
to
>> <form name="stanForm" …>
>> …
>> <input name="AInput" …>
>> …
>> </form>
>>
>> (see also<http://stackoverflow.com/questions/9158238/why-js-function-
>> name-conflicts-with-element-id/9160009#9160009>), but then you should
>> have posted that.
>>
>> 3. You are using eval().
>>
>> Given the aforementioned `forms' and `elements' collections, you do not
>> have to use eval() here. See also<http://jibbering.com/faq/#eval> (in
>> general, *always* read the FAQ of the newsgroup(s) *before* you post to
>> them).
>>
>> 4. You are using eval() wrong.
>>
>> You are passing for the argument of eval() – `field' – the value of the
>> control that calls the very same function. One could surmise from this
>> that you might be trying to implement a calculator.
>>
>> However, this assumption contradicts your programming where you
>> explicitly do not enter the branch with the eval() calls when the string
>> value cannot be interpreted as a number, such as a non-trivial equation
>> (operand operator operand).
>>
>> It is also rather far-fetched to assume that your user would enter
>> the names of controls in your form in that input control.
>>
>> Therefore, your calls to eval() appear to be completely pointless. To
>> convert a string value to a number value, use the unary `+' operator,
>> or the parseInt(…, radix) or parseFloat(…) function calls.
>>
>> 5. "Does not work" is not a problem description. Read the FAQ on how to
>> post when you desire useful answers.
>>
>> 6. You can assign to a function argument, but that does not change the
>> value passed for that argument. There is no call-by-reference, all
>> function arguments are values. (But it does not appear as if you were
>> trying to use the assumed assigned value anywhere, so this appears
>> to be pointless anyway.)
>>
>> 7. The `change' event occurs on the control when the control loses focus,
>> not before. Do not have your users rely on that, provide a button for
>> the computation. You may perform form validation on change, but you
>> should do it in a non-obtrusive way (like adding color).
>> Perform any validation that hinders or blocks the user's workflow (like
>> an alert message) only on submit; the `form' element has an `onsubmit'
>> event-handler attribute for that.
>>
>> 8. Avoid the window.alert() method. In particular, in recent Gecko-based
>> browsers, such an alert message disables the entire viewport of a tab
>> until the message is dismissed, and it is very likely to cover the parts
>> where the error is. (IMHO yet another incredibly bad design decision
>> in Geckos that we now need to work around – thanks guys :->)

PE, I don't understand, isn't that the point of an alert?

>> 9. Is your markup Valid? Declare HTML 4.01 Strict or (if necessary) HTML5,
>> and replace presentational attributes (like `align') and elements with
>> CSS.<http://validator.w3.org/>
>>
>> Bottom line: Learn the markup and programming languages before you use an
>> API with the programming language, and try something much more simple than
>> this first.
>>
>> PointedEars
>> --
>> Anyone who slaps a 'this page is best viewed with Browser X' label on
>> a Web page appears to be yearning for the bad old days, before the Web,
>> when you had very little chance of reading a document written on another
>> computer, another word processor, or another network. -- Tim Berners-Lee
>
> Is this a moderated group?

I don't think so.

> Are you the group moderator?

See answer to previous question.

> I poster enough code to get the answer I needed. While you seem to want
> to make all kinds of ASSumptions about things that were not posted.

You're upset that someone took the time to point out mistakes you have made?

> Thanks for looking
>
> Stan
>
> PS Some old habits - presentational attributes (like `align') go back to
> when I used to do this back in 1997. You know what people tell me that

That you have been using 'align' for 15 years does not make it the best
thing to do today.

> those old scripts still work great.

As if (that is, I doubt it).

Andrew Poulos

Stefan Weiss

unread,
Apr 12, 2012, 2:08:40 AM4/12/12
to
On 2012-04-12 06:48, Stan Weiss wrote:
> Thomas 'PointedEars' Lahn wrote:
>> 1. Your referencing is proprietary, at best error-prone, needlessly.
..
>> 2. You are referring to an identifier before you declare or define it.
..
>> 3. You are using eval().
..
>> 4. You are using eval() wrong.
..
>> 5. "Does not work" is not a problem description.
..
>> 6. You can assign to a function argument, but that does not change the
>> value passed for that argument.
..
>> 7. The `change' event occurs on the control when the control loses focus,
..
>> 8. Avoid the window.alert() method.
..
>> 9. Is your markup Valid?

> Is this a moderated group?
> Are you the group moderator?

No and no.

> I poster enough code to get the answer I needed. While you seem to want
> to make all kinds of ASSumptions about things that were not posted.

That was actually one of Thomas's more useful replies. Nobody here would
have been surprised if he had answered your question "Can anyone see
what I am doing wrong?" with "Yes" and no further comment. At least you
didn't give him a chance to say "There is no javascript".

Manners aside, most of his points are valid. Especially: don't use
eval() unless you know exactly what you are doing; do validate the
document before you begin debugging your scripts; stanForm.VD is not a
good way to reference a form element; and don't expect an assignment to
a function parameter to be visible outside the function. These points
really are important for you to understand. The rest will come with time
and practice.

- stefan

Stan Weiss

unread,
Apr 12, 2012, 2:11:56 AM4/12/12
to
Andrew,
I had hours before gotten a answer to my question. PE then comes along
an points out things that are wrong in my code. Not a problem. I only
showed code snippets so making ASSumptions about things that were not
posted like 2# above does what? If there were any messages in the error
console I would have fixed them before asking for help. Also what does
using CSS have to do with javaScript?

Stan

Andrew Poulos

unread,
Apr 12, 2012, 4:57:54 AM4/12/12
to
On 12/04/2012 4:11 PM, Stan Weiss wrote:
> Andrew Poulos wrote:
>>
>> On 12/04/2012 2:48 PM, Stan Weiss wrote:
>>> Is this a moderated group?
>>
>> I don't think so.
>>
>>> Are you the group moderator?
>>
>> See answer to previous question.
>>
>>> I poster enough code to get the answer I needed. While you seem to want
>>> to make all kinds of ASSumptions about things that were not posted.
>>
>> You're upset that someone took the time to point out mistakes you have made?
>>
>>> Thanks for looking
>>>
>>> Stan
>>>
>>> PS Some old habits - presentational attributes (like `align') go back to
>>> when I used to do this back in 1997. You know what people tell me that
>>
>> That you have been using 'align' for 15 years does not make it the best
>> thing to do today.
>>
>>> those old scripts still work great.
>>
>> As if (that is, I doubt it).
>>
>> Andrew Poulos
>
> Andrew,
> I had hours before gotten a answer to my question. PE then comes along

You think "hours" waiting for a reply on usenet is a long time? Perhaps
you're mistaking this NG for a help desk.

> an points out things that are wrong in my code. Not a problem. I only
> showed code snippets so making ASSumptions about things that were not

Yes I got your pun the first time.

> posted like 2# above does what? If there were any messages in the error

People can only go on what you post. If you thought PE's comments wrong
you could've replied "yes you make a valid point but in my case it
doesn't apply as there's code that I've not shown which does
declare/define 'AInput'".

> console I would have fixed them before asking for help. Also what does

Really, and how would anyone know that? You being so against anyone
making assumptions.

> using CSS have to do with JavaScript?

If you have to ask then perhaps you need to study a bit more.

Andrew Poulos

Stan Weiss

unread,
Apr 12, 2012, 9:35:20 AM4/12/12
to
Andrew Poulos wrote:
>
> On 12/04/2012 4:11 PM, Stan Weiss wrote:
> > Andrew Poulos wrote:
> >>
> >> On 12/04/2012 2:48 PM, Stan Weiss wrote:
> >>> Is this a moderated group?
> >>
> >> I don't think so.
> >>
> >>> Are you the group moderator?
> >>
> >> See answer to previous question.
> >>
> >>> I poster enough code to get the answer I needed. While you seem to want
> >>> to make all kinds of ASSumptions about things that were not posted.
> >>
> >> You're upset that someone took the time to point out mistakes you have made?
> >>
> >>> Thanks for looking
> >>>
> >>> Stan
> >>>
> >>> PS Some old habits - presentational attributes (like `align') go back to
> >>> when I used to do this back in 1997. You know what people tell me that
> >>
> >> That you have been using 'align' for 15 years does not make it the best
> >> thing to do today.
> >>
> >>> those old scripts still work great.
> >>
> >> As if (that is, I doubt it).
> >>
> >> Andrew Poulos
> >
> > Andrew,
> > I had hours before gotten a answer to my question. PE then comes along
>
> You think "hours" waiting for a reply on usenet is a long time? Perhaps
> you're mistaking this NG for a help desk.

Where did I say anything about >>> "hours" waiting for a reply <<<< I
said hours after I had gotten an answer. I understand how NGs work. I
have been using them for over 15 year and before that FIDONET.

>
> > an points out things that are wrong in my code. Not a problem. I only
> > showed code snippets so making ASSumptions about things that were not
>
> Yes I got your pun the first time.
>
> > posted like 2# above does what? If there were any messages in the error
>
> People can only go on what you post. If you thought PE's comments wrong
> you could've replied "yes you make a valid point but in my case it
> doesn't apply as there's code that I've not shown which does
> declare/define 'AInput'".
>
> > console I would have fixed them before asking for help. Also what does
>
> Really, and how would anyone know that? You being so against anyone
> making assumptions.
>
> > using CSS have to do with JavaScript?
>
> If you have to ask then perhaps you need to study a bit more.

Explain to me how CSS played any part in solving my problem. This is
html.
>>> <TD ALIGN="RIGHT"> <<< - It maybe "Old School" but it still works.

>
> Andrew Poulos

Stan Weiss

unread,
Apr 12, 2012, 10:13:55 AM4/12/12
to
Thanks Stefan for the help.

Stan

Stan Weiss

unread,
Apr 12, 2012, 2:03:01 PM4/12/12
to
Thank to all that posted for your help.

1) The reason for only posting code snippets was that form does
calculation of someone else's equations which I could not share.

2) This is fully functional and working but used method which were not
generalized. That was the reason for the inquiry

This is what I have now.

function numeric( field, fallback, name ) {
var num = parseFloat(field);
if (isNaN(field)) {
alert(name + " is not numeric");
return fallback;
} else
return num;
}

<TR><TD ALIGN="RIGHT">
<b>Valve Diameter in Millimetres </b>
</TD><TD>
<INPUT TYPE="text" NAME="VD" SIZE=7 onChange="AInput =
numeric(this.value, AInput, 'Valve Diameter')">
</TD></TR>

When I have more time I will look into implementing what Stefan
suggested about replacing the "isNaN"

Thanks again,

Stan

Thomas 'PointedEars' Lahn

unread,
Apr 12, 2012, 4:47:49 PM4/12/12
to
Stan Weiss wrote:

> Thomas 'PointedEars' Lahn wrote:
>> [Full quote]
>
> Is this a moderated group?
> Are you the group moderator?
>
> I poster enough code to get the answer I needed. While you seem to want
> to make all kinds of ASSumptions about things that were not posted.
>
> Thanks for looking
>
> Stan
>
> PS Some old habits - presentational attributes (like `align') go back to
> when I used to do this back in 1997. You know what people tell me that
> those old scripts still work great.

Could someone please remind me that I never again invest free time into
replying to such a posting? TIA.

*PLONK*

Stan Weiss

unread,
Apr 12, 2012, 5:04:28 PM4/12/12
to
Thomas,
I am sure you will continue to reply to these messages. Because I
believe it has nothing to do with helping other but rather you wanting
to show everybody how smart you are. <lol>

Stan
Message has been deleted

Tom de Neef

unread,
Apr 12, 2012, 5:34:55 PM4/12/12
to
"Thomas 'PointedEars' Lahn" <Point...@web.de> schreef in bericht
news:1399313.A...@PointedEars.de...
I always pick useful things up from your posts. Pls don't stop them.
Tom


Dr J R Stockton

unread,
Apr 12, 2012, 3:06:53 PM4/12/12
to
In comp.lang.javascript message <4F85B0AE...@erols.com>, Wed, 11
Apr 2012 12:26:22, Stan Weiss <srw...@erols.com> posted:
Easily :
You are not saying which browser you have been using.
You have not posted complete working/failing code.
You have not reported the output (including "none") of the browser's
native, or another, debugger.
You've not remembered things said in the newsgroup FAQ.
You've not said exactly what you expect, nor what you get - that code
works as it should, only your expectations were wrong.
And, as a minor detail, your code is wrong.

To convert a typed input String to a Number, unary + is commonly best;
neither too liberal nor too rigorous. For example, AInput = +field .
Then check that the value of AInput is admissible.

And, posting from -0400, should you
be spelling Millimetres correctly ?

--
(c) John Stockton, nr London UK ?@merlyn.demon.co.uk IE8 FF8 Op11 Sf5 Cr15
news:comp.lang.javascript FAQ <http://www.jibbering.com/faq/index.html>.
<http://www.merlyn.demon.co.uk/js-index.htm> jscr maths, dates, sources.
<http://www.merlyn.demon.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.

Stan Weiss

unread,
Apr 12, 2012, 6:54:47 PM4/12/12
to
There are a few word spelled that way since the original code was
written by someone in
the UK. I am changing the User Interface. Here in the US I would have
used inches. <g> I mean "Atmospheric Pressure Reading in Millibars" or
"Vapour Pressure" <lol>

Stan

Thomas 'PointedEars' Lahn

unread,
Apr 13, 2012, 4:03:26 AM4/13/12
to
Tom de Neef wrote:

> "Thomas 'PointedEars' Lahn" [wrote]:
>> Could someone please remind me that I never again invest free time into
>> replying to such a posting? TIA.
>
> I always pick useful things up from your posts. Pls don't stop them.

Thank you.


Regards,

PointedEars
--
When all you know is jQuery, every problem looks $(olvable).

Erwin Moller

unread,
Apr 13, 2012, 6:03:13 AM4/13/12
to
Just a "me too".
Once one has learned to survive his "poetry" by gnawing one's own legs
off, his contributions can be quite useful and instructive.
I always read them.

Regards,
Erwin Moller


--
"That which can be asserted without evidence, can be dismissed without
evidence."
-- Christopher Hitchens

Andrew Poulos

unread,
Apr 13, 2012, 7:35:51 AM4/13/12
to
Yeah, and PE does *not* say things like "poorly written code was good
enough for my great grandfather so its good enough for me" ;-)

Andrew Poulos

Scott Sauyet

unread,
Apr 13, 2012, 8:13:27 AM4/13/12
to
Stan Weiss wrote:
> Thomas 'PointedEars' Lahn wrote:
>> Stan Weiss wrote:
>>> Thomas 'PointedEars' Lahn wrote:

[ a very detailed and helpful response ]

>>> Is this a moderated group?
>>> Are you the group moderator?
>
>>> I poster enough code to get the answer I needed. While you seem to want
>>> to make all kinds of ASSumptions about things that were not posted.
[ ... ]

>> Could someone please remind me that I never again invest free time into
>> replying to such a posting?  TIA.

> I am sure you will continue to reply to these messages. Because I
> believe it has nothing to do with helping other but rather you wanting
> to show everybody how smart you are. <lol>

Thomas will, I hope, continue to post, even responses to requests for
help.

It may not feel like it to you, but that was Thomas being more helpful
than usual. This is not some paid help forum. It is a newsgroup used
to discuss Javascript. There are plenty of times when regulars here
feel like offering advice to those seeking it, but that is not the
main purpose of the group. Thomas offered nine detailed points, all
of which were on-topic, well-stated, and non-argumentative, and a
summary which was perhaps condescending but not terribly insulting.
It's hard to be more helpful than that.

-- Scott

Gene Wirchenko

unread,
Apr 13, 2012, 12:00:22 PM4/13/12
to
On Fri, 13 Apr 2012 12:03:13 +0200, Erwin Moller
<erwinmol...@xs4all.nl> wrote:

[snip]

>Just a "me too".
>Once one has learned to survive his "poetry" by gnawing one's own legs
>off, his contributions can be quite useful and instructive.
>I always read them.

I walk an hour most days for cardio. I need my legs. YMMV, and
will, if you have no legs and I do.

Sincerely,

Gene Wirchenko

Evertjan.

unread,
Apr 13, 2012, 12:27:02 PM4/13/12
to
Scott Sauyet wrote on 13 apr 2012 in comp.lang.javascript:

> Thomas will, I hope, continue to post, even responses to requests for
> help.
>
> It may not feel like it to you, but that was Thomas being more helpful
> than usual. This is not some paid help forum. It is a newsgroup used
> to discuss Javascript. There are plenty of times when regulars here
> feel like offering advice to those seeking it, but that is not the
> main purpose of the group. Thomas offered nine detailed points, all
> of which were on-topic, well-stated, and non-argumentative, and a
> summary which was perhaps condescending but not terribly insulting.
> It's hard to be more helpful than that.

I agree with all this, except the "non-argumentative".

What do you mean by "non-argumentative", my dear Watson?

===

ar·gu·ment [ahr-gyuh-muhnt] noun
1.
an oral disagreement; verbal opposition; contention; altercation: a
violent argument.
2.
a discussion involving differing points of view; debate: They were deeply
involved in an argument about inflation.
3.
a process of reasoning; series of reasons: I couldn't follow his
argument.
4.
a statement, reason, or fact for or against a point: This is a strong
argument in favor of her theory.
5.
an address or composition intended to convince or persuade; persuasive
discourse.
6.
subject matter; theme: The central argument of his paper was presented
clearly.
7.
an abstract or summary of the major points in a work of prose or poetry,
or of sections of such a work.
8.
Mathematics .
a.
an independent variable of a function.
b.
Also called amplitude. the angle made by a given vector with the
reference axis.
c.
the angle corresponding to a point representing a given complex number in
polar coordinates. Compare principal argument.
9.
Computers . a variable in a program, to which a value will be assigned
when the program is run: often given in parentheses following a function
name and used to calculate the function.
10.
Obsolete .
a.
evidence or proof.
b.
a matter of contention.

Scott Sauyet

unread,
Apr 16, 2012, 7:11:59 AM4/16/12
to
Evertjan wrote:
> Scott Sauyet wrote:
>> [ ... ]  Thomas offered nine detailed points, all
>> of which were on-topic, well-stated, and non-argumentative, and a
>> summary which was perhaps condescending but not terribly insulting.
>
> I agree with all this, except the "non-argumentative".
>
> What do you mean by "non-argumentative", my dear Watson?

[ ... definitions of "argument" elided ... ]

| argumentative:
| 1. given to arguing; contentious
| 2. characterized by argument; controversial

His answers were simply helpful explanations of what was wrong in the
code under question. Except for his summary, nothing attacked the OP
or tried to refute other points of view.

-- Scott
0 new messages