Checking param string

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

    #16
    Re: Checking param string

    Flash Gordon wrote:
    Malcolm McLean wrote, On 20/02/08 18:00:
    >"david" <David.Abdurach manov@gmail.com wrote in message
    >>
    .... snip ...
    >>>
    >>Two questions:
    >>1) How can I compare parameters to string, maybe I should use
    >> sprintf and later try comparing? Or maybe there is direct
    >> way of doing it?
    >>2) How can I get first char of the first parameter? (It's
    >> kinda hard to understand how to write this)
    >>
    .... snip ...
    >>
    >When you've sorted this out you might like to see my options
    >parser, on the website.
    >
    The OP is more likely to find the POSIX function getopt or the
    GNU function getopt_long useful since he is almost certainly
    trying to replicate their behaviour. For help with the POSIX
    getopt function the OP should ask in comp.unix.progr ammer,
    possibly one of the GNU groups for getopt_long.
    No he shouldn't. He should learn to do these basic operations long
    before using those.

    --
    [mail]: Chuck F (cbfalconer at maineline dot net)
    [page]: <http://cbfalconer.home .att.net>
    Try the download section.



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

    Comment

    • CBFalconer

      #17
      Re: Checking param string

      Default User wrote:
      david wrote:
      >
      >I know about the else, I just wrote it for small example not
      >thinking much about if statements. Next time (if there will be
      >one I will try not to do this and write as much correct code as
      >I can). I am reading this group from Google, there could I
      >find FAQ of this group?
      >
      Did you trying searching for: comp.lang.c faq ?
      Some useful references about C:
      <http://www.ungerhu.com/jxh/clc.welcome.txt >
      <http://c-faq.com/ (C-faq)
      <http://benpfaff.org/writings/clc/off-topic.html>
      <http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdf(C99)
      <http://cbfalconer.home .att.net/download/n869_txt.bz2(C9 9, txt)
      <http://www.dinkumware. com/refxc.html (C-library}
      <http://gcc.gnu.org/onlinedocs/ (GNU docs)

      --
      [mail]: Chuck F (cbfalconer at maineline dot net)
      [page]: <http://cbfalconer.home .att.net>
      Try the download section.



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

      Comment

      • vippstar@gmail.com

        #18
        Re: Checking param string

        On Feb 21, 3:40 am, CBFalconer <cbfalco...@yah oo.comwrote:
        Default User wrote:
        david wrote:
        >
        I know about the else, I just wrote it for small example not
        thinking much about if statements. Next time (if there will be
        one I will try not to do this and write as much correct code as
        I can). I am reading this group from Google, there could I
        find FAQ of this group?
        >
        Did you trying searching for: comp.lang.c faq ?
        >
        Some useful references about C:
        <http://www.ungerhu.com/jxh/clc.welcome.txt >
        <http://c-faq.com/ (C-faq)
        <http://benpfaff.org/writings/clc/off-topic.html>
        <http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdf(C99)
        <http://cbfalconer.home .att.net/download/n869_txt.bz2(C9 9, txt)
        <http://www.dinkumware. com/refxc.html (C-library}
        Update your links, this one does not work.
        "The system cannot find the file specified."
        <http://gcc.gnu.org/onlinedocs/ (GNU docs)

        Comment

        • CBFalconer

          #19
          Re: Checking param string

          vippstar@gmail. com wrote:
          CBFalconer <cbfalco...@yah oo.comwrote:
          >Default User wrote:
          >>david wrote:
          >>
          >>>I know about the else, I just wrote it for small example not
          >>>thinking much about if statements. Next time (if there will be
          >>>one I will try not to do this and write as much correct code as
          >>>I can). I am reading this group from Google, there could I
          >>>find FAQ of this group?
          >>
          >>Did you trying searching for: comp.lang.c faq ?
          >>
          >Some useful references about C:
          > <http://www.ungerhu.com/jxh/clc.welcome.txt >
          > <http://c-faq.com/ (C-faq)
          > <http://benpfaff.org/writings/clc/off-topic.html>
          > <http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdf(C99)
          > <http://cbfalconer.home .att.net/download/n869_txt.bz2(C9 9, txt)
          > <http://www.dinkumware. com/refxc.html (C-library}
          >
          Update your links, this one does not work.
          "The system cannot find the file specified."
          >
          > <http://gcc.gnu.org/onlinedocs/ (GNU docs)
          Changed to "www.dinkumware .com\c99.aspx". Thanks.

          --
          [mail]: Chuck F (cbfalconer at maineline dot net)
          [page]: <http://cbfalconer.home .att.net>
          Try the download section.



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

          Comment

          Working...