Trying to print bold and underlined text in prolog but can't write them
write('\033[1mbold\033[0m')
Makes this (expected) error:
syntax error: \ expected in \constant\ sequence
What's the correct way to do it with gprolog
? Maybe with format
?
That is, octal escape sequences (and hexadecimal which start with
\x
) need to be closed with a\
too. En revanche, a leading zero is not required, but possible. This is in no way specific to GNU, in fact, probably all systems close to ISO Prolog have it.