escape sequence

Discussion in 'C Programming' started by N U, Sep 12, 2003.

  1. N U

    N U Guest

    How to program your own escape sequence [programmer defined] using
    basic functions available in C?
    N U, Sep 12, 2003
    #1
    1. Advertising

  2. In article <>, N U wrote:
    > How to program your own escape sequence [programmer defined] using
    > basic functions available in C?


    How do you mean? Do you want to change the meaning of '\n' or
    '\t'? You can't do that in C.

    --
    Andreas Kähäri
    Andreas Kahari, Sep 12, 2003
    #2
    1. Advertising

  3. N U

    Jeff Guest

    "N U" <> wrote in message
    news:...
    > How to program your own escape sequence [programmer defined] using
    > basic functions available in C?


    You didn't describe your question clearly. If you want to write your own
    "print line" function to replace printf, then you should use string function
    to locate the "\" and insert the things you wanted.

    --
    Jeff
    -je6543 at yahoo.com
    Jeff, Sep 12, 2003
    #3
  4. N U

    Tom Zych Guest

    Jeff wrote:

    > You didn't describe your question clearly. If you want to write your own
    > "print line" function to replace printf, then you should use string function
    > to locate the "\" and insert the things you wanted.


    Problem with that is, the compiler will see them first and convert
    them. So you'd have to use \\ everywhere. Fuggly...

    --
    Tom Zych
    This email address will expire at some point to thwart spammers.
    Permanent address: echo '' | rot13
    Tom Zych, Sep 12, 2003
    #4
  5. N U

    Jeff Guest

    "Tom Zych" <> wrote in message
    news:...
    > Jeff wrote:
    >
    > > You didn't describe your question clearly. If you want to write your own
    > > "print line" function to replace printf, then you should use string

    function
    > > to locate the "\" and insert the things you wanted.

    >
    > Problem with that is, the compiler will see them first and convert
    > them. So you'd have to use \\ everywhere. Fuggly...
    >


    Yes, even the OP use another character as the escape character, the "\" will
    still confuse the compiler.

    --
    Jeff
    -je6543 at yahoo.com
    Jeff, Sep 12, 2003
    #5
  6. N U

    Tom Zych Guest

    Jeff wrote:

    > Yes, even the OP use another character as the escape character, the "\" will
    > still confuse the compiler.


    Well, if they use something other than '\' as the escape character,
    they won't need to use '\' at all, except in the usual way.

    --
    Tom Zych
    This email address will expire at some point to thwart spammers.
    Permanent address: echo '' | rot13
    Tom Zych, Sep 12, 2003
    #6
  7. N U

    N U Guest

    "Jeff" <> wrote in message news:<bjs9fg$>...
    > "N U" <> wrote in message
    > news:...
    > > How to program your own escape sequence [programmer defined] using
    > > basic functions available in C?

    >
    > You didn't describe your question clearly. If you want to write your own
    > "print line" function to replace printf, then you should use string function
    > to locate the "\" and insert the things you wanted.


    What i meant by progammer defined escape sequence was something, like
    ctrl+c/d that terminates an application. in case the programmer want
    to define something like this and then use that escape seq. to
    partially terminate the application i.e go from one part to another
    through the use of escape sequence [without using the menu's].
    N U, Sep 13, 2003
    #7
  8. N U

    LibraryUser Guest

    N U wrote:
    > "Jeff" <> wrote in message
    > > "N U" <> wrote in message

    >
    > > > How to program your own escape sequence [programmer defined]
    > > > using basic functions available in C?

    > >
    > > You didn't describe your question clearly. If you want to write
    > > your own "print line" function to replace printf, then you
    > > should use string function to locate the "\" and insert the
    > > things you wanted.

    >
    > What i meant by progammer defined escape sequence was something,
    > like ctrl+c/d that terminates an application. in case the
    > programmer want to define something like this and then use that
    > escape seq. to partially terminate the application i.e go from
    > one part to another through the use of escape sequence [without
    > using the menu's].


    No escape sequence needed. Look up the use of EOF.

    --
    Replies should be to the newsgroup
    Chuck Falconer, on vacation.
    LibraryUser, Sep 13, 2003
    #8
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. h babu
    Replies:
    1
    Views:
    406
    Vidar Petursson
    Jul 16, 2003
  2. marcia

    escape sequence \n

    marcia, Aug 28, 2003, in forum: ASP .Net
    Replies:
    4
    Views:
    548
    marcia
    Aug 28, 2003
  3. Jeff

    Unrecognized escape sequence

    Jeff, Jun 30, 2006, in forum: ASP .Net
    Replies:
    2
    Views:
    39,008
    mansoorbhai
    Jun 21, 2011
  4. Walter L. Preuninger II

    literal escape sequence conversion to raw

    Walter L. Preuninger II, Jan 5, 2004, in forum: C Programming
    Replies:
    6
    Views:
    477
    Kevin Goodsell
    Jan 5, 2004
  5. slomo
    Replies:
    5
    Views:
    1,532
    Duncan Booth
    Dec 2, 2007
Loading...

Share This Page