473,320 Members | 1,825 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,320 software developers and data experts.

Converting quotation marks to ASCII numerical value

I'm trying to build a function that reads each character in a string
and converts it to an ASCII numerical value. So far, so good.
However, I'm running into problems when dealing with quotation marks.
Using ASC(""") dosen't work, neither does ASC('"') or just ASC(").

Is there any other way to handle this? Is this the only character I'll
have this problem with, so should I just error trap it?

Thanks!

Nov 13 '05 #1
6 2899

"mplogue" <mi***********@yahoo.com> wrote in message
news:11**********************@g14g2000cwa.googlegr oups.com...
I'm trying to build a function that reads each character in a string
and converts it to an ASCII numerical value. So far, so good.
However, I'm running into problems when dealing with quotation marks.
Using ASC(""") dosen't work, neither does ASC('"') or just ASC(").

Is there any other way to handle this? Is this the only character I'll
have this problem with, so should I just error trap it?

Thanks!


You'll need to double up the quotes to force literal interpretation (as well
as include them in quotes)

ASC("""")

works

Nov 13 '05 #2
Randy Harris wrote:
ASC("""")


I suppose Asc(Chr(34)) would be just ironic :-)

--
[OO=00=OO]
Nov 13 '05 #3
"Trevor Best" <no****@besty.org.uk> wrote in message
news:42***********************@news.zen.co.uk...
Randy Harris wrote:
ASC("""")


I suppose Asc(Chr(34)) would be just ironic :-)

--
[OO=00=OO]

Just note there is no support for irony in A97 - this was first introduced
with A2K.
Nov 13 '05 #4
Kate Poco wrote:
Just note there is no support for irony in A97 - this was first introduced
with A2K.


Not ironically, the A2K irony feature had bugs. Maybe a Service Pack
corrected this. But then you've got a Catch 22 (or worse) since it
would be ironic if an SP didn't correct it (hence irony is really
working) or not ironic (hence irony is not working) if it did correct
it.

James A. Fortune

Nov 13 '05 #5

"Kate Poco" <po*********@polska.pl> wrote in message
news:d7**********@nwrdmz03.dmz.ncs.ea.ibs-infra.bt.com...
"Trevor Best" <no****@besty.org.uk> wrote in message
news:42***********************@news.zen.co.uk...
Randy Harris wrote:
ASC("""")


I suppose Asc(Chr(34)) would be just ironic :-)

--
[OO=00=OO]

Just note there is no support for irony in A97 - this was first introduced
with A2K.


LOL

Nov 13 '05 #6
Bri
mplogue wrote:
I'm trying to build a function that reads each character in a string
and converts it to an ASCII numerical value. So far, so good.
However, I'm running into problems when dealing with quotation marks.
Using ASC(""") dosen't work, neither does ASC('"') or just ASC(").

Is there any other way to handle this? Is this the only character I'll
have this problem with, so should I just error trap it?

Thanks!


Since it is a String, can you put it into a variable? Is it coming from
input in a control? If so, then this should work. Air Code

stAsciiText = AsciiOfText(Me!MyText)
Function AsciiOfText(stText as String) as String
Dim I as Integer, stTemp as String

For I = 1 To Len(stText)
stTemp = stTemp & ASC(Mid(stText,I,1))
Loop

AsciiOfText = stTemp
End Function

HTH
--
Bri

Nov 13 '05 #7

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

Similar topics

1
by: NikkoW | last post by:
I need to assign a string to a variable but the text string includes quotation marks: Example: MyString = "He turned and said "Hello" before leaving." When the compiler hits the quotation...
8
by: Stephen Poley | last post by:
One disadvantage of using a simple text editor to produce HTML is that it is relatively time-consuming to put in the proper typographical quotation marks and dashes. A round tuit having arrived...
63
by: Tristan Miller | last post by:
Greetings. Do any popular browsers correctly support <q>, at least for Western languages? I've noticed that Mozilla uses the standard English double-quote character, ", regardless of the lang...
7
by: Paradigm | last post by:
I am trying to create a recordset where some text fields are matching. The problem is that some of the text fields contain quotation marks. I have tried to create the sql string using replace eg....
3
by: Ufit | last post by:
Simple,dumm question - how to include quotation marks in the string? F.ex. "Data Source=.\SQLEXPRESS;AttachDbFilename="C:\client data.mdf";Integrated Security=True;User Instance=True" I get syntax...
6
by: Karl Groves | last post by:
I have a form which contains a field for "height". If someone places an entry such as: 5'6" the form seems like it completely empties that value. It does NOT do this on my machine, but does...
31
by: The Bicycling Guitarist | last post by:
Hi. For many years I have been using &quot; for double quotation marks in the HTML code, but the opening and closing quotation marks render the same in my browser. I'm considering going through and...
15
by: allthecoolkidshaveone | last post by:
I want to convert a string representation of a number ("1234") to an int, with overflow and underflow checking. Essentially, I'm looking for a strtol() that converts int instead of long. The...
12
by: Adam Right | last post by:
Hi ! In my sql statement, i have to use field names and table name with quotation marks. like that : ----------------------------------------------------------------------- string sqlStr = ...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.