开发者

Does some Integer data types differnate with other Programming languages?

Do Integer data types allow spaces when it should be just numeric?

Do other programming languages allow spaces in an Integer data type?

For example, MySQL dat开发者_如何转开发abase storage does not allow spaces to be stored in an int data type. Do other languages allow it when storing in their own int type?


Don't let the fact that some systems present integers to the user, or accept integers from the user, with spaces or commas or other formatting fool you into thinking that integers can contain spaces or commas or anything else.

Integers are numbers and you are best thinking of them as just that, no more and no less.


Not any sane one. However, some languages (e.g. Python) and databases (e.g. SQLite) are strongly typed on the value, not variable or column. So while an integer can never hold spaces (or indeed any string), the same variable or column may hold elements of more than one type. See the SQLite FAQ.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜