Hi.
The CTEXT macro actually is a great thing, but when I try the following:
invoke MessageBox, , CTEXT("does not work :("), CTEXT("this"), MB_OK

I get a nice error message "error A2157: missing right parenthesis".
Now, when I change the smiley's left parenthesis so it looks like:
invoke MessageBox, , CTEXT("does work :["), CTEXT("this"), MB_OK

everything works fine..
Putting the quoted string between <> doesn't help :(
Has anyone a (nice :) solution to this? (apart from replacing '(' with its ASCII code)

bye
B-Boy
Posted on 2002-05-21 16:59:12 by B-Boy
B-Boy

This might be obvious, but did you try putting a

another ) to the right Like this:

old
invoke MessageBox, , CTEXT("does not work :("), CTEXT("this"), MB_OK

new
invoke MessageBox, , CTEXT("does not work :("), CTEXT("this")), MB_OK


Now with the second example all your parenthesis will match!


Just my two cents worth.


cookj
Posted on 2002-05-21 17:12:18 by cookj
Sorry, this produces even more error messages :)
The problem is that masm interprets the first left parenthesis, which is intended to be part of a string, as a delimiter.

bye
B-Boy
Posted on 2002-05-21 17:44:13 by B-Boy
How about this?
invoke MessageBox, , CTEXT("does not work :", 29h), CTEXT("this"), MB_OK

29h is the hex equivalent to the 41 ascii character; the right parenthesis

James
Posted on 2002-05-21 18:05:28 by JamesE
That could almost be classed as a masm bug :confused:
Posted on 2002-05-24 03:04:13 by huh