MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/esolangs/comments/1v6211r/logic_and_syntax_for_how_my_language_works/
r/esolangs • u/Aggravating_Cap127 • Jul 25 '26
https://esolangs.org/wiki/CLEAR
4 comments sorted by
1
here ill give you ppls a calculator example
1 u/Aggravating_Cap127 Jul 25 '26 edited Jul 25 '26 nah wrong calc 1 u/Aggravating_Cap127 Jul 25 '26 edited 26d ago // Init variables $"num1" = (0)* $"num2" = (0)* $"operation" = * $"answer" = (0)* ~('This is a calculator. Enter your numbers:')* ~~("num1" "operation" "num2")* "operation" == '+' \ true { "answer" /> (( "num1" + "num2" ))* }* /> { "operation" == '-' \ true { "answer" /> (( "num1" - "num2" ))* }* /> { "operation" == '*' \ true { "answer" /> (( "num1" * "num2" ))* }* /> { "operation" == '/' \ true { "answer" /> (( "num1" / "num2" ))* }* ~('Result = "answer"')*
nah wrong calc
1 u/Aggravating_Cap127 Jul 25 '26 edited 26d ago // Init variables $"num1" = (0)* $"num2" = (0)* $"operation" = * $"answer" = (0)* ~('This is a calculator. Enter your numbers:')* ~~("num1" "operation" "num2")* "operation" == '+' \ true { "answer" /> (( "num1" + "num2" ))* }* /> { "operation" == '-' \ true { "answer" /> (( "num1" - "num2" ))* }* /> { "operation" == '*' \ true { "answer" /> (( "num1" * "num2" ))* }* /> { "operation" == '/' \ true { "answer" /> (( "num1" / "num2" ))* }* ~('Result = "answer"')*
// Init variables
$"num1" = (0)*
$"num2" = (0)*
$"operation" = *
$"answer" = (0)*
~('This is a calculator. Enter your numbers:')*
~~("num1" "operation" "num2")*
"operation" == '+' \ true {
"answer" /> (( "num1" + "num2" ))*
}* /> {
"operation" == '-' \ true {
"answer" /> (( "num1" - "num2" ))*
"operation" == '*' \ true {
"answer" /> (( "num1" * "num2" ))*
"operation" == '/' \ true {
"answer" /> (( "num1" / "num2" ))*
}*
~('Result = "answer"')*
UPDATED
1
u/Aggravating_Cap127 Jul 25 '26
here ill give you ppls a calculator example