C / C ++和Pascal的功能和过程之间的差异 [英] the different between function and procedure for C/C++ and Pascal

查看:75
本文介绍了C / C ++和Pascal的功能和过程之间的差异的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好......


请解释一下,C / C ++和Pascal的功能和程序有何不同。


Thankx ......

hello anyone...

pls explain me , how different between function and procedure for C/C++ and Pascal.

Thankx......

推荐答案

digital< di ******* @ fromru.com>潦草地写道:
digital <di*******@fromru.com> scribbled the following:
你好......

请解释一下,C / C ++和Pascal的功能和程序有何不同。
hello anyone...

pls explain me , how different between function and procedure for C/C++ and Pascal.




对于C和C ++:

没有程序这样的东西。

对于Pascal:

在comp.lang.pascal询问。


-

/ - Joona Palaste(pa*****@cc.helsinki.fi) -------------芬兰-------- \

\-- http://www.helsinki.fi/~palaste ------------------- - 规则! -------- /

冰淇淋销售不知何故导致溺水:两者都发生在夏季。

- Antti Voipio& Arto Wikla



For C and C++:
There is no such thing as "procedure".
For Pascal:
Ask at comp.lang.pascal.

--
/-- Joona Palaste (pa*****@cc.helsinki.fi) ------------- Finland --------\
\-- http://www.helsinki.fi/~palaste --------------------- rules! --------/
"Ice cream sales somehow cause drownings: both happen in summer."
- Antti Voipio & Arto Wikla


" digital <二******* @ fromru.com>在留言中写道

新闻:9c ****************************** @ localhost.ta lkaboutprogramming。 com ...
"digital" <di*******@fromru.com> wrote in message
news:9c******************************@localhost.ta lkaboutprogramming.com...
你好......

请解释一下,C / C ++
和Pascal的功能和程序有何不同。
谢谢......
hello anyone...

pls explain me , how different between function and procedure for C/C++ and Pascal.
Thankx......



您好,


在pascal中,程序和功能之间的区别在于:

程序没有返回值,函数有返回值。

所以没有真正的区别,所有pascal程序都可以写成

函数,并且你忽略了返回类型/值。


在C中,所有例程,过程和函数都被命名为函数。


从C函数映射到pascal过程:

过程myproc(x:integer); {pascal code}

void myproc(int x); / * C代码* /


''void''作为返回类型用于表示该函数没有返回

类型。


-

Elias


Hello,

In pascal, the difference between procedure and function is that:
procedure does not have a return value and function have a return value.
So there is no real difference, and all pascal procedures can be written as
functions, and you disregard the return type/value.

In C, all routines, procedures, functions are named a ''function''.

To map from C function to pascal procedure:
procedure myproc(x: integer); { pascal code }
void myproc(int x); /* C code */

The ''void'' as a return type is used to denote that function has no return
type.

--
Elias


digital写道:
digital wrote:
大家好......

请解释一下,C / C ++和Pascal的功能和程序有何不同。
hello anyone...

pls explain me , how different between function and procedure for C/C++ and Pascal.




没有这样的作为C / C ++的东西,C只有函数。

Pascal通常调用不返回值的函数(即

,仅为其副作用执行)''程序。''在C中,他们

只是返回类型为void的函数。


-

Martin Ambuhl



There is no such thing as C/C++, and C has only functions.
Pascal conventionally calls functions that do not return values (that is,
that are executed solely for their side-effects) ''procedures.'' In C, they
are just functions with a return type of void.

--
Martin Ambuhl


这篇关于C / C ++和Pascal的功能和过程之间的差异的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆