QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 3859|回复: 14

#####贴代码不排版者你是否能尊重一下他人的劳动#####

[复制链接]
发表于 2005-12-29 16:41:38 | 显示全部楼层 |阅读模式
用code功能将代码包含起来,而且代码要保持缩进。
否则别人是不会有心情给你看代码的。
#include <stdio.h>
main()
{
printf("hello world\n");
}

书写格式:
[code]
#include <stdio.h>
main()
{
printf("hello world\n");
}
[/code]

和生成的格式
[code:1]
#include <stdio.h>
main()
{
    printf("hello world\n");
}
[/code:1]
哪个看得舒服?

特别是代码比较长的,不排版不予理睬。

这也是对他人劳动的起码尊重。
发表于 2006-4-25 15:06:31 | 显示全部楼层
[code]
//test
WorkflowStore store = getPersistence();
            WorkflowEntry entry = store.findEntry(id);

            if (entry == null) {
                throw new IllegalArgumentException("No such workflow id " + id);
            }

            if (entry.getState() != WorkflowEntry.ACTIVATED) {
                return new int[0];
            }

            WorkflowDescriptor wf = getConfiguration().getWorkflow(entry.getWorkflowName());

            if (wf == null) {
                throw new IllegalArgumentException("No such workflow " + entry.getWorkflowName());
            }
[/code]
回复

使用道具 举报

发表于 2006-4-25 15:07:31 | 显示全部楼层
[code:1]
//test
WorkflowStore store = getPersistence();
WorkflowEntry entry = store.findEntry(id);

if (entry == null) {
throw new IllegalArgumentException("No such workflow id " + id);
}

if (entry.getState() != WorkflowEntry.ACTIVATED) {
return new int[0];
}

WorkflowDescriptor wf = getConfiguration().getWorkflow(entry.getWorkflowName());

if (wf == null) {
throw new IllegalArgumentException("No such workflow " + entry.getWorkflowName());
}
[/code:1]
回复

使用道具 举报

发表于 2006-4-26 08:55:32 | 显示全部楼层
好的,我们不知道可以这么书写代码,请原谅!
回复

使用道具 举报

发表于 2006-5-22 16:45:57 | 显示全部楼层
没发之前 在内容输入框中是缩进的 发送之后显示就不缩进了
回复

使用道具 举报

 楼主| 发表于 2006-5-22 22:00:25 | 显示全部楼层
缩进最好用空格
回复

使用道具 举报

发表于 2006-9-4 12:57:45 | 显示全部楼层
我试试
[code:1]
int main()
{ printf("asdf");
return 0; }
[/code:1]
[code:1]
int main()
{
printf("asdf");
return 0; }
[/code:1]
回复

使用道具 举报

发表于 2006-9-4 12:58:38 | 显示全部楼层
原来没有自动缩进的呀!
回复

使用道具 举报

发表于 2006-9-28 23:12:45 | 显示全部楼层
以前不知道这个概念,以后一定注意

顺便试一试看看:

-------------------------------------------------------------
--------------------------------------------------------------
[code:1]
#include <stdio.h>
main()
{
    printf("Hello World!\n");
}
[/code:1]
回复

使用道具 举报

发表于 2006-10-4 17:51:54 | 显示全部楼层

try

[code:1]
public class Try
{
    public static void main(String []args)
    {
         System.out.println("Hello,linuxfans");
    }
}
[/code:1]
回复

使用道具 举报

发表于 2006-10-10 20:39:36 | 显示全部楼层
试下
[code:1]

int main()
{
           printf("beauty");
           return 0;
}
[/code:1]
空格和编辑时看起来不一样宽.
回复

使用道具 举报

发表于 2006-11-30 16:22:37 | 显示全部楼层

test

[code]
#include <iostream>

using namespace std;

int main()
{
cout << "Hello,world." << endl;
return 0;
}
[/code]
回复

使用道具 举报

发表于 2006-11-30 16:25:35 | 显示全部楼层
[code:1]
#include <stdio.h>
main()
{
printf("hello world\n");
}
[/code:1]
回复

使用道具 举报

发表于 2006-11-30 16:34:40 | 显示全部楼层
[code:1]
//test

int f(int n)
{
    return n*n;
}

#include <iostream>

using namespace std;

int main()
{
    cout << "Sqat 5 = " << f(5) << endl;
    return 0;
}
[/code:1]
回复

使用道具 举报

发表于 2006-12-3 15:42:15 | 显示全部楼层
O也试试
[code:1]
#include <stdio.h>
void main()
{
   prinf("%s", "Hello!");
}
[/code:1]
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-4-28 05:21 , Processed in 0.097549 second(s), 15 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表