By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,557 Members | 1,406 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,557 IT Pros & Developers. It's quick & easy.

strange getch+kbhit behaviour

P: n/a
In the following code something strange happens ! If I keep pressed any
of ALT+Arrow, keys, they are extracted two times from buffer then getch
seems to stop; if I release and press again ALT+arrow nothing changes:
the only way to exit from this condition is press another key a single
time.
What seems to happen is that kbhit say some keys are present in buffer
but for getch don't see any data and waits for a key. Why this happen ?
If I remove the delay all is working correctly. I've inserted a delay
to reproduce thi problem that I've found on another bigger project
where loop delay is 155ms.
Last thing: I've verified this problem only on newer motherboards !

Please help me !!
Thank you.
Simone
#include <stdio.h>
#include <dpmi.h>

int Handle()
{
int vv;

int lo, hi;

__dpmi_regs reg;

reg.x.ax = 0x10 << 8; /* shift 10h into AH */
__dpmi_int( 0x16, &reg);

vv= reg.x.ax ;
lo = vv & 0X00FF;
hi= ( vv & 0XFF00) >8;
vv=( ((lo == 0)|(lo == 224)) ? hi+256 : lo);

return vv;

} // Handle
int main(void)
{
int i;

do
{
i=0;
while(kbhit())
{
fprintf(stdout,"i=%d\n",i++);
fprintf(stdout,"%c\n",getch());
}

fprintf(stdout,"%d\n",Handle());
delay(155);

} while(1);
}
Sep 21 '06 #1
Share this Question
Share on Google+
45 Replies


P: n/a
simnav wrote:
In the following code something strange happens ! If I keep pressed any
of ALT+Arrow, keys, they are extracted two times from buffer then getch
seems to stop; if I release and press again ALT+arrow nothing changes:
the only way to exit from this condition is press another key a single
time.
What seems to happen is that kbhit say some keys are present in buffer
but for getch don't see any data and waits for a key. Why this happen ?
If I remove the delay all is working correctly. I've inserted a delay
to reproduce thi problem that I've found on another bigger project
where loop delay is 155ms.
Last thing: I've verified this problem only on newer motherboards !

Please help me !!
Thank you.
Simone
#include <stdio.h>
#include <dpmi.h>

int Handle()
{
int vv;

int lo, hi;

__dpmi_regs reg;

reg.x.ax = 0x10 << 8; /* shift 10h into AH */
__dpmi_int( 0x16, &reg);

vv= reg.x.ax ;
lo = vv & 0X00FF;
hi= ( vv & 0XFF00) >8;
vv=( ((lo == 0)|(lo == 224)) ? hi+256 : lo);

return vv;

} // Handle
int main(void)
{
int i;

do
{
i=0;
while(kbhit())
{
fprintf(stdout,"i=%d\n",i++);
fprintf(stdout,"%c\n",getch());
}

fprintf(stdout,"%d\n",Handle());
delay(155);

} while(1);
}
getch() probably expects an ASCII character, not just some
keyboard key
Sep 21 '06 #2

P: n/a
jacob navia said:
simnav wrote:
<snip>
>What seems to happen is that kbhit say some keys are present in buffer
but for getch don't see any data and waits for a key. Why this happen ?
<snip>
>
getch() probably expects an ASCII character, not just some
keyboard key
That incorrect answer is a great example of why you should ask
platform-specific questions on a newsgroup devoted to the appropriate
platform.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
Sep 21 '06 #3

P: n/a
"simnav" <nospamtnxwrites:
In the following code something strange happens ! If I keep pressed any
of ALT+Arrow, keys, they are extracted two times from buffer then getch
seems to stop; if I release and press again ALT+arrow nothing changes:
the only way to exit from this condition is press another key a single
time.
Your article was off-topic the first three times you posted it.
It is still off-topic. Please take it to a group that discusses
getch and kbhit. I suspect you want an MS-DOS programming
newsgroup.
--
"You call this a *C* question? What the hell are you smoking?" --Kaz
Sep 21 '06 #4

P: n/a
On Thu, 21 Sep 2006, Richard Heathfield wrote:
jacob navia said:
>simnav wrote:
<snip>
>>What seems to happen is that kbhit say some keys are present in buffer
but for getch don't see any data and waits for a key. Why this happen ?
<snip>
>>
getch() probably expects an ASCII character, not just some
keyboard key

That incorrect answer is a great example of why you should ask
platform-specific questions on a newsgroup devoted to the appropriate
platform.
How could a sentence with the adverb ``probably'' be
incorrect? :-) FWIW, ``probably'' probably means ``with
likelihood (though not with certainty)'' (OED 1989, 1).

Tak-Shing
Sep 21 '06 #5

P: n/a
Tak-Shing Chan said:
On Thu, 21 Sep 2006, Richard Heathfield wrote:
>jacob navia said:
>>simnav wrote:
<snip>
>>>What seems to happen is that kbhit say some keys are present in buffer
but for getch don't see any data and waits for a key. Why this happen ?
<snip>
>>>
getch() probably expects an ASCII character, not just some
keyboard key

That incorrect answer is a great example of why you should ask
platform-specific questions on a newsgroup devoted to the appropriate
platform.

How could a sentence with the adverb ``probably'' be
incorrect? :-) FWIW, ``probably'' probably means ``with
likelihood (though not with certainty)'' (OED 1989, 1).
The probability is so low as to be not worth considering. To find out why,
ask in a newsgroup where getch() is topical.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
Sep 21 '06 #6

P: n/a
On Thu, 21 Sep 2006, Richard Heathfield wrote:
Tak-Shing Chan said:
>On Thu, 21 Sep 2006, Richard Heathfield wrote:
>>jacob navia said:

simnav wrote:
<snip>
What seems to happen is that kbhit say some keys are present in buffer
but for getch don't see any data and waits for a key. Why this happen ?
<snip>

getch() probably expects an ASCII character, not just some
keyboard key

That incorrect answer is a great example of why you should ask
platform-specific questions on a newsgroup devoted to the appropriate
platform.

How could a sentence with the adverb ``probably'' be
incorrect? :-) FWIW, ``probably'' probably means ``with
likelihood (though not with certainty)'' (OED 1989, 1).

The probability is so low as to be not worth considering. To find out why,
ask in a newsgroup where getch() is topical.
Given that "conio.h" is not included in the OP's code, it
might very well behave differently from the getch() you know of.

Tak-Shing
Sep 21 '06 #7

P: n/a
Tak-Shing Chan said:
On Thu, 21 Sep 2006, Richard Heathfield wrote:
<snip>
>The probability is so low as to be not worth considering. To find out
why, ask in a newsgroup where getch() is topical.

Given that "conio.h" is not included in the OP's code, it
might very well behave differently from the getch() you know of.
Were it topical so to do, I would ask which one you are referring to, since
I know of several. But since it isn't, I won't. I suggest you take this up
in a newsgroup where it's topical.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
Sep 21 '06 #8

P: n/a
On Thu, 21 Sep 2006, Richard Heathfield wrote:
Tak-Shing Chan said:
>On Thu, 21 Sep 2006, Richard Heathfield wrote:
<snip>
>>The probability is so low as to be not worth considering. To find out
why, ask in a newsgroup where getch() is topical.

Given that "conio.h" is not included in the OP's code, it
might very well behave differently from the getch() you know of.

Were it topical so to do, I would ask which one you are referring to, since
I know of several. But since it isn't, I won't. I suggest you take this up
in a newsgroup where it's topical.
You have completely missed my point, which is that the OP
could have been using a userland kbhit() and getch(), not the
ones provided by the implementation.

Tak-Shing
Sep 21 '06 #9

P: n/a
Tak-Shing Chan said:

<snip>
You have completely missed my point,
No, I haven't. You just think I have.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
Sep 21 '06 #10

P: n/a
Op Thu, 21 Sep 2006 18:28:15 +0100 schreef Tak-Shing Chan:
On Thu, 21 Sep 2006, Richard Heathfield wrote:
>Tak-Shing Chan said:
>>On Thu, 21 Sep 2006, Richard Heathfield wrote:

jacob navia said:

simnav wrote:
<snip>
>What seems to happen is that kbhit say some keys are present in buffer
>but for getch don't see any data and waits for a key. Why this happen ?
<snip>
>
getch() probably expects an ASCII character, not just some
keyboard key

That incorrect answer is a great example of why you should ask
platform-specific questions on a newsgroup devoted to the appropriate
platform.

How could a sentence with the adverb ``probably'' be
incorrect? :-) FWIW, ``probably'' probably means ``with
likelihood (though not with certainty)'' (OED 1989, 1).

The probability is so low as to be not worth considering. To find out why,
ask in a newsgroup where getch() is topical.

Given that "conio.h" is not included in the OP's code, it
might very well behave differently from the getch() you know of.

Tak-Shing
Would the following not be off-topic?
#include <dpmi.h>
Non-standard header.
int Handle()
{
int vv;

int lo, hi;

__dpmi_regs reg;
Use of underscores is not recommended to non-implementers.
>
reg.x.ax = 0x10 << 8; /* shift 10h into AH */
C does not know anything about registers. I do, but not in this news group.
__dpmi_int( 0x16, &reg);
Nor about interrupts.
--
Coos
Sep 21 '06 #11

P: n/a
In article <sY********************@bt.com>,
Richard Heathfield <in*****@invalid.invalidwrote:
>Tak-Shing Chan said:

<snip>
> You have completely missed my point,

No, I haven't. You just think I have.
Very mature.

Sep 21 '06 #12

P: n/a
Tak-Shing Chan wrote:
On Thu, 21 Sep 2006, Richard Heathfield wrote:
.... snip ...
>>
Were it topical so to do, I would ask which one you are referring
to, since I know of several. But since it isn't, I won't. I suggest
you take this up in a newsgroup where it's topical.

You have completely missed my point, which is that the OP
could have been using a userland kbhit() and getch(), not the
ones provided by the implementation.
You have completely missed Richards point, which is that those
things are off-topic here. The only way to make them on-topic is
to include the actual code for kbhit() and getch(), written in ISO
standard C. The OP did not so do. You compounded the error by
discussing them instead of referring the OP to a suitable group, or
advising him of the non-topicality involved.

--
Some informative links:
news:news.announce.newusers
http://www.geocities.com/nnqweb/
http://www.catb.org/~esr/faqs/smart-questions.html
http://www.caliburn.nl/topposting.html
http://www.netmeister.org/news/learn2quote.html

--
Posted via a free Usenet account from http://www.teranews.com

Sep 21 '06 #13

P: n/a
On Thu, 21 Sep 2006, Richard Heathfield wrote:
Tak-Shing Chan said:

<snip>
> You have completely missed my point,

No, I haven't. You just think I have.
My point is that there is a possibility that getch() has
nothing to do with the OP's platform, in which case ``a newsgroup
where it's topical'' does not exist. You have certainly missed
this point.

Tak-Shing
Sep 21 '06 #14

P: n/a
Tak-Shing Chan said:
On Thu, 21 Sep 2006, Richard Heathfield wrote:
>Tak-Shing Chan said:

<snip>
>> You have completely missed my point,

No, I haven't. You just think I have.

My point is that there is a possibility that getch() has
nothing to do with the OP's platform,
Yes, but it's a possibility having low probability, as you well know.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
Sep 21 '06 #15

P: n/a
On Thu, 21 Sep 2006, Coos Haak wrote:
Op Thu, 21 Sep 2006 18:28:15 +0100 schreef Tak-Shing Chan:
>[snip]

Given that "conio.h" is not included in the OP's code, it
might very well behave differently from the getch() you know of.

Tak-Shing

Would the following not be off-topic?
>#include <dpmi.h>
Non-standard header.
I did not write this. Learn how to quote!

[snip]

Tak-Shing

P.S. I am aware that the OP is off-topic. However, my point was
that getch() is not a reserved identifier in ISO C (which is
topical enough).
Sep 21 '06 #16

P: n/a
On Thu, 21 Sep 2006, CBFalconer wrote:
Tak-Shing Chan wrote:
>On Thu, 21 Sep 2006, Richard Heathfield wrote:
... snip ...
>>>
Were it topical so to do, I would ask which one you are referring
to, since I know of several. But since it isn't, I won't. I suggest
you take this up in a newsgroup where it's topical.

You have completely missed my point, which is that the OP
could have been using a userland kbhit() and getch(), not the
ones provided by the implementation.

You have completely missed Richards point, which is that those
things are off-topic here. The only way to make them on-topic is
to include the actual code for kbhit() and getch(), written in ISO
standard C. The OP did not so do. You compounded the error by
discussing them instead of referring the OP to a suitable group, or
advising him of the non-topicality involved.
Where did I say that the OP is on-topic? In fact, I wrote
``the OP is off-topic'' in this very thread! My main point was
that getch is not a reserved identifier in ISO C (but my verbiage
was perhaps a bit convoluted).

Tak-Shing
Sep 21 '06 #17

P: n/a
Richard Heathfield wrote:

+AD4- jacob navia said:
+AD4- +AD4- getch() probably expects an ASCII character, not just some
+AD4- +AD4- keyboard key
+AD4-
+AD4- That incorrect answer is a great example of why you should ask
+AD4- platform-specific questions on a newsgroup devoted to the
appropriate
+AD4- platform.

Please accept my apologies for the two mistakes I did: incorrect
newsgroup and multi post (my newsreader is driven crazy and sent it too
many times...)
Anyway Jacob response was wrong in ANSI context but seems to be correct
on dos/djgpp platform: getkey() resolved the problem.

Thank you,
Simone
Sep 22 '06 #18

P: n/a
"simnav" <nospamtnxsaid:
Richard Heathfield wrote:

+AD4- jacob navia said:
+AD4- +AD4- getch() probably expects an ASCII character, not just some
+AD4- +AD4- keyboard key
+AD4-
+AD4- That incorrect answer is a great example of why you should ask
+AD4- platform-specific questions on a newsgroup devoted to the
appropriate
+AD4- platform.

Please accept my apologies for the two mistakes I did: incorrect
newsgroup and multi post (my newsreader is driven crazy and sent it too
many times...)
Anyway Jacob response was wrong in ANSI context but seems to be correct
on dos/djgpp platform:
Not even correct in /that/ context, because Delorie followed Borland's lead
with getch, and Navia's response was incompatible with Borland C's
behaviour and therefore incompatible with DJGPP's behaviour. You'd be
better off finding out how to use DJGPP's getch in a DOS programmers'
newsgroup.
getkey() resolved the problem.
....but didn't teach you why getch() didn't behave as you expected. You might
want to chase that down, in the interests of understanding what on earth is
going on.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
Sep 22 '06 #19

P: n/a
Tak-Shing Chan wrote:
>
On Thu, 21 Sep 2006, Richard Heathfield wrote:
jacob navia said:
[...]
getch() probably expects an ASCII character, not just some
keyboard key
That incorrect answer is a great example of why you should ask
platform-specific questions on a newsgroup devoted to the appropriate
platform.

How could a sentence with the adverb ``probably'' be
incorrect? :-) FWIW, ``probably'' probably means ``with
likelihood (though not with certainty)'' (OED 1989, 1).
"The sky will probably be green tomorrow."

"Passing random values to free() will probably not cause any problems."

"The next C standard will probably add the Windows API as part of the
standard library."

--
+-------------------------+--------------------+-----------------------+
| Kenneth J. Brody | www.hvcomputer.com | #include |
| kenbrody/at\spamcop.net | www.fptech.com | <std_disclaimer.h|
+-------------------------+--------------------+-----------------------+
Don't e-mail me at: <mailto:Th*************@gmail.com>
Sep 22 '06 #20

P: n/a
On Fri, 22 Sep 2006, Kenneth Brody wrote:
Tak-Shing Chan wrote:
>>
On Thu, 21 Sep 2006, Richard Heathfield wrote:
>>jacob navia said:
[...]
>>>getch() probably expects an ASCII character, not just some
keyboard key

That incorrect answer is a great example of why you should ask
platform-specific questions on a newsgroup devoted to the appropriate
platform.

How could a sentence with the adverb ``probably'' be
incorrect? :-) FWIW, ``probably'' probably means ``with
likelihood (though not with certainty)'' (OED 1989, 1).

"The sky will probably be green tomorrow."

"Passing random values to free() will probably not cause any problems."

"The next C standard will probably add the Windows API as part of the
standard library."
You are probably not using ``probably'' in sense 1 of OED
(above) which according to my reading means ``I believe that
there is a likelihood but I am not certain that...'' so as long
as Jacob believes what he says he is correct. IMHO.

Tak-Shing
Sep 22 '06 #21

P: n/a
On Fri, 22 Sep 2006 16:20:38 +0100, Tak-Shing Chan <t.****@gold.ac.uk>
wrote:
You are probably not using ``probably'' in sense 1 of OED
(above) which according to my reading means ``I believe that
there is a likelihood but I am not certain that...'' so as long
as Jacob believes what he says he is correct. IMHO.
<OTJacob's beliefs have nothing to do with probabilities. Look up
"belief" in the OED. </OT>

BTW, I think you're in the wrong newsgroup.

--
Al Balmer
Sun City, AZ
Sep 22 '06 #22

P: n/a
On Fri, 22 Sep 2006, Al Balmer wrote:
On Fri, 22 Sep 2006 16:20:38 +0100, Tak-Shing Chan <t.****@gold.ac.uk>
wrote:
> You are probably not using ``probably'' in sense 1 of OED
(above) which according to my reading means ``I believe that
there is a likelihood but I am not certain that...'' so as long
as Jacob believes what he says he is correct. IMHO.

<OTJacob's beliefs have nothing to do with probabilities. Look up
"belief" in the OED. </OT>

BTW, I think you're in the wrong newsgroup.
If he believes that there is a likelihood then it has some
implications on (subjective) probabilities. The keyword here is
likelihood (not belief).

And if you have read the entire thread, you will notice that
I am actually on the right newsgroup, because my point here is
that getch is in the user namespace so it would be improper to
summarily dismiss Jacob's post as ``incorrect''.

Tak-Shing
Sep 22 '06 #23

P: n/a
simnav wrote:

+AD4- User-Agent: XanaNews/1.17.5.9

+AD4- Please accept my apologies for the two mistakes I did: incorrect
+AD4- newsgroup and multi post (my newsreader is driven crazy and sent
it
+AD4- too many times...)
I've not noticed any such behavior with XanaNews. I suspect your
problems were of your own making, rather than your newsreader.


Brian
Sep 22 '06 #24

P: n/a
On Fri, 22 Sep 2006 16:20:38 +0100, in comp.lang.c , Tak-Shing Chan
<t.****@gold.ac.ukwrote:
>
You are probably not using ``probably'' in sense 1 of OED
(above) which according to my reading means ``I believe that
there is a likelihood but I am not certain that...''
Then your reading of the actual words you quoted was extremely
erroneous. The quote did not say
probably (adv) something someone believes to be true
--
Mark McIntyre

"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it."
--Brian Kernighan
Sep 22 '06 #25

P: n/a
On Fri, 22 Sep 2006 18:25:29 +0100, in comp.lang.c , Tak-Shing Chan
<t.****@gold.ac.ukwrote:
If he believes that there is a likelihood then it has some
implications on (subjective) probabilities.
Horsefeathers. Utter nonsense.
>The keyword here is likelihood (not belief).
I believe there's a likelihood of me winning the lottery. Does this
mean I probably will?

I hope you stop digging now, its a deep hole already.
--
Mark McIntyre

"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it."
--Brian Kernighan
Sep 22 '06 #26

P: n/a
Tak-Shing Chan wrote:
>
.... snip ...
>
And if you have read the entire thread, you will notice that
I am actually on the right newsgroup, because my point here is
that getch is in the user namespace so it would be improper to
summarily dismiss Jacob's post as ``incorrect''.
Nowhere in this thread, as far as I can see, does the standard C
source code for getch() appear. That makes it thoroughly
off-topic, and only deserving exposure on a newsgroup that
understands that function. This is not it.

--
Some informative links:
news:news.announce.newusers
http://www.geocities.com/nnqweb/
http://www.catb.org/~esr/faqs/smart-questions.html
http://www.caliburn.nl/topposting.html
http://www.netmeister.org/news/learn2quote.html

--
Posted via a free Usenet account from http://www.teranews.com

Sep 22 '06 #27

P: n/a
Default User wrote:
simnav wrote:

+AD4- User-Agent: XanaNews/1.17.5.9

+AD4- Please accept my apologies for the two mistakes I did: incorrect
+AD4- newsgroup and multi post (my newsreader is driven crazy and sent
+AD4- it too many times...)

I've not noticed any such behavior with XanaNews. I suspect your
problems were of your own making, rather than your newsreader.
What is that silly non-standard "+AD4-" doing marking quotes?

--
Some informative links:
news:news.announce.newusers
http://www.geocities.com/nnqweb/
http://www.catb.org/~esr/faqs/smart-questions.html
http://www.caliburn.nl/topposting.html
http://www.netmeister.org/news/learn2quote.html

--
Posted via a free Usenet account from http://www.teranews.com

Sep 22 '06 #28

P: n/a
CBFalconer wrote:
Default User wrote:
simnav wrote:

+AD4- User-Agent: XanaNews/1.17.5.9

+AD4- Please accept my apologies for the two mistakes I did:
incorrect +AD4- newsgroup and multi post (my newsreader is driven
crazy and sent +AD4- it too many times...)

I've not noticed any such behavior with XanaNews. I suspect your
problems were of your own making, rather than your newsreader.

What is that silly non-standard "+AD4-" doing marking quotes?
I've never heard this complaint before, nor seen it in quotes of
quotes. According to the settings in my newsreader, it should be the
"greater-than" symbol.

Do you see the same below?

Manually "quoted" line.


Brian
Sep 22 '06 #29

P: n/a
Mark McIntyre <ma**********@spamcop.netwrites:
On Fri, 22 Sep 2006 18:25:29 +0100, in comp.lang.c , Tak-Shing Chan
<t.****@gold.ac.ukwrote:
> If he believes that there is a likelihood then it has some
implications on (subjective) probabilities.

Horsefeathers. Utter nonsense.
>>The keyword here is likelihood (not belief).

I believe there's a likelihood of me winning the lottery. Does this
mean I probably will?

I hope you stop digging now, its a deep hole already.
I humbly submit that the hole, the shovel, the feathers, and the horse
they rode in on have far exceeded the bounds of topicality, relevance,
and interest.

Zero or more people in this thread were correct, zero or more people
in this thread were incorrect, and I see no benefit in figuring out
the details.

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <* <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Sep 22 '06 #30

P: n/a
On Fri, 22 Sep 2006, Mark McIntyre wrote:
On Fri, 22 Sep 2006 16:20:38 +0100, in comp.lang.c , Tak-Shing Chan
<t.****@gold.ac.ukwrote:
>>
You are probably not using ``probably'' in sense 1 of OED
(above) which according to my reading means ``I believe that
there is a likelihood but I am not certain that...''

Then your reading of the actual words you quoted was extremely
erroneous. The quote did not say
probably (adv) something someone believes to be true
Your reading of my reading is erroneous. It should have
been ``probably (adv) something someone believes to be plausible
but is not entirely sure''. For example, if I say ``the OP is
probably using a non-conforming compiler'', I am stating (1) my
belief that this scenerio is plausible, hence ``probably''; and
(2) that I am not entirely sure, hence ``probably''.

Tak-Shing
Sep 22 '06 #31

P: n/a
On Fri, 22 Sep 2006, Mark McIntyre wrote:
On Fri, 22 Sep 2006 18:25:29 +0100, in comp.lang.c , Tak-Shing Chan
<t.****@gold.ac.ukwrote:
> If he believes that there is a likelihood then it has some
implications on (subjective) probabilities.

Horsefeathers. Utter nonsense.
>The keyword here is likelihood (not belief).

I believe there's a likelihood of me winning the lottery. Does this
mean I probably will?

I hope you stop digging now, its a deep hole already.
According to my understanding of the language, ``I probably
will'' implies ``not sure if I will''. I do not know what you
are complaining about.

Tak-Shing
Sep 22 '06 #32

P: n/a
On Fri, 22 Sep 2006, CBFalconer wrote:
Tak-Shing Chan wrote:
>>
... snip ...
>>
And if you have read the entire thread, you will notice that
I am actually on the right newsgroup, because my point here is
that getch is in the user namespace so it would be improper to
summarily dismiss Jacob's post as ``incorrect''.

Nowhere in this thread, as far as I can see, does the standard C
source code for getch() appear. That makes it thoroughly
off-topic, and only deserving exposure on a newsgroup that
understands that function. This is not it.
But that is not my point. My point is that getch is not a
reserved identifier. This is a valid C point, as far as I know.

Tak-Shing
Sep 22 '06 #33

P: n/a
On Fri, 22 Sep 2006 21:42:09 +0100, Tak-Shing Chan <t.****@gold.ac.uk>
wrote:
Your reading of my reading is erroneous.
Enough. For the moment, I will only kill the thread, in the hope that
you will someday have something useful to say on some other (topical)
subject.

--
Al Balmer
Sun City, AZ
Sep 22 '06 #34

P: n/a
On Fri, 22 Sep 2006 21:42:09 +0100, in comp.lang.c , Tak-Shing Chan
<t.****@gold.ac.ukwrote:
>On Fri, 22 Sep 2006, Mark McIntyre wrote:
>On Fri, 22 Sep 2006 16:20:38 +0100, in comp.lang.c , Tak-Shing Chan
<t.****@gold.ac.ukwrote:
>>>
You are probably not using ``probably'' in sense 1 of OED
(above) which according to my reading means ``I believe that
there is a likelihood but I am not certain that...''

Then your reading of the actual words you quoted was extremely
erroneous. The quote did not say
probably (adv) something someone believes to be true

Your reading of my reading is erroneous.
D'you know what? I'm actually not interested in playing.
>It should have
been ``probably (adv) something someone believes to be plausible
but is not entirely sure''.
But you see, this is NOT the dictionary definition.

--
Mark McIntyre

"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it."
--Brian Kernighan
Sep 23 '06 #35

P: n/a
On Fri, 22 Sep 2006 21:47:08 +0100, in comp.lang.c , Tak-Shing Chan
<t.****@gold.ac.ukwrote:
>On Fri, 22 Sep 2006, Mark McIntyre wrote:

According to my understanding of the language, ``I probably
will'' implies ``not sure if I will''.
It most certainly does not.
>I do not know what you are complaining about.
I'm complaining about you continuing to dig when you should have said
"oops" about 20 posts ago.

*threadplonk*
--
Mark McIntyre

"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it."
--Brian Kernighan
Sep 23 '06 #36

P: n/a
Tak-Shing Chan wrote:
On Fri, 22 Sep 2006, CBFalconer wrote:
>Tak-Shing Chan wrote:
>>>
... snip ...
>>>
And if you have read the entire thread, you will notice that
I am actually on the right newsgroup, because my point here is
that getch is in the user namespace so it would be improper to
summarily dismiss Jacob's post as ``incorrect''.

Nowhere in this thread, as far as I can see, does the standard C
source code for getch() appear. That makes it thoroughly
off-topic, and only deserving exposure on a newsgroup that
understands that function. This is not it.

But that is not my point. My point is that getch is not a
reserved identifier. This is a valid C point, as far as I know.
But the code is not meaningful nor compilable without the getch
source, and thus nobody here can offer any accurate helpful code
criticisms or suggestions. Useless postings are off-topic.

Please correct the following. It doesn't seem to work.

bletch(violently);
if (foo.bar == GARBAGE) puts("garbage");
else reparse();

--
Some informative links:
news:news.announce.newusers
http://www.geocities.com/nnqweb/
http://www.catb.org/~esr/faqs/smart-questions.html
http://www.caliburn.nl/topposting.html
http://www.netmeister.org/news/learn2quote.html

--
Posted via a free Usenet account from http://www.teranews.com

Sep 23 '06 #37

P: n/a
Al Balmer wrote:
Tak-Shing Chan <t.****@gold.ac.ukwrote:
> Your reading of my reading is erroneous.

Enough. For the moment, I will only kill the thread, in the hope
that you will someday have something useful to say on some other
(topical) subject.
Not yet, but soon. I still have slight hopes of persuading
Tak-Shing of the advantages of topicality.

--
Some informative links:
news:news.announce.newusers
http://www.geocities.com/nnqweb/
http://www.catb.org/~esr/faqs/smart-questions.html
http://www.caliburn.nl/topposting.html
http://www.netmeister.org/news/learn2quote.html

--
Posted via a free Usenet account from http://www.teranews.com

Sep 23 '06 #38

P: n/a
Default User wrote:
CBFalconer wrote:
>Default User wrote:
>>simnav wrote:

+AD4- User-Agent: XanaNews/1.17.5.9

+AD4- Please accept my apologies for the two mistakes I did:
incorrect +AD4- newsgroup and multi post (my newsreader is driven
crazy and sent +AD4- it too many times...)

I've not noticed any such behavior with XanaNews. I suspect your
problems were of your own making, rather than your newsreader.

What is that silly non-standard "+AD4-" doing marking quotes?

I've never heard this complaint before, nor seen it in quotes of
quotes. According to the settings in my newsreader, it should be the
"greater-than" symbol.

Do you see the same below?
>Manually "quoted" line.
No, this posting is completely normal.

--
Some informative links:
news:news.announce.newusers
http://www.geocities.com/nnqweb/
http://www.catb.org/~esr/faqs/smart-questions.html
http://www.caliburn.nl/topposting.html
http://www.netmeister.org/news/learn2quote.html

--
Posted via a free Usenet account from http://www.teranews.com

Sep 23 '06 #39

P: n/a
In article <Pi*******************************@scorpio.gold.ac .ukTak-Shing Chan <t.****@gold.ac.ukwrites:
On Thu, 21 Sep 2006, Coos Haak wrote:
Op Thu, 21 Sep 2006 18:28:15 +0100 schreef Tak-Shing Chan:
>
Given that "conio.h" is not included in the OP's code, it
might very well behave differently from the getch() you know of.

Tak-Shing
Would the following not be off-topic?
#include <dpmi.h>
Non-standard header.

I did not write this. Learn how to quote!
Learn how to read. The OP did not include "conio.h", but he did
include "dpmi.h". The quote was directly from the original article.
--
dik t. winter, cwi, kruislaan 413, 1098 sj amsterdam, nederland, +31205924131
home: bovenover 215, 1025 jn amsterdam, nederland; http://www.cwi.nl/~dik/
Sep 23 '06 #40

P: n/a
On Fri, 22 Sep 2006, CBFalconer wrote:
Tak-Shing Chan wrote:
>On Fri, 22 Sep 2006, CBFalconer wrote:
>>Tak-Shing Chan wrote:

... snip ...

And if you have read the entire thread, you will notice that
I am actually on the right newsgroup, because my point here is
that getch is in the user namespace so it would be improper to
summarily dismiss Jacob's post as ``incorrect''.

Nowhere in this thread, as far as I can see, does the standard C
source code for getch() appear. That makes it thoroughly
off-topic, and only deserving exposure on a newsgroup that
understands that function. This is not it.

But that is not my point. My point is that getch is not a
reserved identifier. This is a valid C point, as far as I know.

But the code is not meaningful nor compilable without the getch
source, and thus nobody here can offer any accurate helpful code
criticisms or suggestions. Useless postings are off-topic.

Please correct the following. It doesn't seem to work.

bletch(violently);
if (foo.bar == GARBAGE) puts("garbage");
else reparse();
Incomplete posts per se are not off-topic. Only if the OP
has refused to post complete code after being asked to do so
would they become off-topic.

This will be my last post on this thread. I apologise for
prolonging this thread unnecessarily.

Tak-Shing
Sep 23 '06 #41

P: n/a
In article <45***************@yahoo.comcb********@maineline.net writes:
Tak-Shing Chan wrote:
....
But that is not my point. My point is that getch is not a
reserved identifier. This is a valid C point, as far as I know.

But the code is not meaningful nor compilable without the getch
source, and thus nobody here can offer any accurate helpful code
criticisms or suggestions. Useless postings are off-topic.
The original code is *obviously* OS dependent, it uses an include
file "dpmi.h" that is not defined. So it is only compilable if that
include file is present. I have no idea what OS that is (although
I can take a guess, I can not verify).
--
dik t. winter, cwi, kruislaan 413, 1098 sj amsterdam, nederland, +31205924131
home: bovenover 215, 1025 jn amsterdam, nederland; http://www.cwi.nl/~dik/
Sep 23 '06 #42

P: n/a
In article <45***************@yahoo.comcb********@maineline.net writes:
Default User wrote:
CBFalconer wrote:
Default User wrote:
....
>+AD4- User-Agent: XanaNews/1.17.5.9
....
What is that silly non-standard "+AD4-" doing marking quotes?
From the headers:
Content-Type: text/plain; charset=utf-7

....
Do you see the same below?
Manually "quoted" line.

No, this posting is completely normal.
Indeed. That was not in utf-7. UTF-7 is not really useful, see:
<http://en.wikipedia.org/wiki/UTF-7>.
--
dik t. winter, cwi, kruislaan 413, 1098 sj amsterdam, nederland, +31205924131
home: bovenover 215, 1025 jn amsterdam, nederland; http://www.cwi.nl/~dik/
Sep 23 '06 #43

P: n/a
CBFalconer wrote:
Default User wrote:
CBFalconer wrote:
Default User wrote:
simnav wrote:

+AD4- User-Agent: XanaNews/1.17.5.9

+AD4- Please accept my apologies for the two mistakes I did:
incorrect +AD4- newsgroup and multi post (my newsreader is driven
crazy and sent +AD4- it too many times...)

I've not noticed any such behavior with XanaNews. I suspect your
problems were of your own making, rather than your newsreader.
>
What is that silly non-standard "+AD4-" doing marking quotes?
I've never heard this complaint before, nor seen it in quotes of
quotes. According to the settings in my newsreader, it should be the
"greater-than" symbol.

Do you see the same below?
Manually "quoted" line.

No, this posting is completely normal.
That includes all the quotes? If so, then I suspect that the post I was
replying to contained something that made my newsreader switch to a
MIME mode or something.


Brian
Sep 23 '06 #44

P: n/a
CBFalconer wrote:
Default User wrote:
CBFalconer wrote:
Default User wrote:
simnav wrote:

+AD4- User-Agent: XanaNews/1.17.5.9

+AD4- Please accept my apologies for the two mistakes I did:
incorrect +AD4- newsgroup and multi post (my newsreader is driven
crazy and sent +AD4- it too many times...)

I've not noticed any such behavior with XanaNews. I suspect your
problems were of your own making, rather than your newsreader.
>
What is that silly non-standard "+AD4-" doing marking quotes?
I've never heard this complaint before, nor seen it in quotes of
quotes. According to the settings in my newsreader, it should be the
"greater-than" symbol.

Do you see the same below?
Manually "quoted" line.

No, this posting is completely normal.

I just took another look. The previous message from Simone had a funny
character in the subject line. When I do a reply to it, my newsreader
switches character sets from the default US ASCII to Unicode (UTF-7). I
suspect that's it.


Brian
Sep 23 '06 #45

P: n/a
Dik T. Winter wrote:
In article <45***************@yahoo.comcb********@maineline.net
writes: Default User wrote:
CBFalconer wrote:
Default User wrote:
...
>+AD4- User-Agent: XanaNews/1.17.5.9
...
What is that silly non-standard "+AD4-" doing marking quotes?

From the headers:
Content-Type: text/plain; charset=utf-7
Yep, see my post elsewhere. Looks like XanaNews takes on the charset of
the original in replies.

Brian

Sep 23 '06 #46

This discussion thread is closed

Replies have been disabled for this discussion.