Link to home
Start Free TrialLog in
Avatar of brianpowell
brianpowellFlag for United States of America

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



Avatar of -Bender-
-Bender-

Try strFour = """4"""

-Bender-
ASKER CERTIFIED SOLUTION
Avatar of Dang123
Dang123

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial

  Guess I typed a little to slowly     ; )
Avatar of brianpowell

ASKER

Dang123

really...  

i'll do the test.


pretty fast response.  thanks


bp
You can also use

Chr$(34)


ie

strFour = Chr$(34) & "4" & Chr$(34)
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
EDDYKT

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