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


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

Optional printouts using flag?

Started byjonas.thornvall@gmail.com
First post2015-09-11 00:37 -0700
Last post2015-09-11 12:43 +0200
Articles 10 — 2 participants

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


Contents

  Optional printouts using flag? jonas.thornvall@gmail.com - 2015-09-11 00:37 -0700
    Re: Optional printouts using flag? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2015-09-11 11:24 +0200
      Re: Optional printouts using flag? jonas.thornvall@gmail.com - 2015-09-11 02:55 -0700
        Re: Optional printouts using flag? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2015-09-11 12:28 +0200
          Re: Optional printouts using flag? jonas.thornvall@gmail.com - 2015-09-11 07:23 -0700
            Re: Optional printouts using flag? jonas.thornvall@gmail.com - 2015-09-11 07:27 -0700
              Re: Optional printouts using flag? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2015-09-11 16:42 +0200
                Re: Optional printouts using flag? jonas.thornvall@gmail.com - 2015-09-11 07:51 -0700
      Re: Optional printouts using flag? jonas.thornvall@gmail.com - 2015-09-11 02:58 -0700
        Re: Optional printouts using flag? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2015-09-11 12:43 +0200

#28675 — Optional printouts using flag?

Fromjonas.thornvall@gmail.com
Date2015-09-11 00:37 -0700
SubjectOptional printouts using flag?
Message-ID<c3ba3a04-f3c6-46e9-9689-0ded66ec999e@googlegroups.com>
Sometimes when programming one wants traces of operation to be printout, to derive how a value was achieved, but in the general case one just want the result out within form.

Is there a way to steer what rows should be interpretated/run by using a flag.
It would be neat if one could use a none Javscript symbol at start of line and then use a bolean flag  to tell the interpretator if that line should be interpretated or not.

That way you could swithch between extensive printouts, or just result.

How is this usually resolved in Javascript, is there any language that support the kind of behaviour i suggest? 

[toc] | [next] | [standalone]


#28676

From"Evertjan." <exxjxw.hannivoort@inter.nl.net>
Date2015-09-11 11:24 +0200
Message-ID<XnsA51274157CFBBeejj99@194.109.6.166>
In reply to#28675
jonas.thornvall@gmail.com wrote on 11 Sep 2015 in comp.lang.javascript:

> Sometimes when programming one wants traces of operation to be printout,
> to derive how a value was achieved, but in the general case one just
> want the result out within form. 

I don't think so, why would you want "traces of operation" on paper?

Perhaps you mean you want to see it in the console.log?

console.log('value of a is: ' + a);

> Is there a way to steer what rows should be interpretated/run by using a
> flag. 

if (debug=='on') console.log('value of a is: ' + a);

> It would be neat if one could use a none Javscript symbol at start
> of line 

What is a "none Javscript symbol"?
A "non-Javascript symbol"? 
A "known Javascript symbol"? 

Javascript essentially has no start-of-line.
The newline does not mean much.

Change the word "line" to "statement",
where statement" could also be a group of consecutive statements within { }. 


> and then use a bolean flag  to tell the interpretator if that

script-interpretor I would say.

> line should be interpretated or not. 

if (debug=='on') { }; 

> That way you could swithch between extensive printouts, or just result.

You clould also just disregard the console,
or have your printer throw the paper directly into the trach-bin.
  
> How is this usually resolved in Javascript, 

By debugging, see above.

You can also set and use breakpoints with the Developer Tool [usually F12]

> is there any language that
> support the kind of behaviour i suggest? 

The behavour is called "debugging",
if I understand your suggestion correctly.

I sugggest:

https://www.google.com/search?q=javascript+debugging+tutorial

> is there any language that

Only Javascript is on topic in this NH. 
Debugging is a general concept much much older than Javascript.

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

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


#28678

Fromjonas.thornvall@gmail.com
Date2015-09-11 02:55 -0700
Message-ID<dda59467-a761-4d43-9dfe-e618369277bd@googlegroups.com>
In reply to#28676
Den fredag 11 september 2015 kl. 11:25:05 UTC+2 skrev Evertjan.:
> jonas.thornvall@gmail.com wrote on 11 Sep 2015 in comp.lang.javascript:
> 
> > Sometimes when programming one wants traces of operation to be printout,
> > to derive how a value was achieved, but in the general case one just
> > want the result out within form. 
> 
> I don't think so, why would you want "traces of operation" on paper?
> 
No i meant online in HTML form, let say you have a calculus system and you like to chose the detail level of presentation of the calculation. 

> Perhaps you mean you want to see it in the console.log?

No i want to be able to set a flag in the form that tell the detail level of printouts of variables and calculations.
 
> console.log('value of a is: ' + a);
> 
> > Is there a way to steer what rows should be interpretated/run by using a
> > flag. 
> 
> if (debug=='on') console.log('value of a is: ' + a);
> 
> > It would be neat if one could use a none Javscript symbol at start
> > of line 
> 
> What is a "none Javscript symbol"?
> A "non-Javascript symbol"? 
> A "known Javascript symbol"?

Well i was thinking of a reserved unicode ascii combination at start of row, for example &% could signify 0 and 1 and thus we could have a lot of optional execution paths  by set &=1 or &=0 for flagged execution.

Now we would have alot of optional executional choices that can be steered directly from form by reading a checkbox to set the flag for.

&,%,&%,%&,%%,&& and so on.
 

 
> 
> Javascript essentially has no start-of-line.
> The newline does not mean much.
> 
> Change the word "line" to "statement",
> where statement" could also be a group of consecutive statements within { }. 
> 
> 
> > and then use a bolean flag  to tell the interpretator if that
> 
> script-interpretor I would say.
> 
> > line should be interpretated or not. 
> 
> if (debug=='on') { }; 
> 
> > That way you could swithch between extensive printouts, or just result.
> 
> You clould also just disregard the console,
> or have your printer throw the paper directly into the trach-bin.
>   
> > How is this usually resolved in Javascript,
 
This is not just for debug purposes but to steer detail level of a calculation or a salary specificaion.

I do realise that it is probably a database query, but there must be alot of realtime systems nowadays that is overwatched from webinterfaces?

And there you may want to specify detail level of information for the process you want to study?


> By debugging, see above.
> 
> You can also set and use breakpoints with the Developer Tool [usually F12]
> 
> > is there any language that
> > support the kind of behaviour i suggest? 
> 
> The behavour is called "debugging",
> if I understand your suggestion correctly.
> 
> I sugggest:
> 
> https://www.google.com/search?q=javascript+debugging+tutorial
> 
> > is there any language that
> 
> Only Javascript is on topic in this NH. 
> Debugging is a general concept much much older than Javascript.
> 
> -- 
> Evertjan.
> The Netherlands.
> (Please change the x'es to dots in my emailaddress)

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


#28680

From"Evertjan." <exxjxw.hannivoort@inter.nl.net>
Date2015-09-11 12:28 +0200
Message-ID<XnsA5127EE4B5DE6eejj99@194.109.6.166>
In reply to#28678
jonas.thornvall@gmail.com wrote on 11 Sep 2015 in comp.lang.javascript:

>> if (debug=='on') console.log('value of a is: ' + a);
>> 
>> > It would be neat if one could use a none Javscript symbol at start
>> > of line 
>> 
>> What is a "none Javscript symbol"?
>> A "non-Javascript symbol"? 
>> A "known Javascript symbol"?
> 
> Well i was thinking of a reserved unicode ascii combination at start of
> row, for example &% could signify 0 and 1 and thus we could have a lot
> of optional execution paths  by set &=1 or &=0 for flagged execution. 

Why don't you answer my Q above?

There is no start-of-line or start-of-row in Javascript,
Javascript is just aa script of statements.

> Now we would have alot of optional executional choices that can be
> steered directly from form by reading a checkbox to set the flag for. 
> 
> &,%,&%,%&,%%,&& and so on.

You can muse whatever you like, but Javascript is just Javascript.

>> I don't think so, why would you want "traces of operation" on paper?

> No i meant online in HTML form, let say you have a calculus system and
> you > like to chose the detail level of presentation of the calculation.

"online" has nothing to do with it.
Do you mean html as processed by a modern browser?

No, clientside javascript can only do what it does,



>> if (debug=='on') { }; 
>> 
>> > That way you could swithch between extensive printouts, or just
>> > result. 
>> 
>> You clould also just disregard the console,
>> or have your printer throw the paper directly into the trach-bin.
>>   
>> > How is this usually resolved in Javascript,
>  
> This is not just for debug purposes but to steer detail level of a
> calculation or a salary specificaion. 

You should use the DOM for that, and steer the DOM with your Javascript.

> I do realise that it is probably a database query, 

I don't think so.

> but there must be
> alot of realtime systems nowadays that is overwatched from
> webinterfaces? 

This above sentence means nothing to me.

> And there you may want to specify detail level of information for the
> process you want to study? 

=======================================

Well, try the following using DOM by clientside Javascript:

<!DOCTYPE html>
<span class='level1'>text 1 text</span><br>
<span class='level3'>text 3 text</span><br>
<span class='level2'>text 2 text</span><br>
<span class='level3'>text 3 text</span>


<script type='text/javascript'>

var Iwantlevel3gone = true;

if (Iwantlevel3gone) {
  var temp = document.querySelectorAll('.level3');
  for (i in temp) temp[i].style.display = 'none';
};

</script>

==========================

Or use serverside Javascript by reloading the page:

<%
var level1, level2, level3, Iwantlevel3gone = true;

if (Iwantlevel3gone) {
  level1 = true;
  level2 = true;
  level3 = false;
};
%>

<% if (level2) { %>text 1 text<% } %><br>
<% if (level3) { %>text 3 text<% } %><br>
<% if (level2) { %>text 2 text<% } %><br>
<% if (level3) { %>text 3 text<% } %>

[not tested]


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

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


#28682

Fromjonas.thornvall@gmail.com
Date2015-09-11 07:23 -0700
Message-ID<6c7e553c-3f2c-4fda-a078-688e59b902b7@googlegroups.com>
In reply to#28680
Den fredag 11 september 2015 kl. 12:29:11 UTC+2 skrev Evertjan.:
> jonas.thornvall@gmail.com wrote on 11 Sep 2015 in comp.lang.javascript:
> 
> >> if (debug=='on') console.log('value of a is: ' + a);
> >> 
> >> > It would be neat if one could use a none Javscript symbol at start
> >> > of line 
> >> 
> >> What is a "none Javscript symbol"?
> >> A "non-Javascript symbol"? 
> >> A "known Javascript symbol"?
> > 
> > Well i was thinking of a reserved unicode ascii combination at start of
> > row, for example &% could signify 0 and 1 and thus we could have a lot
> > of optional execution paths  by set &=1 or &=0 for flagged execution. 
> 
> Why don't you answer my Q above?
> 
> There is no start-of-line or start-of-row in Javascript,
> Javascript is just aa script of statements.
> 
> > Now we would have alot of optional executional choices that can be
> > steered directly from form by reading a checkbox to set the flag for. 
> > 
> > &,%,&%,%&,%%,&& and so on.
> 
> You can muse whatever you like, but Javascript is just Javascript.
> 
> >> I don't think so, why would you want "traces of operation" on paper?
> 
> > No i meant online in HTML form, let say you have a calculus system and
> > you > like to chose the detail level of presentation of the calculation.
> 
> "online" has nothing to do with it.
> Do you mean html as processed by a modern browser?
> 
> No, clientside javascript can only do what it does,
> 
> 
> 
> >> if (debug=='on') { }; 
> >> 
> >> > That way you could swithch between extensive printouts, or just
> >> > result. 
> >> 
> >> You clould also just disregard the console,
> >> or have your printer throw the paper directly into the trach-bin.
> >>   
> >> > How is this usually resolved in Javascript,
> >  
> > This is not just for debug purposes but to steer detail level of a
> > calculation or a salary specificaion. 
> 
> You should use the DOM for that, and steer the DOM with your Javascript.
> 
> > I do realise that it is probably a database query, 
> 
> I don't think so.
> 
> > but there must be
> > alot of realtime systems nowadays that is overwatched from
> > webinterfaces? 
> 
> This above sentence means nothing to me.
> 
> > And there you may want to specify detail level of information for the
> > process you want to study? 
> 
> =======================================
> 
> Well, try the following using DOM by clientside Javascript:
> 
> <!DOCTYPE html>
> <span class='level1'>text 1 text</span><br>
> <span class='level3'>text 3 text</span><br>
> <span class='level2'>text 2 text</span><br>
> <span class='level3'>text 3 text</span>
> 
> 
> <script type='text/javascript'>
> 
> var Iwantlevel3gone = true;
> 
> if (Iwantlevel3gone) {
>   var temp = document.querySelectorAll('.level3');
>   for (i in temp) temp[i].style.display = 'none';
> };
> 
> </script>
> 
> ==========================
> 
> Or use serverside Javascript by reloading the page:
> 
> <%
> var level1, level2, level3, Iwantlevel3gone = true;
> 
> if (Iwantlevel3gone) {
>   level1 = true;
>   level2 = true;
>   level3 = false;
> };
> %>
> 
> <% if (level2) { %>text 1 text<% } %><br>
> <% if (level3) { %>text 3 text<% } %><br>
> <% if (level2) { %>text 2 text<% } %><br>
> <% if (level3) { %>text 3 text<% } %>
> 
> [not tested]
> 
> 
> -- 
> Evertjan.
> The Netherlands.
> (Please change the x'es to dots in my emailaddress)

You are correct Janevert i misunderstood, your example work perfectly fine with forms as was as console.

So if(debugOne), if(debugTwo) and so on it will be.

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


#28683

Fromjonas.thornvall@gmail.com
Date2015-09-11 07:27 -0700
Message-ID<b28d02db-7b10-4f2a-a123-ce9aec7cce58@googlegroups.com>
In reply to#28682
Den fredag 11 september 2015 kl. 16:24:02 UTC+2 skrev jonas.t...@gmail.com:
> Den fredag 11 september 2015 kl. 12:29:11 UTC+2 skrev Evertjan.:
> > jonas.thornvall@gmail.com wrote on 11 Sep 2015 in comp.lang.javascript:
> > 
> > >> if (debug=='on') console.log('value of a is: ' + a);
> > >> 
> > >> > It would be neat if one could use a none Javscript symbol at start
> > >> > of line 
> > >> 
> > >> What is a "none Javscript symbol"?
> > >> A "non-Javascript symbol"? 
> > >> A "known Javascript symbol"?
> > > 
> > > Well i was thinking of a reserved unicode ascii combination at start of
> > > row, for example &% could signify 0 and 1 and thus we could have a lot
> > > of optional execution paths  by set &=1 or &=0 for flagged execution. 
> > 
> > Why don't you answer my Q above?
> > 
> > There is no start-of-line or start-of-row in Javascript,
> > Javascript is just aa script of statements.
> > 
> > > Now we would have alot of optional executional choices that can be
> > > steered directly from form by reading a checkbox to set the flag for. 
> > > 
> > > &,%,&%,%&,%%,&& and so on.
> > 
> > You can muse whatever you like, but Javascript is just Javascript.
> > 
> > >> I don't think so, why would you want "traces of operation" on paper?
> > 
> > > No i meant online in HTML form, let say you have a calculus system and
> > > you > like to chose the detail level of presentation of the calculation.
> > 
> > "online" has nothing to do with it.
> > Do you mean html as processed by a modern browser?
> > 
> > No, clientside javascript can only do what it does,
> > 
> > 
> > 
> > >> if (debug=='on') { }; 
> > >> 
> > >> > That way you could swithch between extensive printouts, or just
> > >> > result. 
> > >> 
> > >> You clould also just disregard the console,
> > >> or have your printer throw the paper directly into the trach-bin.
> > >>   
> > >> > How is this usually resolved in Javascript,
> > >  
> > > This is not just for debug purposes but to steer detail level of a
> > > calculation or a salary specificaion. 
> > 
> > You should use the DOM for that, and steer the DOM with your Javascript.
> > 
> > > I do realise that it is probably a database query, 
> > 
> > I don't think so.
> > 
> > > but there must be
> > > alot of realtime systems nowadays that is overwatched from
> > > webinterfaces? 
> > 
> > This above sentence means nothing to me.
> > 
> > > And there you may want to specify detail level of information for the
> > > process you want to study? 
> > 
> > =======================================
> > 
> > Well, try the following using DOM by clientside Javascript:
> > 
> > <!DOCTYPE html>
> > <span class='level1'>text 1 text</span><br>
> > <span class='level3'>text 3 text</span><br>
> > <span class='level2'>text 2 text</span><br>
> > <span class='level3'>text 3 text</span>
> > 
> > 
> > <script type='text/javascript'>
> > 
> > var Iwantlevel3gone = true;
> > 
> > if (Iwantlevel3gone) {
> >   var temp = document.querySelectorAll('.level3');
> >   for (i in temp) temp[i].style.display = 'none';
> > };
> > 
> > </script>
> > 
> > ==========================
> > 
> > Or use serverside Javascript by reloading the page:
> > 
> > <%
> > var level1, level2, level3, Iwantlevel3gone = true;
> > 
> > if (Iwantlevel3gone) {
> >   level1 = true;
> >   level2 = true;
> >   level3 = false;
> > };
> > %>
> > 
> > <% if (level2) { %>text 1 text<% } %><br>
> > <% if (level3) { %>text 3 text<% } %><br>
> > <% if (level2) { %>text 2 text<% } %><br>
> > <% if (level3) { %>text 3 text<% } %>
> > 
> > [not tested]
> > 
> > 
> > -- 
> > Evertjan.
> > The Netherlands.
> > (Please change the x'es to dots in my emailaddress)
> 
> You are correct Janevert i misunderstood, your example work perfectly fine with forms as was as console.
> 
> So if(debugOne), if(debugTwo) and so on it will be.

But the thing i find distorumbing is a printout in a loop will have to check again and again. It would had been better to flag the whole line /statement as not for execution with a boolean.

It seem a waiste of cycles doing it again and again.

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


#28685

From"Evertjan." <exxjxw.hannivoort@inter.nl.net>
Date2015-09-11 16:42 +0200
Message-ID<XnsA512A9EEA658eejj99@194.109.6.166>
In reply to#28683
jonas.thornvall@gmail.com wrote on 11 Sep 2015 in comp.lang.javascript:

> But the thing i find distorumbing is a printout in a loop will have to
> check again and again. It would had been better to flag the whole line
> /statement as not for execution with a boolean. 

1 it is not print-out, it is screen-display.

2 "better"???, how many cycles you expect, 20.000 ? 

3 you can cchange the content of a class-rule, if you like,
in javascript/css/DOM there are many ways to an end.

What about the serverside javascript solution?
if the more detailed display is seldom used, 
it is more efficient.

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

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


#28686

Fromjonas.thornvall@gmail.com
Date2015-09-11 07:51 -0700
Message-ID<03985902-067a-4081-bd3c-13ee96d9f66d@googlegroups.com>
In reply to#28685
Den fredag 11 september 2015 kl. 16:42:25 UTC+2 skrev Evertjan.:
> jonas.thornvall@gmail.com wrote on 11 Sep 2015 in comp.lang.javascript:
> 
> > But the thing i find distorumbing is a printout in a loop will have to
> > check again and again. It would had been better to flag the whole line
> > /statement as not for execution with a boolean. 
> 
> 1 it is not print-out, it is screen-display.
> 
> 2 "better"???, how many cycles you expect, 20.000 ? 
> 
> 3 you can cchange the content of a class-rule, if you like,
> in javascript/css/DOM there are many ways to an end.
> 
> What about the serverside javascript solution?
> if the more detailed display is seldom used, 
> it is more efficient.
> 
> -- 
> Evertjan.
> The Netherlands.
> (Please change the x'es to dots in my emailaddress)

Well the extra screen-display was only about 30 ms so i have to optimise something else.

http://jt.node365.se/baseconversion12.html

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


#28679

Fromjonas.thornvall@gmail.com
Date2015-09-11 02:58 -0700
Message-ID<c88cb7e9-1f95-4b38-8ee8-9f8ad85f656f@googlegroups.com>
In reply to#28676
Den fredag 11 september 2015 kl. 11:25:05 UTC+2 skrev Evertjan.:
> jonas.thornvall@gmail.com wrote on 11 Sep 2015 in comp.lang.javascript:
> 
> > Sometimes when programming one wants traces of operation to be printout,
> > to derive how a value was achieved, but in the general case one just
> > want the result out within form. 
> 
> I don't think so, why would you want "traces of operation" on paper?
> 
> Perhaps you mean you want to see it in the console.log?
> 
> console.log('value of a is: ' + a);
> 
> > Is there a way to steer what rows should be interpretated/run by using a
> > flag. 
> 
> if (debug=='on') console.log('value of a is: ' + a);
> 
> > It would be neat if one could use a none Javscript symbol at start
> > of line 
> 
> What is a "none Javscript symbol"?
> A "non-Javascript symbol"? 
> A "known Javascript symbol"? 
> 
> Javascript essentially has no start-of-line.
> The newline does not mean much.
> 
> Change the word "line" to "statement",
> where statement" could also be a group of consecutive statements within { }. 
> 
> 
> > and then use a bolean flag  to tell the interpretator if that
> 
> script-interpretor I would say.
> 
> > line should be interpretated or not. 
> 
> if (debug=='on') { }; 
> 
> > That way you could swithch between extensive printouts, or just result.
> 
> You clould also just disregard the console,
> or have your printer throw the paper directly into the trach-bin.
>   
> > How is this usually resolved in Javascript, 
> 
> By debugging, see above.
> 
> You can also set and use breakpoints with the Developer Tool [usually F12]
> 
> > is there any language that
> > support the kind of behaviour i suggest? 
> 
> The behavour is called "debugging",
> if I understand your suggestion correctly.
> 
> I sugggest:
> 
> https://www.google.com/search?q=javascript+debugging+tutorial
> 
> > is there any language that
> 
> Only Javascript is on topic in this NH. 
> Debugging is a general concept much much older than Javascript.
> 
> -- 
> Evertjan.
> The Netherlands.
> (Please change the x'es to dots in my emailaddress)

By the way Evertjan, i did find the bug for the baseconversion it was rather silly.

If you find a base that gives wrong answer tell about it. For giant bases it can stall, but i have not found a base where the sanity check is not true.

http://jt.node365.se/baseconversion11.html

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


#28681

From"Evertjan." <exxjxw.hannivoort@inter.nl.net>
Date2015-09-11 12:43 +0200
Message-ID<XnsA512817AA1709eejj99@194.109.6.166>
In reply to#28679
jonas.thornvall@gmail.com wrote on 11 Sep 2015 in comp.lang.javascript:

> Den fredag 11 september 2015 kl. 11:25:05 UTC+2 skrev Evertjan.:
>> jonas.thornvall@gmail.com wrote on 11 Sep 2015 in comp.lang.javascript:
>> 
>> > Sometimes when programming one wants traces of operation to be
>> > printout, to derive how a value was achieved, but in the general case
>> > one just want the result out within form. 
>> 
>> I don't think so, why would you want "traces of operation" on paper?
>> 
>> Perhaps you mean you want to see it in the console.log?
>> 
>> console.log('value of a is: ' + a);
>> 
>> > Is there a way to steer what rows should be interpretated/run by
>> > using a flag. 
>> 
>> if (debug=='on') console.log('value of a is: ' + a);
>> 
>> > It would be neat if one could use a none Javscript symbol at start
>> > of line 
>> 
>> What is a "none Javscript symbol"?
>> A "non-Javascript symbol"? 
>> A "known Javascript symbol"? 
>> 
>> Javascript essentially has no start-of-line.
>> The newline does not mean much.
>> 
>> Change the word "line" to "statement",
>> where statement" could also be a group of consecutive statements within
>> { }. 
>> 
>> 
>> > and then use a bolean flag  to tell the interpretator if that
>> 
>> script-interpretor I would say.
>> 
>> > line should be interpretated or not. 
>> 
>> if (debug=='on') { }; 
>> 
>> > That way you could swithch between extensive printouts, or just
>> > result. 
>> 
>> You clould also just disregard the console,
>> or have your printer throw the paper directly into the trach-bin.
>>   
>> > How is this usually resolved in Javascript, 
>> 
>> By debugging, see above.
>> 
>> You can also set and use breakpoints with the Developer Tool [usually
>> F12] 
>> 
>> > is there any language that
>> > support the kind of behaviour i suggest? 
>> 
>> The behavour is called "debugging",
>> if I understand your suggestion correctly.
>> 
>> I sugggest:
>> 
>> https://www.google.com/search?q=javascript+debugging+tutorial
>> 
>> > is there any language that
>> 
>> Only Javascript is on topic in this NH. 
>> Debugging is a general concept much much older than Javascript.
>> 
>> -- 
>> Evertjan.
>> The Netherlands.
>> (Please change the x'es to dots in my emailaddress)
> 
> By the way Evertjan, i did find the bug for the baseconversion it was
> rather silly. 

You do not make sense, this is no response to the above or to the subject of 
the tread.

This is usenet, not email, so try to follow Netiquette!

> If you find a base that gives wrong answer tell about it. For giant
> bases it can stall, but i have not found a base where the sanity check
> is not true. 
> 
> http://jt.node365.se/baseconversion11.html
> 



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

[toc] | [prev] | [standalone]


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


csiph-web