























ced is an interactive C REPL. Type a line, press Return, and see the result
immediately. A minimal valid C program is maintained behind the scene.
On startup, ced creates a skeleton file containing
#include <stdio.h>
int main() {
return 0;
}
and positions you at line 3 (inside main). All line numbers are 1-indexed.
Enter a statement without a semicolon and press Return to run it
immediately. If the line is not a preprocessor directive, semicolon will be
appended automatically.
To continue a statement across multiple lines, end a line with ; or { and
press Return. The following line will be joined to the previous one. It
won't be executed until you submit the normal statement.
To split a statement across lines while preserving the line break, end a
line with \ , press Enter and continue on the next.
When a line triggers compilation, only output produced by that line is shown,
previous output is not repeated. Use :run to re-execute and see the full
output.
If compilation fails, ced discards the offending change and restores the
previous working source. Use :debug to inspect the failed code that
triggered the error.
:l, :list print current source with line numbers (+ is the active line)
:d, :debug print source from last compile attempt
:r, :run compile and run current source
:N move to line N
:clear, :reset restore the initial skeleton
/bin/sh, tcc, awk, and standard POSIX utilities (head, tail, cp).
For basic line editing and history support, wrap with rlwrap:
rlwrap ced
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。