CAD CAM EDM DRO - Yahoo Group Archive

Re: John Elson read this please

on 1999-10-18 05:14:27 UTC
getch() gets a single character at a time from the keyboard. Gobbling the
carriage\
return is actually a unix/dos difference. unix translates all newline
characters
as having a carriage return embedded automatically. Dos requires both.
This is why
printers used to have a dip switch to force a carraige return after each
line feed.


Marshall Pharoah
Software Engineer
Adirondac Software
PIC/6805/6811/68000
Asm/C/C++

-----Original Message-----
From: Jon Elson <jmelson@...>
To: CAD_CAM_EDM_DRO@onelist.com <CAD_CAM_EDM_DRO@onelist.com>
Date: Saturday, October 16, 1999 1:29 AM
Subject: Re: [CAD_CAM_EDM_DRO] John Elson read this please


>From: Jon Elson <jmelson@...>
>
>
>
>batwings@... wrote:
>
>> From: batwings@...
>>
>> At 11:36 PM 10/14/99 -0500, you wrote:
>> >Actually, I make a 'square' spiral, working out until the last pass at
>> each level
>> >reaches the finish clearance,
>>
>> Yeah that's what I meant. I actually decided to move out stepover in X
and
>> then stepover in X, giving 45 deg total change in tool pos. Then it would
>> do the rectilinear moves for that stepover and repeat again.
>>
>> I'd bet your prog will compile in C++ w/ no changes. I was curious about
>> why you used scanf() and then getch(); is that to fully flush the input
>> buffer? I use fflush(stdin) but C++ I think is said to be self-flushing.
>
>I think that getch() gobbles the carriage return charater at the end of the
>input line. That syntax is probably a holdover from the original Pascal
>program, which would have used read(---); read(---);readln(); and that
>is why the C looks like that.
>
>Jon
>

Discussion Thread

batwings@i... 1999-10-13 22:39:22 UTC John Elson read this please Jon Elson 1999-10-14 21:36:08 UTC Re: John Elson read this please batwings@x... 1999-10-14 19:51:35 UTC Re: John Elson read this please Jon Elson 1999-10-15 22:37:49 UTC Re: John Elson read this please Marshall Pharoah 1999-10-18 05:14:27 UTC Re: John Elson read this please