The following line of code has compiled correctly for years. Now a new user is trying to compile my code on a new computer and they are getting compile errors. Any ideas??
@ 5,20 DCSAY IIF(xx='Y',"Yes","No")
The following line (without the single quotes) compiles fine on the new machine????
@ 5,20 DCSAY IIF(xx="Y","Yes","No")
Text delimiters
Re: Text delimiters
You have discovered a bug in the Xbase++ pre-processor which shows up in eXpress++ builds 263 and later.
It is because of the following code that was added to DCDIALOG.CH:
I added this as a new feature to support the improvements to the eXpress++ designer.
Unfortunately, the compiler will fail if there is an expression with mixed quotes, because the compiler will wrap everything in brackets if there are mixed quotes (single,double). I don't have a simple solution to this other than to tell you to use all single quotes or all double quotes in any expression used in a DCSAY or DCSAY..GET.
It is because of the following code that was added to DCDIALOG.CH:
Code: Select all
;DC_GetListSet(DCGUI_GETLIST,aGETLIST_VARS, ;
{'DCSAYGET',<(oObject)>,<(oParent)>,<(cText)>, ;
#<nRow>,#<nCol>,#<nWidth>,#<nHeight>} )
Unfortunately, the compiler will fail if there is an expression with mixed quotes, because the compiler will wrap everything in brackets if there are mixed quotes (single,double). I don't have a simple solution to this other than to tell you to use all single quotes or all double quotes in any expression used in a DCSAY or DCSAY..GET.
The eXpress train is coming - and it has more cars.
Re: Text delimiters
Thanks Roger,
So:
@ 12,40 DCSAY {||"Current 'Other' Balance"}
Must be changed to:
@ 12,40 DCSAY {||"Current "+chr(39)+"Other"+chr(39)+" Balance"}
A real pain to change in all my code, but as long as I know the rules ....
New users are using later versions of Express, I use 254
SIDE NOTE:
GETTOOLTIP "To use existing list, enter 'Y'"
The above seems to be accepted without error??
So:
@ 12,40 DCSAY {||"Current 'Other' Balance"}
Must be changed to:
@ 12,40 DCSAY {||"Current "+chr(39)+"Other"+chr(39)+" Balance"}
A real pain to change in all my code, but as long as I know the rules ....
New users are using later versions of Express, I use 254
SIDE NOTE:
GETTOOLTIP "To use existing list, enter 'Y'"
The above seems to be accepted without error??
Re: Text delimiters
Let me see if I can find a better solution for you by modifying DCDIALOG.CH.
The eXpress train is coming - and it has more cars.
Re: Text delimiters
Your sample does not seem to show a problem with the compiler.
It preprocesses to the following:
So the stringify option <(cText)> works ok in this case, however it does not work in all cases.
If I remove test stringify option and change it to <cText>, then it will preprocess to the following:
This still works with the designer, so I am going to suggest that you try the attached DCDIALOG.CH which removes the stringification.
It preprocesses to the following:
Code: Select all
;DC_GetListSet(GetList,70, {'DCSAYGET',,,[{||"Current 'Other' Balance"}], "12","40","50",""} )
If I remove test stringify option and change it to <cText>, then it will preprocess to the following:
Code: Select all
;DC_GetListSet(GetList,70, {'DCSAYGET',,,{||"Current 'Other' Balance"}, "12","40","50",""} )
- Attachments
-
- dcdialog.zip
- (50.43 KiB) Downloaded 958 times
The eXpress train is coming - and it has more cars.