C and Tk

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Penguin_X

    #1

    C and Tk

    Hi.

    I'm using Tk with Perl. I've take a look on google and many forum about
    Tk and C relationship. Is there any way to use it with C ? I would
    prefer code compiled Tk programs than interpreted one.

    Thank You !
    --
    +-+-+-+-+-+-+-+-+-+
    |P|e|n|g|u|i|n| _|X|
    +-+-+-+-+-+-+-+-+-+
  • Jack Klein

    #2
    Re: C and Tk

    On Mon, 27 Jun 2005 19:48:32 -0400, Penguin_X <hatespam@nomai l.com>
    wrote in comp.lang.c:
    [color=blue]
    > Hi.
    >
    > I'm using Tk with Perl. I've take a look on google and many forum about
    > Tk and C relationship. Is there any way to use it with C ? I would
    > prefer code compiled Tk programs than interpreted one.
    >
    > Thank You ![/color]

    C does not define an interface to any other language in existence. As
    far as the C standard is concerned, C is the only language in the
    universe.

    If you want to interface C to johnny-come-lately languages like Tk,
    Perl, C++, Java, or many, many others, you need to use features
    provided by either the other language or your operating system. These
    are all non-standard extensions as far as C is concerned, and
    off-topic here.

    Your best bet is asking in a group that supports your particular
    compiler/OS combination.

    --
    Jack Klein
    Home: http://JK-Technology.Com
    FAQs for
    comp.lang.c http://www.eskimo.com/~scs/C-faq/top.html
    comp.lang.c++ http://www.parashift.com/c++-faq-lite/
    alt.comp.lang.l earn.c-c++

    Comment

    • Chris McDonald

      #3
      Re: C and Tk

      Jack Klein <jackklein@spam cop.net> writes:
      [color=blue]
      >C does not define an interface to any other language in existence. As
      >far as the C standard is concerned, C is the only language in the
      >universe.[/color]


      In satifying your statement, would you describe the use of the 'asm'
      keyword as not being an interface? Its presence certainly admits that
      other languages exist, but it isn't really an *interface*.

      ?

      _______________ _______________ _______________ _______________ _______________ ___
      Dr Chris McDonald E: chris@csse.uwa. edu.au
      Computer Science & Software Engineering W: http://www.csse.uwa.edu.au/~chris
      The University of Western Australia, M002 T: +618 6488 2533
      Crawley, Western Australia, 6009 F: +618 6488 1089

      Comment

      • Peter Nilsson

        #4
        Re: C and Tk

        Chris McDonald wrote:[color=blue]
        > Jack Klein <jackklein@spam cop.net> writes:[color=green]
        > > C does not define an interface to any other language in existence. As
        > > far as the C standard is concerned, C is the only language in the
        > > universe.[/color]
        >
        > In satifying your statement, would you describe the use of the 'asm'
        > keyword as not being an interface? Its presence certainly admits that
        > other languages exist, but it isn't really an *interface*.[/color]

        A better example is system() where the interface is, in a sense,
        completely
        specified, even if the execution isn't. ;)

        --
        Peter

        Comment

        • Gordon Burditt

          #5
          Re: C and Tk

          >>C does not define an interface to any other language in existence. As[color=blue][color=green]
          >>far as the C standard is concerned, C is the only language in the
          >>universe.[/color]
          >
          >In satifying your statement, would you describe the use of the 'asm'
          >keyword as not being an interface? Its presence certainly admits that
          >other languages exist, but it isn't really an *interface*.[/color]

          What asm keyword? ANSI/ISO C doesn't have such a keyword.
          And the use of the variable name "asm" shouldn't cause syntax
          errors, or the compiler is broken.

          Gordon L. Burditt

          Comment

          • Martin Ambuhl

            #6
            Re: C and Tk

            Chris McDonald wrote:[color=blue]
            > Jack Klein <jackklein@spam cop.net> writes:
            >
            >[color=green]
            >>C does not define an interface to any other language in existence. As
            >>far as the C standard is concerned, C is the only language in the
            >>universe.[/color][/color]
            [color=blue]
            >
            > In satifying your statement, would you describe the use of the 'asm'
            > keyword as not being an interface?[/color]

            There is no 'asm' keyword in C. If your implementation provides one,
            then it is invading the programmer's namespace. A

            Comment

            • Keith Thompson

              #7
              Re: C and Tk

              Jack Klein <jackklein@spam cop.net> writes:
              [...][color=blue]
              > If you want to interface C to johnny-come-lately languages like Tk,
              > Perl, C++, Java, or many, many others, you need to use features
              > provided by either the other language or your operating system.[/color]

              Or even johnny-come-early languages like Fortran.

              --
              Keith Thompson (The_Other_Keit h) kst-u@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.

              Comment

              • Keith Thompson

                #8
                Re: C and Tk

                Chris McDonald <chris@csse.uwa .edu.au> writes:[color=blue]
                > Jack Klein <jackklein@spam cop.net> writes:
                >[color=green]
                >>C does not define an interface to any other language in existence. As
                >>far as the C standard is concerned, C is the only language in the
                >>universe.[/color]
                >
                >
                > In satifying your statement, would you describe the use of the 'asm'
                > keyword as not being an interface? Its presence certainly admits that
                > other languages exist, but it isn't really an *interface*.[/color]

                The "asm" keyword was a common extension in some compilers, but it's
                not standardized.

                --
                Keith Thompson (The_Other_Keit h) kst-u@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.

                Comment

                • Chris McDonald

                  #9
                  Re: C and Tk

                  Keith Thompson <kst-u@mib.org> writes:
                  [color=blue]
                  >The "asm" keyword was a common extension in some compilers, but it's
                  >not standardized.[/color]

                  Could someone please explain to me, then (honestly), the role of items in
                  Annex J (informative, Portability issues of the International standard)?
                  J.5.10 specifically states that 'asm' is a keyword.

                  Are the items in Annex J "not standard enough" for the purists of
                  this group?

                  _______________ _______________ _______________ _______________ _______________ ___
                  Dr Chris McDonald E: chris@csse.uwa. edu.au
                  Computer Science & Software Engineering W: http://www.csse.uwa.edu.au/~chris
                  The University of Western Australia, M002 T: +618 6488 2533
                  Crawley, Western Australia, 6009 F: +618 6488 1089

                  Comment

                  • Michael Mair

                    #10
                    Re: C and Tk

                    Chris McDonald wrote:[color=blue]
                    > Keith Thompson <kst-u@mib.org> writes:
                    >
                    >[color=green]
                    >>The "asm" keyword was a common extension in some compilers, but it's
                    >>not standardized.[/color]
                    >
                    >
                    > Could someone please explain to me, then (honestly), the role of items in
                    > Annex J (informative, Portability issues of the International standard)?
                    > J.5.10 specifically states that 'asm' is a keyword.
                    >
                    > Are the items in Annex J "not standard enough" for the purists of
                    > this group?[/color]

                    I fear the answer is "yes"; Annex J is informative, not normative.
                    It describes in J.5 common extensions but whether this is
                    __asm, __asm__, asm() or something else is up to the implementation.


                    Cheers
                    Michael
                    --
                    E-Mail: Mine is an /at/ gmx /dot/ de address.

                    Comment

                    • Flash Gordon

                      #11
                      Re: C and Tk

                      Chris McDonald wrote:[color=blue]
                      > Jack Klein <jackklein@spam cop.net> writes:
                      >[color=green]
                      >>C does not define an interface to any other language in existence. As
                      >>far as the C standard is concerned, C is the only language in the
                      >>universe.[/color]
                      >
                      > In satifying your statement, would you describe the use of the 'asm'
                      > keyword as not being an interface? Its presence certainly admits that
                      > other languages exist, but it isn't really an *interface*.
                      >
                      > ?[/color]

                      It does not matter how you describe asm since it is a non-standard
                      extension, although a common one.
                      --
                      Flash Gordon
                      Living in interesting times.
                      Although my email address says spam, it is real and I read it.

                      Comment

                      • Peter Nilsson

                        #12
                        Re: C and Tk

                        Chris McDonald wrote:[color=blue]
                        > Keith Thompson <kst-u@mib.org> writes:
                        >[color=green]
                        > >The "asm" keyword was a common extension in some compilers, but it's
                        > >not standardized.[/color]
                        >
                        > Could someone please explain to me, then (honestly), the role of items in
                        > Annex J (informative, Portability issues of the International standard)?
                        > J.5.10 specifically states that 'asm' is a keyword.
                        >
                        > Are the items in Annex J "not standard enough" for the purists of
                        > this group?[/color]

                        No, since 'informative' sections are non-normative. So, like footnotes,
                        they
                        have no direct bearing on the requirements of a conforming
                        implementation.

                        More importantly, a conforming hosted implementation _must_ accept and
                        correctly execute code like...

                        #include <stdio.h>

                        int main(void)
                        {
                        int asm = 42;
                        printf("%d\n", asm);
                        return 0;
                        }

                        --
                        Peter

                        Comment

                        • CBFalconer

                          #13
                          Re: C and Tk

                          Chris McDonald wrote:[color=blue]
                          > Jack Klein <jackklein@spam cop.net> writes:
                          >[color=green]
                          >> C does not define an interface to any other language in existence.
                          >> As far as the C standard is concerned, C is the only language in
                          >> the universe.[/color]
                          >
                          > In satifying your statement, would you describe the use of the
                          > 'asm' keyword as not being an interface? Its presence certainly
                          > admits that other languages exist, but it isn't really an
                          > *interface*.[/color]

                          There is no such keyword in C. It is merely a common extension,
                          and not governed by any standard. As such, it does not exist in
                          this newsgroup.

                          --
                          "A man who is right every time is not likely to do very much."
                          -- Francis Crick, co-discover of DNA
                          "There is nothing more amazing than stupidity in action."
                          -- Thomas Matthews


                          Comment

                          • SM Ryan

                            #14
                            Re: C and Tk

                            Chris McDonald <chris@csse.uwa .edu.au> wrote:
                            # Keith Thompson <kst-u@mib.org> writes:
                            #
                            # >The "asm" keyword was a common extension in some compilers, but it's
                            # >not standardized.
                            #
                            # Could someone please explain to me, then (honestly), the role of items in
                            # Annex J (informative, Portability issues of the International standard)?
                            # J.5.10 specifically states that 'asm' is a keyword.
                            #
                            # Are the items in Annex J "not standard enough" for the purists of
                            # this group?

                            You're talking to a close minded clique who have ruined comp.lang.c
                            by trying to moderate unmoderated newsgroup. For some reason they
                            think "C" is a trademarked term owned by ANSI/ISO; they lack sufficient
                            neuron mass to realize that "C" actually applies to a variety of
                            dialects.

                            --
                            SM Ryan http://www.rawbw.com/~wyrmwif/
                            The whole world's against us.

                            Comment

                            • Lawrence Kirby

                              #15
                              Re: C and Tk

                              On Tue, 28 Jun 2005 06:37:59 +0000, Chris McDonald wrote:
                              [color=blue]
                              > Keith Thompson <kst-u@mib.org> writes:
                              >[color=green]
                              >>The "asm" keyword was a common extension in some compilers, but it's
                              >>not standardized.[/color]
                              >
                              > Could someone please explain to me, then (honestly), the role of items in
                              > Annex J (informative, Portability issues of the International standard)?
                              > J.5.10 specifically states that 'asm' is a keyword.[/color]

                              Annex J simply provides some background information. It is not normative
                              which means that its contents do not have any bearing on the language
                              specification. In fact some of the things it describes, an "asm keyword"
                              included are in violation of the C standard. When a compiler is run in a
                              mode that supports it it is not a conforming C implementation because it
                              breaks the syntax of the language and invades the user namespace. E.g.

                              int main(void)
                              {
                              int asm = 0;
                              return 0;
                              }

                              is a strictly conforming C program with asm having the clear semantics of
                              a variable identifier.

                              [color=blue]
                              > Are the items in Annex J "not standard enough" for the purists of
                              > this group?[/color]

                              The explicit purpose (as in "Common Extensions") of section J.5 is to
                              describe things that are non-standard.

                              Lawrence

                              Comment

                              Working...