gpt4 book ai didi

bash - "untyped"是否与 "dynamically typing"相同?

转载 作者:行者123 更新时间:2023-11-29 09:06:05 24 4
gpt4 key购买 nike

<分区>

根据 Advanced Bash-Scripting Guide ,

  1. bash 变量是无类型的:

    Unlike many other programming languages, Bash does not segregate its variables by "type." Essentially, Bash variables are character strings, but, depending on context, Bash permits arithmetic operations and comparisons on variables. The determining factor is whether the value of a variable contains only digits.

    该链接还提供了示例。

    “untyped”和“dynamically typing”的概念是一样的吗在编程语言中?如果不是,有什么关系和两者的区别?

  2. To lighten the burden of keeping track of variable types in a script, Bash does permit declaring variables.

    例如声明一个变量为整型,通过declare -i
    我的变量

    这就是所谓的“类型化”变量吗? "打字"是什么意思和“静态类型”的概念一样吗?

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com