开发者

Can we call a function inside a routine where the function return data type is void?

For example, I have:

void(temperature, pressure,time)
{
    int i;
    double results[10];

    for (i = 0 ; i <= 9 ; i++)  
    {
        fx(temperature, pressure, time);
        results[i]=fx[i];
    }
}

(P/S: above is the simplified version of my real problem) fx by itself is of course another ste of codes with equations for calculations that will give results in fx[i].

I was just wondering if I can call another function like that in a开发者_运维百科 'void' function. Just a curious question, Thanks!


Yes you can, as long as you give the outer function a name. (This is C, or similar, right?)


Yes you can, and I am really curious to know why you have this question in your mind because I cannot think of any reason.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜