模板:Hc:修订间差异
来自康健生活
无编辑摘要 |
无编辑摘要 |
||
| 第1行: | 第1行: | ||
<noinclude>{{Documentation}}</noinclude><includeonly><pre <noinclude></noinclude> style="margin-bottom: 0; border-bottom:none; padding-bottom:0.8em;background-color: #ffffff;"> | <noinclude>{{Documentation}}</noinclude><includeonly><pre<noinclude></noinclude> style="margin-bottom: 0; border-bottom:none; padding-bottom:0.8em;background-color: #ffffff;">{{{head|{{{1|{{META Error}}}}}}}}</pre<noinclude></noinclude>><!-- The line break is needed, otherwise the wiki will generate extraneous paragraphs inside the 2nd pre block --> | ||
{{{head|{{{1|{{META Error}}}}}}}}</pre<noinclude></noinclude>><!-- The line break is needed, otherwise the wiki will generate extraneous paragraphs inside the 2nd pre block --><pre<noinclude></noinclude> style="margin-top: 0; border-top-style:dashed; padding-top: 0.8em;">{{{output|{{{2|{{META Error}}}}}}}}</pre<noinclude></noinclude>></includeonly> | <pre<noinclude></noinclude> style="margin-top: 0; border-top-style:dashed; padding-top: 0.8em;">{{{output|{{{2|{{META Error}}}}}}}}</pre<noinclude></noinclude>></includeonly> | ||
2020年2月19日 (三) 05:38的版本
这个文档嵌入自模板:Hc/doc
。
Block code with header.
- Use Template:bc for block code without header.
- Use Template:ic for inline code.
Usage
1orhead: the code in the top pane2oroutput: the code in the bottom pane
{{hc|main.h|#include <stdio.h>}}
{{hc|head=main.h|output=<syntaxhighlight lang="bash">
#include <stdio.h></syntaxhighlight>}}
Example
main.h
#include <stdio.h>