i know but
do
end
is weird for me
i like
{
}
but @sathvikrias said that he/she wanted it like this
[
]
i know but
do
end
is weird for me
i like
{
}
but @sathvikrias said that he/she wanted it like this
[
]
ill accept that
while(counting i to 10 step 2)[
]
Ok fine, if you want to. I still think do
and end
instead of curly braces/square brackets because would be better because it seems this language is supposed to be wordy so it's easier to understand. And it being weird doesn't really matter, this entire thing is kinda weird anyway. But I can't seem to persuade you and you probably wouldn't be able to persuade me too, so it'd be useless if we kept talking about this.
Anyway, by the omission of the parenthesis in the ellipses I wrote, I tried showing that the predicate thing didn't need to be enclosed in parenthesis. What do you (second person plural) think of that?
sure, that reminds me of Python its just
if ... :
so ESL would look like this
if...[
]
or
if... do
end
I think we could use break
to signify the end of the program but not the end of the control statement:
if ... do
break
else if ... do
break
else do
...
end
sure
im thinking of switch case statements
switch $var-name start
case value1: statement break
default: statement
end
what will custom blocks in ESL look like?
Setting functions:
set function make-a-square($param1, $param2) do /*How could this be formatted to allow for spaces?*/
...
end
Running functions:
make-a-square("param1text","param2text")
How's that?
void function hello world do
write "hello world" with a new line
end
hello world
then you can't put "do" at the end of function names. make the function name a string
void function "hello world" do
write "hello world" with a new line
end
hello world
also how would you make params
exactly, brackets can be used like this in english.
Not necessarily. Only certain values are legal, so it makes sense to view them as symbols rather than as text.
do ... done
?
so like this
do
//insert code here
done
yeah. Does that feel less weird?
kind of but i still like using
{
//code here
}
or
[
//code here
]
It's not really english syntax though...
i know