Duke-PL-Course/Prolog

Hyphen in Prolog file name

peggyl opened this issue · 2 comments

gprolog would not let me load q1-flatten.pro (I tried several times and had correct syntax [q1-flatten.pro].), but worked when I renamed it flatten.pro. Are hyphens not allowed in Prolog filenames?

This was also before I wrote any code, so that could not have been the reason (the error referred to the load command and not a line number in the file).

@Peggy-Li

Try: ['q1-flatten.pro']. or ['q1-flatten'].. Hyphens are not allowed to be part of atom names without using the string literal form (with single quotes).

That works, thanks!