c without usin any graphics function

R

Richard

Richard Heathfield said:
Chris Hills said:


The C Standard doesn't define, or even use, the term "platform", so we
can't guarantee that we are using the word in the same way.

Two programmers talking to each other can. if you can't then you have
lost all links with reality.
int (C doesn't define the term "Int"). In my previous reply I pointed
out why your assumption is not necessarily correct.

I sometimes wonder if you can hear yourself or bother to see who you are
replying to. I would say a technical meeting with you would be akin to
rubbing vinegar into ones own eyeballs while sitting on a bed of glowing
coals.
 
C

Chris Dollin

Richard said:
Two programmers talking to each other can.

And if you were one of them, you could proffer your understanding of
the term.

(Mr Heathfield should have made the first move in that game, I agree.)
 
R

Richard Heathfield

Chris Dollin said:
And if you were one of them, you could proffer your understanding of
the term.

(Mr Heathfield should have made the first move in that game, I agree.)

Chris (no, the other one) introduced the term. I still don't know what
he means by it. I can guess, but I don't *know*. My guess is that he
means "OS", and this guess is based on the fact that he said "MS
platform", even though it does appear that the OP is probably using a
compiler written by Borland. But I'm not certain. Maybe he means
"implementation" and believes <conio.h> to be a Microsoftism.

I think it's up to Chris (no, the other one) to define the meanings of
the non-standard terms he introduces into the discussion.
 
R

Richard

Chris Dollin said:
And if you were one of them, you could proffer your understanding of
the term.

(Mr Heathfield should have made the first move in that game, I agree.)

It is a non issue in a technical group discussing C. Heathfield is
overly pedantic and up himself, great C programmer though he might be.
 
C

Chris Dollin

Richard said:
Chris Dollin said:


Chris (no, the other one) introduced the term. I still don't know what
he means by it. I can guess, but I don't *know*. My guess is that he
means "OS", and this guess is based on the fact that he said "MS
platform", even though it does appear that the OP is probably using a
compiler written by Borland. But I'm not certain. Maybe he means
"implementation" and believes <conio.h> to be a Microsoftism.

I think it's up to Chris (no, the other one) to define the meanings of
the non-standard terms he introduces into the discussion.

But given that he didn't, I believe a better move in the game "constructive
discussion" would have been "I'm not sure what you mean by 'platform' here;
is it just the local OS or what?", rather than the move you made.

We have enough aggro here (yes, I'm not disputing that I've contributed;
I make no claims to perfection, only about it). I'm just wondering about
adding "crush them with kindness" to the toolbag, for whatever one's
value of "them" [1] might be. We can't all be Chris Torek -- there'd
be no room in the kitchen -- but /he/ manages to be topical /and/
non-abrasive.
 
R

Richard

Richard Heathfield said:
Chris Dollin said:


Chris (no, the other one) introduced the term. I still don't know what
he means by it. I can guess, but I don't *know*. My guess is that he
means "OS", and this guess is based on the fact that he said "MS
platform", even though it does appear that the OP is probably using a

So it was perfectly clear then. It is an MS Platform. MS. Platform. But
since you dont care about any specifics then it really doesn't matter if
its a platform for social re-engineering since it mentioned a platform, a
platform specific include and is therefore "OT".
compiler written by Borland. But I'm not certain. Maybe he means
"implementation" and believes <conio.h> to be a Microsoftism.

Does it matter. It works for him.
I think it's up to Chris (no, the other one) to define the meanings of
the non-standard terms he introduces into the discussion.

What do you mean by "discussion" here?

See? Silly isn't it.
 
O

osmium

Walter Roberson said:
The OP did not require that the drawn line proceed straight from
the beginning to ending coordinates. If the coordinates are
integral and finite, then you could draw a 45 degree line of length
min(abs(x1-x0),abs(y1-y0)), and a straight line of length
max(abs(x1-x0),abs(y1-y0))-min(abs(x1-x0),abs(y1-y0))
provided that the shorter of these two fit whatever page-size is in use.

My preference when answering is to start out by assuming the OP is not a
moron.
 
C

Chris Dollin

Richard said:
So it was perfectly clear then.

The word "guess" indicates otherwise. Furthermore, the person who can
say yay or nay -- viz, Chris Hills -- hasn't spoken on it yet. Your
guess is just that -- another guess.
What do you mean by "discussion" here?

Good question. "Aggravated argument" would sometimes be closer. But
while what "platform" meant seems to make a different to what Mr
Heathfield would have said, would what "discussion" means make a
difference to what /you/ say?
See? Silly isn't it.

Can't tell. By the same logic as I applied before, /your/ move should
have been to say that you weren't sure what "discussion" meant, this
is what you thought, and how did that fit?
 
R

Richard Heathfield

Chris Dollin said:
But given that he didn't, I believe a better move in the game
"constructive discussion" would have been "I'm not sure what you mean
by 'platform' here; is it just the local OS or what?", rather than the
move you made.

Perhaps. I make no claim to perfection. But I wasn't trying to pull
Chris(no, the other one)'s nose or anything. I just didn't word it very
well. I still think it would be better for Chris (no, the other one) to
clarify what he's talking about.

We can't all be Chris Torek -- there'd be no room in the kitchen

Perhaps we need to build an extension.
-- but /he/ manages to be topical /and/ non-abrasive.

Yes, he manages it admirably. His killfile must be simply colossal.
 
C

Chris Dollin

Richard said:
Chris Dollin said:

Perhaps we need to build an extension.

If we exceed the capacity of the kitchen, it follows that the behaviour
will be undefined. This is a suitable place for an implementation to
have an extension. However, I think the current kitchen (and coffee)
owner should have a say.
Yes, he manages it admirably. His killfile must be simply colossal.

I don't think it's (just) his killfile.
 
R

Richard Heathfield

Chris Dollin said:

I don't think it's (just) his killfile.

No, I know. But it's almost certainly a factor. I cannot help but notice
that, since killfiling the Three clc Trolls and *@gmail.com, I've been
involved in far fewer abrasive discussions.

Chris (no, the other one) is clearly both sincere and clueful, and I do
not regard my discussion with him as being particularly abrasive (even
though I vehemently disagree with his notion of topicality).

I remember a 2000AD snippet in which a character has a dial on his
forehead marked 1-4, and the caption reads "on 1, I'm mean; on 2, I get
nasty; but for you, I'm going right up to 3!" I think my discussions
with Chris (no, the other one) are way down at the 0.1 to 0.2 mark.

Of course, he can try for 4 if he likes, but (a) I think he's too bright
for that, and (b) anyone who does try that on me is likely to hit the
killfile before they get much above 1.5 or so.
 
W

Walter Roberson

He is apparently using an MS platform. If you can't tell that perhaps
you should not be giving any advice.

What evidence do you have to support those conclusions?

All *I* see is that his posting headers indicate that he *posted*
from MSIE on Windows NT. The platform he posted from is a very
different question from the platform he has to write the program for.

The OP's question read to me much like homework, or perhaps
an interview question: a required outcome with an apparently
non-sensical restriction. In either case, the target platform
could very easily have been something different than the posting
platform.
 
K

Kenneth Brody

Gordon said:
Does "ASCII art" qualify as drawing a line? ( ---------- or _________
or you can use "character pixels" where every character position on a
(large) piece of paper is, say, @ or space). At least it doesn't
require graphics hardware.

Is "ASCII art" a graphics function?

It's not portable as far as clc is concerned, as ASCII is not required.

(Does C require that "|" and "_" exist in the character set?)

--
+-------------------------+--------------------+-----------------------+
| Kenneth J. Brody | www.hvcomputer.com | #include |
| kenbrody/at\spamcop.net | www.fptech.com | <std_disclaimer.h> |
+-------------------------+--------------------+-----------------------+
Don't e-mail me at: <mailto:[email protected]>
 
W

Walter Roberson

Kenneth Brody said:
(Does C require that "|" and "_" exist in the character set?)

Yes to both, in both the source and execution character set.
In the official printed C89 document, section 2.2.1,
the bar shown is the solid bar, not the broken bar. The bar
is also trigraphed as ??!
 
K

Keith Thompson

Chris Hills said:
Keith Thompson said:
This header is non-standard.

A more useful comment is that this only works on and MS platform?
[snip]

Et too... No need to keep up the "this is not standard C" mantra
Either be helpful or don't get involved.

My primary aim was to be helpful to the original poster ("shaanxxx",
who asked about drawing lines without graphics functions), by letting
him and any other readers know that "georgerxz" is offering bad
advice. The latter, judging by what he's posted here and by what's on
his web site, seems to be unaware that these DOS-specific features
aren't part of standard C. If "georgerxz" learns something from my
comments as well, so much the better.

It's likely that the posted code works on MS platforms, but since I
don't do any MS-specific programming, I chose not to comment on that.
There are plenty of places to discuss DOS-specific programming. Even
if you wish to argue that it would be appropriate in this newsgroup,
it would not be appropriate in this thread. Since the OP said nothing
about the platform he's using, and posted to comp.lang.c, I have to
assume he's not looking for a system-specific solution. (It's unclear
just what he is looking for, but he hasn't bothered to come back and
clarify it.)
 
K

Keith Thompson

Chris Hills said:
The C standard is not relevant at this point. What is relevant that he
constructs a good program using C with the extensions available for
his platform. Portability is a non issue here.

How did you arrive at that conclusion? Perhaps there's some confusion
about who the original poster was.

Here's the post that started this thread, posted by
"shaanxxx <[email protected]>":
| if u give cordinates to programme at run time and want a line to be
| drawn.. how to do this in c without usin any graphics function?
| like x1,y1 and x2,y2
| and lines should be drawn from the 1st co-ordinate to 2nd one
|
| any pointer would be appreciated
|
| Thanks

The original poster said nothing about what platform (C
implementation, operating system, whatever) he's using. Either the OP
is looking for a portable solution, or he should be asking elsewhere.
(Since he hasn't responded to several requests for clarification, I
suggest that it's not worthwhile to guess what he really meant.)

This was followed by a proposed solution that was extremely dependent
on what I assume to be MS-DOS extensions -- and the evidence suggests
that the poster isn't even aware that such extensions are
non-portable.
 
C

CBFalconer

.... snip ...

#include<stdio.h>
#include<conio.h>

No such include file in std C.
void main()

Bad. main returns int. Say so. Use "int main(void)"
{
int b=176;
textcolor(8); // Use this inbuilt function in C to change the
color of text

Very bad. no such function. Also C90 doesn't allow // comments.
textbackground(123); /* use this inbuilt function to change the color

Once more, no such function in std. C.
of background screen just change the argument passed to the function
color of screen will change depending upon the graphics card installed
and monitors color support */

for(b=176;b<224;b++) {

"b" was already initialized. Lack of blanks in statement.
printf("\n\t %c",b);

Unknown output. Depends on char set in effect.
}

/* Above for loop will print the characters available in C for
graphics programming you can use these characters to design GUI
(graphical user interface) for your application. Even The turboc
Editor can be designed with the above characters. Just you have
to use the for and while loop properly */

getch();

No such function in standard C

Failure to return a status value. Very bad.
No final '\n' is emitted, losing output.
For More C Source Codes and tutorials refer
http://zsoftwares.googlepages.com/CPrograms.html

I assume the above example of 2 good lines and 7 bad lines is
typical. I ignored lines containing nothing but '}' apart from the
final error. The only correct lines were:

#include <stdio.h>
int b = 176;

Please don't give advice. Do feel free to ask questions.
 
C

CBFalconer

Chris said:
.... snip ...


He is apparently using an MS platform. If you can't tell that
perhaps you should not be giving any advice.

MS platforms are OT, as you well know. The subject is the C
language, and its care and feeding.
 
K

Kenny McCormack

I sometimes wonder if you can hear yourself or bother to see who you are
replying to. I would say a technical meeting with you would be akin to
rubbing vinegar into ones own eyeballs while sitting on a bed of glowing
coals.[/QUOTE]

I can't begin to tell you how much I would far prefer the vinegar and
the coals to a (ecch!) meeting with Heathfield.
 
K

kuyper

Richard Heathfield wrote:
....
Chris (no, the other one) introduced the term. I still don't know what
he means by it. I can guess, but I don't *know*. My guess is that he
means "OS", and this guess is based on the fact that he said "MS
platform", even though it does appear that the OP is probably using a
compiler written by Borland. But I'm not certain. Maybe he means
"implementation" and believes <conio.h> to be a Microsoftism.

I think it's up to Chris (no, the other one) to define the meanings of
the non-standard terms he introduces into the discussion.

All of them? Every single one? That could be a large subset of the
English language. I haven't noticed you routinely defining every term
you use that isn't in the standard.
In the standard itself, and in discussion of the standard, you should
normally understand every term that isn't defined by the standard
itself as having it's conventional in-context ordinary English
meaning, I see no reason not to apply that rule to "platform" in this
context.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top