TA的每日心情 | 奋斗 2015-6-25 18:04 |
---|
签到天数: 1 天 连续签到: 1 天 [LV.1]测试小兵
|
C函数的参数列表里直接引用是不可以的,为了验证,我写了一个例程:
=======================
int abc(char ps[],int a,int b)
{
lr_message("%s,%d+%d = %d\n",ps,a,b,a+b);
return 0;
}
Action()
{
int i,j;
lr_save_string ("运算结果","ps");
for (i=0;i<10;i++)
{
for (j=10;j>0;j--)
{
abc("{ps}是",i,j);
}
}
return 0;
}
=============================
执行结果如下:
Starting action Action.
{ps}是,0+10 = 10
{ps}是,0+9 = 9
{ps}是,0+8 = 8
{ps}是,0+7 = 7
{ps}是,0+6 = 6
…………
{ps}是,9+6 = 15
{ps}是,9+5 = 14
{ps}是,9+4 = 13
{ps}是,9+3 = 12
{ps}是,9+2 = 11
{ps}是,9+1 = 10
Ending action Action. |
|