Hello, I am very new to the dxl language and need help with casting a string as a char. |
Re: Casting String to Char
Double quotes are for "string", single quotes are for 'character'.
Object oCurr = current
string NameAttr = "Object Text" // Change to your Attribute Name
string Value = probeAttr_(oCurr, NameAttr)
char c
int i, Ascii
print "Value = " Value "\n"
for (i=0; i<length(Value); i++)
{ if (i >= 100) break // Value far too long for this chore
c = Value[i] // <<<--- here you go, get the char
Ascii = intOf(c) // <<<--- convert char to Ascii Code
print "\t" c "\t" Ascii "\n"
}
|
Re: Casting String to Char |
Re: Casting String to Char TheDrizzle - Wed Jun 08 15:19:23 EDT 2011 Don't know all the varieties of "probeAttr_" but there is also "probeRichAttr_" which retrieves rich text. There are some "bounded" varieties but they used to not work and I never got around to using them after they were fixed. Take a peak here: c:\Program files\IBM\Rational\DOORS\9.2\lib\dxl\utils\attrutil.inc
|