c ++和pascal中多态性的差异 [英] The Difference of polymorphism in c++ and pascal
本文介绍了c ++和pascal中多态性的差异的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
嗨
谁能说出c ++和pascal中多态性的区别.
谢谢.
Hi
Can anybody say me the difference of polymorphism in c++ and pascal .
Thank you .
推荐答案
Pascal基本上是单态的:您无法定义多态函数或过程.但是,某些内置函数是多态的(例如+,-,*和/).但是,FORTRAN也是如此,因此它并不是一个很好的例子!
这里有一个讨论此问题的文档: http://webcourse .cs.technion.ac.il/234319/Spring2007/ho/WCFiles/05-Polymorphism.pdf [
Pascal is basically monomorphic: you can''t define polymorphic functions or procedures. However, some of the built in functions are polymorphic (+, -, * and / for example). However, this is also true of FORTRAN so it isn''t really a good example!
There is a document here which does talk about this: http://webcourse.cs.technion.ac.il/234319/Spring2007/ho/WCFiles/05-Polymorphism.pdf[^] Search for Pascal and you will see.
这篇关于c ++和pascal中多态性的差异的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文