Escape Sequences

This is a discussion on Escape Sequences within the C Programming forums, part of the General Programming Boards category; I found escape sequences on the Internet one time and at the time could not use them properly, yesterday i ...

  1. #1
    Me-Again-Again
    Guest

    Escape Sequences

    I found escape sequences on the Internet one time and at the time could not use them properly, yesterday i found two of them being used correctly in a function to clear the screen, they where:

    printf("\033[2J"); //Clears the Screen
    printf("\033[0;0f"); // Sets cursor back to position (0,0)

    There where many more in the list i found but due to an unfortunate mishap (I deleted the file) i do not have them anymore. I was wondering if any one else knew of more, or perhaps (hopefully) all of them. I would appreciate it if some one could post them as they would be useful to all of to use.
    Yours truly

    Me

  2. #2
    Registered User
    Join Date
    Sep 2001
    Location
    Australia
    Posts
    212
    I would also be interested if any one knows of them.

  3. #3
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,551
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  4. #4
    Registered User alex's Avatar
    Join Date
    Sep 2001
    Posts
    132
    If you are using DOS/Windows, be sure to load ANSI.SYS from your config.sys file, and search the web for "ansi.sys escape sequences".
    If you are using unix/linux, search for "console_codes", "vt100" or "vt102"

    Hope this helps...
    alex

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. LoadFromFile() from a txt
    By Snoopy104 in forum C++ Programming
    Replies: 6
    Last Post: 03-14-2006, 09:05 AM
  2. Interpreting literal escape sequences from a file...
    By Sebastiani in forum C++ Programming
    Replies: 1
    Last Post: 07-08-2003, 02:00 PM
  3. Using escape sequences as user inputs
    By musayume in forum C Programming
    Replies: 4
    Last Post: 12-11-2001, 08:35 AM
  4. ANSI Escape Sequences OR Scan of keyboard
    By Samppa in forum Linux Programming
    Replies: 3
    Last Post: 10-24-2001, 12:15 PM
  5. Escape sequences in VC++
    By emilyh in forum Windows Programming
    Replies: 7
    Last Post: 09-26-2001, 07:02 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21