结构化的郎? [英] structured lang?

查看:95
本文介绍了结构化的郎?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,

我有一个非常基本的疑问。

为什么C称为结构化编程语言?为什么结构化?

C ++被称为面向对象的语言''它服从OOP'的
概念..为什么C称为结构化编程lang ??

感谢所有那些会回答..

-ambika

解决方案

ambika< in ******* @ yahoo。 COM>潦草地写道:

你好,
我有一个非常基本的怀疑。
为什么C称为结构化编程语言?为什么结构化?
C ++被称为a面向对象的语言''它遵循OOP'的概念。为什么C被称为结构化编程lang ??
感谢所有想要回答的人......
-ambika




因为C源代码被转换为目标代码,结构为

方式。

这是一个结构C代码:


{

printf(Hello world!\ n);

}


这里有两个嵌在一起的C代码结构:


{

int i;

for(i = 0; i< 100; i ++)

{

printf(" Hello world!\ n");

}

}


你能看到吗?您可以将结构嵌套在彼此内部,或者像你想要的那样深入或宽泛。


这是一个非常简短的浅层结构介绍

编程。如果是合适的,请参阅有关编程的教科书。如果你没有一个,请你的老师推荐一个,然后出去

买它。


-

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

| 飞翔的柠檬树中的金鸡王G ++ FR FW + M-#108 D + ADA N +++ |

| http://www.helsinki.fi/~palaste W ++ B OP + |

\ -----------------------------------------芬兰的规则! ------------ /

Immanuel Kant但成吉思汗。

- 官方格拉菲斯特的手册


结构化意味着你使用过程和while()和for()和

做{} while()循环而不是gotos。

i不知道哪种语言至少不支持这个含义

结构(也许是旧版本的基本不会)。

但这是结构化编程,结构你的代码,没有

spaghettis& gotos。


oop也是结构化的,但它更进一步,以便每个变量和

函数必须属于一个类,没有任何全局性的东西。


-

cody


[免费软件,游戏和幽默]
www.deutronium.de.vu || www.deutronium.tk

" ambika" ; <在******* @ yahoo.com> schrieb im Newsbeitrag

新闻:bf ************************* @ posting.google.co m ... < blockquote class =post_quotes>你好,我有一个非常基本的疑问。
为什么C称为结构化编程语言?为什么结构化?
C ++被称为面向对象语言''因为它遵循OOP的概念。为什么C被称为结构化编程lang ??
感谢所有那些要回答的人......
-ambika



cody< de ******** @ gmx.net>潦草地写道:

结构化意味着你使用过程和while()和for()和
做{} while()循环而不是gotos。
我不懂语言这至少不支持这个含义的结构(可能是基本版本的旧版本)。
但这是结构化编程,构造你的代码而没有spaghettis& gotos。
oop也是结构化的,但它更进一步,所以每个变量和
函数必须属于一个类,没有任何全局性的东西。




你确定你不仅限于命令式语言

吗?我知道至少有一些OO语言不是必须的,并且它们当然不能简单地归类为具有

循环而不是gotos ;。非命令式语言通常缺少任何明确规定的控制流程。这种

语言的一些例子是Prolog,ML和Haskell。


-

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

| 飞翔的柠檬树中的金鸡王G ++ FR FW + M-#108 D + ADA N +++ |

| http://www.helsinki.fi/~palaste W ++ B OP + |

\ -----------------------------------------芬兰的规则! ------------ /

你可以选择你的朋友,你可以捡起你的鼻子,但你不能选择你的

亲戚。

- MAD杂志


Hello,
I have a very basic doubt.
Why is C called a structured programming language??why structured?
C++ is called a Object Oriented language ''cos it obeys the OOP''s
concepts..Why is C called a structured programming lang??
Thanks to all those who are gonna answer..
-ambika

解决方案

ambika <in*******@yahoo.com> scribbled the following:

Hello,
I have a very basic doubt.
Why is C called a structured programming language??why structured?
C++ is called a Object Oriented language ''cos it obeys the OOP''s
concepts..Why is C called a structured programming lang??
Thanks to all those who are gonna answer..
-ambika



Because C source code is translated into object code into a structural
way.
Here is a structure of C code:

{
printf("Hello world!\n");
}

Here are two structures of C code nested together:

{
int i;
for (i=0; i<100; i++)
{
printf("Hello world!\n");
}
}

Can you see? You can nest structures inside each other pretty much as
deep or as wide as you like.

This is a *VERY* short and shallow introduction to structured
programming. For a proper one, see a textbook about programming. If
you don''t have one, ask your teacher to recommend one, and go out and
buy it.

--
/-- Joona Palaste (pa*****@cc.helsinki.fi) ---------------------------\
| Kingpriest of "The Flying Lemon Tree" G++ FR FW+ M- #108 D+ ADA N+++|
| http://www.helsinki.fi/~palaste W++ B OP+ |
\----------------------------------------- Finland rules! ------------/
"Immanuel Kant but Genghis Khan."
- The Official Graffitist''s Handbook


structured means that you use procedures and while() and for() and
do{}while() loops instead of gotos.
i know no language which does not at least support this meantioned
structures(maybe older versions of basic doesn''t).
but this is structured programming, structure your code and do not have
spaghettis&gotos.

oop is structured too, but it goes further so that every variable and
function must belong to a class, there isn''t any global thing.

--
cody

[Freeware, Games and Humor]
www.deutronium.de.vu || www.deutronium.tk

"ambika" <in*******@yahoo.com> schrieb im Newsbeitrag
news:bf*************************@posting.google.co m...

Hello,
I have a very basic doubt.
Why is C called a structured programming language??why structured?
C++ is called a Object Oriented language ''cos it obeys the OOP''s
concepts..Why is C called a structured programming lang??
Thanks to all those who are gonna answer..
-ambika



cody <de********@gmx.net> scribbled the following:

structured means that you use procedures and while() and for() and
do{}while() loops instead of gotos.
i know no language which does not at least support this meantioned
structures(maybe older versions of basic doesn''t).
but this is structured programming, structure your code and do not have
spaghettis&gotos. oop is structured too, but it goes further so that every variable and
function must belong to a class, there isn''t any global thing.



Are you sure you aren''t restricting yourself to imperative languages
only? I know there are at least some OO languages that aren''t
imperative, and they certainly can''t be categorised simply as "having
loops instead of gotos". Non-imperative languages usually lack any
explicitly mandated flow of control at all. Some examples of such
languages are Prolog, ML and Haskell.

--
/-- Joona Palaste (pa*****@cc.helsinki.fi) ---------------------------\
| Kingpriest of "The Flying Lemon Tree" G++ FR FW+ M- #108 D+ ADA N+++|
| http://www.helsinki.fi/~palaste W++ B OP+ |
\----------------------------------------- Finland rules! ------------/
"You can pick your friends, you can pick your nose, but you can''t pick your
relatives."
- MAD Magazine


这篇关于结构化的郎?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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