c interactive graphical output

J

jackiechan

I would like to test some things in C and make
a graphical output when running them , something like in java for example
http://www.cs.bell-labs.com/cm/cs/pearls/sortanim.html (without buttons
just circles rectangles and such things)
is there any extension (library) or any way to make similar (aplet-like
but not web-like) output ?? (not ploting into a file but dynamic -> it
changes like in that link when you click RUN)
 
C

Christopher Benson-Manica

jackiechan said:
I would like to test some things in C and make
a graphical output when running them , something like in java for example
http://www.cs.bell-labs.com/cm/cs/pearls/sortanim.html (without buttons
just circles rectangles and such things)
is there any extension (library) or any way to make similar (aplet-like
but not web-like) output ?? (not ploting into a file but dynamic -> it
changes like in that link when you click RUN)

Not in C:

http://www.ungerhu.com/jxh/clc.welcome.txt
http://www.eskimo.com/~scs/C-faq/top.html
http://benpfaff.org/writings/clc/off-topic.html
 
J

jackiechan

i sort of found that u can use the QT library, it sort of a bit complicated
but it does the job
 
S

SM Ryan

# jackiechan <[email protected]> spoke thus:
#
# > I would like to test some things in C and make
# > a graphical output when running them , something like in java for example
# > http://www.cs.bell-labs.com/cm/cs/pearls/sortanim.html (without buttons
# > just circles rectangles and such things)
# > is there any extension (library) or any way to make similar (aplet-like
# > but not web-like) output ?? (not ploting into a file but dynamic -> it
# > changes like in that link when you click RUN)
#
# Not in C:

How odd. I could've sworn my X-Windows programs were written in C.
 
J

Joona I Palaste

SM Ryan said:
# jackiechan <[email protected]> spoke thus:
# > I would like to test some things in C and make
# > a graphical output when running them , something like in java for example
# > http://www.cs.bell-labs.com/cm/cs/pearls/sortanim.html (without buttons
# > just circles rectangles and such things)
# > is there any extension (library) or any way to make similar (aplet-like
# > but not web-like) output ?? (not ploting into a file but dynamic -> it
# > changes like in that link when you click RUN)
#
# Not in C:
How odd. I could've sworn my X-Windows programs were written in C.

X-Windows uses non-standard extensions to C.
 
J

jackiechan

can u tell me which libraries do u use for your X-Windows programs and how
are you satisfied?
 
C

Carlos

Joona said:
X-Windows uses non-standard extensions to C.

Yes, but Christopher stated, incorrectly in my opinion, that it couldn't
be done is C. It would require non-standard C and is OT here, which is
what the OP should have been told, not that it can't be done.
 
S

SM Ryan

# > # Not in C:
#
# > How odd. I could've sworn my X-Windows programs were written in C.
#
# X-Windows uses non-standard extensions to C.

So does the programming language cease to be C depending on which
libraries it uses?
 
S

SM Ryan

# can u tell me which libraries do u use for your X-Windows programs and

I used the motif libraries on IRIX, but it's been awhile and I don't
remember anything beyond -lX11

how
# are you satisfied?

See .signature.
 
J

Joona I Palaste

SM Ryan said:
# > # Not in C:
#
# > How odd. I could've sworn my X-Windows programs were written in C.
#
# X-Windows uses non-standard extensions to C.
So does the programming language cease to be C depending on which
libraries it uses?

No. It ceases being ISO standard C, though, and thus ceases being
on-topic here. I never said it can't be done in C, but I said it can't
be done in ISO standard C, and with that I also meant that it's
off-topic for comp.lang.c, because it will then depend on the
specification for those libraries, not for the language itself. The
language specification can't possibly include every library ever
written by anyone.
 
C

Carlos

Joona said:
No. It ceases being ISO standard C, though, and thus ceases being
on-topic here.
Yes.

I never said it can't be done in C,
Right.

but I said it can't be done in ISO standard C,

No you didn't, you may have meant that but it's not what you said.
and with that I also meant that it's
off-topic for comp.lang.c, because it will then depend on the
specification for those libraries, not for the language itself. The
language specification can't possibly include every library ever
written by anyone.

Agreed.

In fairness to you, all this pedantary could be avoided if Christopher
had posted the correct answer and not his standard, clueless, topic
police style one.
 
C

Christopher Benson-Manica

Carlos said:
In fairness to you, all this pedantary could be avoided if Christopher
had posted the correct answer and not his standard, clueless, topic
police style one.

My apologies for omitting the word "standard", but I don't accept that
the response was "clueless".
 
J

Joona I Palaste

My apologies for omitting the word "standard", but I don't accept that
the response was "clueless".

I happen to agree with Christopher. Answering off-topic questions with
"that's off-topic" instead of an off-topic answer serves two purposes:
(1) It helps remind people of the topic, and the distinction between a
language and a set of libraries.
(2) It avoids the risk of accidentally giving wrong answers, which won't
be spotted and corrected as often here as they would be on the correct
OS-specific newsgroup.

--
/-- Joona Palaste ([email protected]) ------------- Finland --------\
\-- http://www.helsinki.fi/~palaste --------------------- rules! --------/
"You have moved your mouse, for these changes to take effect you must shut down
and restart your computer. Do you want to restart your computer now?"
- Karri Kalpio
 
C

Carlos

Joona said:
I happen to agree with Christopher. Answering off-topic questions with
"that's off-topic" instead of an off-topic answer serves two purposes:
(1) It helps remind people of the topic, and the distinction between a
language and a set of libraries.
(2) It avoids the risk of accidentally giving wrong answers, which won't
be spotted and corrected as often here as they would be on the correct
OS-specific newsgroup.

I'd agree whole heartedly if that's what either of you had initially
said, or even come close to saying.
 
C

CBFalconer

Joona said:
SM Ryan scribbled the following:
.... snip ...


No. It ceases being ISO standard C, though, and thus ceases being
on-topic here. I never said it can't be done in C, but I said it
can't be done in ISO standard C, and with that I also meant that
it's off-topic for comp.lang.c, because it will then depend on the
specification for those libraries, not for the language itself. The
language specification can't possibly include every library ever
written by anyone.

It is time to be cautious about considering things OT because they
use non-standard libraries. Any discussions of the actual actions
of those calls remains OT, but when the external function header
and a description of the external action is included, the
remainder becomes on-topic. For example, I would consider:

/* doofus.h */
....
/* returns previous pixel */
int putpixel(int color, int xpos, int ypos);
....

and a question "why doesn't this work" about:

putpixel(scrnheight, scrnwidth, sicklygreen);

not to be off-topic. The critical factor is the inclusion in the
article of a sufficient portion of the header and function
description.
 
S

SM Ryan

# SM Ryan <[email protected]> scribbled the following:
# > # > # Not in C:
# > #
# > # > How odd. I could've sworn my X-Windows programs were written in C.
# > #
# > # X-Windows uses non-standard extensions to C.
#
# > So does the programming language cease to be C depending on which
# > libraries it uses?
#
# No. It ceases being ISO standard C, though, and thus ceases being
# on-topic here. I never said it can't be done in C, but I said it can't

Still inaccurate. Just because a program refers to a function not in
ANSI C, does not make it off-topic. Too oft the problem in a post has
nothing to do the semantics of a library function, but with the C code
around the call.

int x; Q(x); x = 3;

You don't need to know anything about Q to guess there's problem with
an uninitialised variable.
 

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
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top