Print the sign "

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to output to a file the sign ", how shoud I do that
I am trying to do print #1 ""&"field"&"

Hoping to get "field

How should I do it?
 
heto said:
I am trying to output to a file the sign ", how shoud I do that.
I am trying to do print #1 ""&"field"&""

Hoping to get "field"


If you just want the letters f, i, e, l, and d in quotes,
then use:

"""field"""

If you want the value of a variable named field then use:

"""" & field & """"
 
Marshall Barton said:
If you just want the letters f, i, e, l, and d in quotes,
then use:

"""field"""
^^^
Ick! I find that syntax completely kludgy-looking.
I'd use: Chr(34) & "Field" & Chr(34) instead.
It's clear if not the most concise syntax but it doesn't leave one counting
"s to figure out what is meant looking at the code 6 months later...
If you want the value of a variable named field then use:

"""" & field & """"

^^^ - even ickier!
....or I'd use: chr(34) & field & chr(34)

- Mark
 
Mark said:
^^^
Ick! I find that syntax completely kludgy-looking.
I'd use: Chr(34) & "Field" & Chr(34) instead.
It's clear if not the most concise syntax but it doesn't leave one counting
"s to figure out what is meant looking at the code 6 months later...


^^^ - even ickier!
...or I'd use: chr(34) & field & chr(34)


That's fine Mark, but each to their own.
 
Back
Top