We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement type conversion that allows for expressions to be converted into other types using the following syntax:
exp as type
num as str
str as num
NaN
bool as str
"true"
"false"
bool as num
1
0
any as bool
""
false
true
The text was updated successfully, but these errors were encountered:
The implementation of any as bool will be delayed until any types are implemented.
Sorry, something went wrong.
Implemented by #146
Luna-Klatzer
Successfully merging a pull request may close this issue.
Is there an existing proposal for this?
This feature does not exist in the latest version
Proposal
Implement type conversion that allows for expressions to be converted into other types using the following syntax:
Exact behaviour you want
num as str
- Return the literal number in string format.str as num
- Return the parsed number from the string, if it contains invalid characters, it will returnNaN
.bool as str
- In case of true return"true"
otherwise"false"
.bool as num
- In case of true return1
and otherwise0
.any as bool
- In case that the value is not0
,""
, orfalse
returntrue
.The text was updated successfully, but these errors were encountered: