[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Help-glpk] Documentation: printf
From: |
glpk xypron |
Subject: |
[Help-glpk] Documentation: printf |
Date: |
Sun, 19 Sep 2010 09:20:40 +0200 |
Hello Andrew,
in doc/gmpl.pdf, chapter "4.9 Printf" please add a description of
the supported escape sequences, e.g.
The following escape sequences are supported in the format contol string:
\n is output as line feed (0x0a) or as carriage return, line feed (0x0d, 0x0a)
depending on the host system.
\t is output as horizontal tab (0x09).
\\ is output as backslash (0x5c).
In doc/gmpl.pdf, chapter 2.3 "String literals", please, add a remark
like
Escape sequences are not supported in string literals.
See chapter "4.9 Printf" for escape sequences usable in the printf
command.
---
I was supprised that the support of escape sequences is coded in
printf() and not in get_token(), which is easily shown by the
output of the following model:
printf "%s\n", "line1\nline2";
printf "line3\nline4\n";
end;
which outputs
Memory used: 0.0 Mb (37989 bytes)
line1\nline2
line3
line4
Model has been successfully processed
This matches the behaviour of AMPL.
ampl: printf "%s\n", "line1\nline2";
line1\nline2
ampl: printf "line3\nline4\n";
line3
line4
ampl:
Best regards
Xypron
--
Neu: GMX De-Mail - Einfach wie E-Mail, sicher wie ein Brief!
Jetzt De-Mail-Adresse reservieren: http://portal.gmx.net/de/go/demail
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Help-glpk] Documentation: printf,
glpk xypron <=