In order to validate format and content of the document files I want to
embed within the program a template.
Instead of having code like:
aTemplate := { "$DOC$", "$CATEGORY$", ..., "$END$" }
I've tried:
#xcommand TEXT TO VAR <var> => #pragma __stream|%s||<var>:=
LOCAL cTemplate
TEXT TO VAR cTemplate /* this is line 11 */
$DOC$
$NAME$
$CATEGORY$
$ONELINER$
$DESCRIPTION$
$END$
ENDTEXT /* this is line 18 */
m->p_hsTemplates[ "Document" ] := cTemplate
but the output is incorrect, in that the .ppo file contains:
cTemplate:=
e"$DOC$\n$NAME$\n$CATEGORY$\n$ONELINER$\n$DESCRIPTION$\n$END$\n"
m->p_hsTemplates[ "Document" ] := cTemplate
each of the blank lines above is present in the .ppo file and the
compiler gives:
tmplates.prg(11) Error E0020 Incomplete statement or unbalanced
delimiters
tmplates.prg(18) Error E0020 Incomplete statement or unbalanced
delimiters
First, a question: it is embedding LF characters, not CRLF, or is this
by design/intent?
And second, the preprocessor is not writing valid code.
April
--
:-P```
_______________________________________________
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour