【Bool】
在 Solidity 中的布林值以 true 和 false 表示,但其實 Boolean 只是一個 binary type。
pragma solidity ^0.8.11;
contract MyBoolean {
bool public myBoolean = false;
}可以使用反面表述:myVar = !myVar。也可以使用邏輯運算:&&, ||。
Last updated
Was this helpful?
在 Solidity 中的布林值以 true 和 false 表示,但其實 Boolean 只是一個 binary type。
pragma solidity ^0.8.11;
contract MyBoolean {
bool public myBoolean = false;
}可以使用反面表述:myVar = !myVar。也可以使用邏輯運算:&&, ||。
Last updated
Was this helpful?