brianpowell
asked on
Variable Declaration
I wrote an application that converts text to SGML. VB application and it works great.
BUT:
I use an array to hold the various tags for the SGML.
Ex.
varData(13) = "<title>" & Title & "</title>"
varData(14) = "<tgroup cols='4' colsep='1' rowsep='1' align='left' charoff='50'>"
varData(15) = "<colspec colname='col1' colwidth='0.55in'><colspec colname='col2'
PROBLEM: The sgml editor "Arbor Text" encloses attributes with a " not a '
Ideally: My array's should not alter the syntax. cols='4' should be cols="4", colsep='1' should be colsep="1"
Question: Is there a way to code a variable as strCols = "cols="4" " or strFour = ""4""
bp
BUT:
I use an array to hold the various tags for the SGML.
Ex.
varData(13) = "<title>" & Title & "</title>"
varData(14) = "<tgroup cols='4' colsep='1' rowsep='1' align='left' charoff='50'>"
varData(15) = "<colspec colname='col1' colwidth='0.55in'><colspec
PROBLEM: The sgml editor "Arbor Text" encloses attributes with a " not a '
Ideally: My array's should not alter the syntax. cols='4' should be cols="4", colsep='1' should be colsep="1"
Question: Is there a way to code a variable as strCols = "cols="4" " or strFour = ""4""
bp
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Guess I typed a little to slowly ; )
ASKER
Dang123
really...
i'll do the test.
pretty fast response. thanks
bp
really...
i'll do the test.
pretty fast response. thanks
bp
You can also use
Chr$(34)
ie
strFour = Chr$(34) & "4" & Chr$(34)
Chr$(34)
ie
strFour = Chr$(34) & "4" & Chr$(34)
ASKER
pretty straight forward.
varData(14) = "<tgroup cols=""4"" colsep=""1"" rowsep=""1"" align=""left"" charoff=""50"">"
After looking at it a second time why wouldn't work...
bp
varData(14) = "<tgroup cols=""4"" colsep=""1"" rowsep=""1"" align=""left"" charoff=""50"">"
After looking at it a second time why wouldn't work...
bp
ASKER
EDDYKT
I also like your response.
but the points have been assigned.
bp
I also like your response.
but the points have been assigned.
bp
Retry: try """4""" instead of ""4""
;-)
;-)
Is there a way to code a variable as strCols = "cols="4" " or strFour = ""4""
Ya we can do that
If you want doubquotes in a variable value you have to use that in 2 times
e.g. (strcols = """cols=""4""") and strfour = """4"""
rams
Ya we can do that
If you want doubquotes in a variable value you have to use that in 2 times
e.g. (strcols = """cols=""4""") and strfour = """4"""
rams
-Bender-