Skip to content

"Unrecognized preprocessor instruction" caused by "#" at start of lines in a multi-line quoted string in #system #757

@tueda

Description

@tueda

It is unclear whether this is a bug or whether it is even supposed to work, but it might be fun to file this as an issue.

The following program prints 5 lines as expected:

#define flag

#ifdef `flag'
  #system echo "\
# 1
# 2
# 3
# 4
# 5"
#endif
.end
# 1
# 2
# 3
# 4
# 5

But if I comment out the line that defines flag, FORM reports 4 errors:

test.frm Line 7 ==> Unrecognized preprocessor instruction:
test.frm Line 8 ==> Unrecognized preprocessor instruction:
test.frm Line 9 ==> Unrecognized preprocessor instruction:
test.frm Line 10 ==> Unrecognized preprocessor instruction:

It seems that in this case FORM tries to parse # 1, # 2, ... as preprocessor instructions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions