什么是弱类型程序设计语言

网络 2021-08-18 19:37:58 1 7,161

弱类型程序设计语言也称为弱类型定义语言,与强类型定义相反。像JavaScript、vb、php等就属于弱类型语言。弱类型语言与强类型语言的主要区别有以下两点。

(1)弱类型语言,变量没有各类之分,变量的声明用关键字var,为变量赋值时会自动判断类型并进行转换;强类型语言,变量类型有多种,并且变量只能接受与之相同的数据类型。

(2)弱类型语言,变量间不需要显式转换。例如,将字符串12和整数3进行相减,得到数值9,而不需要显式转换。


您的见解

已有 1 条答案
  • website 1楼
    Thank you for all your work on this site. Gloria enjoys carrying out investigation and it's really easy to understand why. All of us hear all about the lively mode you convey vital things through this website and cause response from others about this point then our own child is without a doubt learning a lot. Enjoy the remaining portion of the new year. You're the one carrying out a powerful job.
    发布于 2021/12/16 22:06