473,387 Members | 1,575 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

escape sequence

N U
How to program your own escape sequence [programmer defined] using
basic functions available in C?
Nov 13 '05 #1
7 5690
In article <a6**************************@posting.google.com >, 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
Nov 13 '05 #2

"N U" <n_****@yahoo.com> wrote in message
news:a6**************************@posting.google.c om...
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
Nov 13 '05 #3
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 'g******@cbobk.pbz' | rot13
Nov 13 '05 #4

"Tom Zych" <tz******@pobox.com> wrote in message
news:3F***************@pobox.com...
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
Nov 13 '05 #5
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 'g******@cbobk.pbz' | rot13
Nov 13 '05 #6
N U
"Jeff" <no****@notexist.com> wrote in message news:<bj*********@imsp212.netvigator.com>...
"N U" <n_****@yahoo.com> wrote in message
news:a6**************************@posting.google.c om...
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].
Nov 13 '05 #7
N U wrote:
"Jeff" <no****@notexist.com> wrote in message
"N U" <n_****@yahoo.com> 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.
Nov 13 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Joe | last post by:
I'm using Python 2.4 on Windows XP SP2. I'm trying to receive a command line argument that is a newline (\n) Here is the command line to use sample.py "\n" Here is a sample.py script
14
by: Jon Maz | last post by:
Hi, I have been getting hopelessly confused with escaping escape characters in JScript! All I want to do is write a simple funtion: function DoubleUpBackSlash(inputString) { ??????? }
7
by: teachtiro | last post by:
Hi, 'C' says \ is the escape character to be used when characters are to be interpreted in an uncommon sense, e.g. \t usage in printf(), but for printing % through printf(), i have read that %%...
2
by: junky_fellow | last post by:
N869 " Each of these escape sequences shall produce a unique implementation-defined value which can be stored in a single char object. The external representations in a text file need not be...
4
by: Guadala Harry | last post by:
I need to place the following into a string... How can I properly escape the % " / < and > characters? <table width="100%" border="0" cellspacing="0" cellpadding="4px" class="hfAll"></Table> ...
2
by: Christopher Ireland | last post by:
Hi -- Any ideas on this one please ... The following code works as expected: private void Form1_Load(object sender, System.EventArgs e) { string text = "The quick brown"+ " FOX " +"jumps over...
12
by: Jeff S | last post by:
In a VB.NET code behind module, I build a string for a link that points to a JavaScript function. The two lines of code below show what is relevant. PopupLink = "javascript:PopUpWindow(" &...
15
by: pkaeowic | last post by:
I am having a problem with the "escape" character \e. This code is in my Windows form KeyPress event. The compiler gives me "unrecognized escape sequence" even though this is documented in MSDN....
5
by: vlsidesign | last post by:
The printf function returns "warning: unknown escape sequence: \040" for a backslash-space combination. If the ascii decimal number for space is 32 and the backslash is 92, why this particular...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.