The following is an example of a program written in this language:
Create a variable named name. Display "Enter your name: " and a newline.As you can see, some statements(statements are sentences) or expressions may seem a little weird and not exactly like you would say or write it yourself. This is because it is simply too hard (for me at least) to write a parser that can understand the complete English language.
Vary the value of name by call the function "ask". Make another variable called age.
Display "Enter your age: " and a newline.
Set the value of age to call function "to number" with call another function "ask".
Display "The name is " and the name. Show "." plus a newline. Show "The age is ".
Display the age. Show "." and another newline.
If the name equals "World" then:
Display "Hello World!" and a newline.
Display another newline.
That's all. Else, then:
Display "Now this is no longer a 'Hello, world!' program..." and a newline. That's all.
If the age is larger than 100 or the age equals 100 then:
Display "You are very old." and a newline.
Display another newline. That's all.
Otherwise, then:
Display "You are less than 100 years old." and a newline. That's it. Show "Bye!" and a newline.
Stop the program.
Vary the value of name by call the function "ask".The above probably seems very weird. But in fact, "by" is declared as a synonym for "to"(which is required for changing the values of variables) and "call the function "ask"" is considered a part of an expression.
The following...
Set the value of age to call function "to number" with call another function "ask"....is probably the weirdest statement of all. This is because it uses no temporary variables. It could be rewritten as following:
Declare a new variable named temp. Set the value of temp call function "get input". Change the value of age to execute procedure "to number" on temp.I think the above is a more "natural", but it is also longer.
Also note that the last statement("Stop the program.") is actually only executed until "Stop" and no dot is actually required after it. "the program." will be tokenized by the parser to(displayed on a stack of tokens here):
-token::Article("the")
-token::VarName("program")
-token::Dot('.')
But these tokens will never reach the interpreter, and thus cannot cause errors(most likely "unexpected token" errors). This all means that we could also write:
So, what have I done so far and what are the parameters of the language?
Stop the current program and do something else.
I have added expressions, variables, "if" and "else" statements, an output language construct and function calls(no user defined functions, only system functions). I have also added a "newline" variable and 2 system functions("to number" and "ask"/"get input"). I am not yet sure when and if I will add features such as user-defined functions, but I will most likely add at least one type of loop(probably while).
Some specific things for this programming language are the huge amount of synonyms available for every word, the fact that if statements have no separate scope and the ability to "formulate" sentences in a different way(made possible by "optional" words such as "the value"). Because of these things, I hope it seems clear that this language has no intention of being functional in any way.
This interpreter will be available soon, although I cannot and will therefor not give you a date yet.