Kbase P140473: Preprocess file raises syntax errors when source file contains strings with two double quotes
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  1/29/2009 |
|
Status: Unverified
SYMPTOM(s):
Preprocess file raises syntax errors when source file contains strings with two double quotes
Various syntax errors can occur depending on the code
** Unable to understand after -- "<string>". (247)
** Unknown Field or Variable name - <field-name>. (201)
The following example illustrates the issue:
String aimed to be displayed on the screen:
Progress"OpenEdge
Source code:
DISPLAY "Progress""OpenEdge".
Preprocessed file:
DISPLAY "Progress"OpenEdge".
FACT(s) (Environment):
The double quote (") encloses character constants or strings
Source file contains string with two double quotes ("")
The two double quotes ("") are used for inserting double quotes within a quoted string
Source file compiles with no error
Preprocess file generated with the PREPROCESS option of the COMPILE statement
Progress 9.x
OpenEdge 10.x
All Supported Operating Systems
CAUSE:
Bug# OE00167265
CAUSE:
To use double quotes (") within a quoted string, you must be able to use two double quotes ("") which compiles to a double quote ("), or you must put a tilde (~) in front of any double quote (") within the quoted character string.
However, when using the two double quotes (""), the compiler will compile the two double quotes ("") to a single double quote (") within the preprocess file.
This is not correct: the conversion should be made during the final compilation. The fix for the current bug will address this behavior.
FIX:
As a workaround, put a tilde (~) in front of any quotes within the quoted character string. In other words use the tilde-double quote combination (~") in replacement of the two double quotes ("") to insert double quotes (") into a character string.