Comments (6)
"now becomes" is not a legal assignment syntax in this dialect of FiM++.
Try: "Rarity's Gems made sum of Rarity's Gems and Spike's Hoard."
I agree that parser error messages are not that helpful yet.
from fimpp.
Well, I tried:
"Rarity's Gems is now Rarity's Gems plus Spike's Hoard."
That just claimed it didn't know what 'is' was...
I'll try that line and get back to you.
from fimpp.
sigh that line worked, but nothing else seems to work...
The following is a Fibonacci program I've been working on, everywhere grammar sucks is when the interpreter didn't like my word choice...
Dear Princess Celestia: Fibonacci.
I learned The Fibonacci Sequence using a number Applejack's number.
Did you know that Rarity's Gems is the number 1?
Did you know that Spike's Hoard is the number 1?
I said Spike's Hoard.
I said Rarity's Gems.
Applejack's number got 2 less.
I did this while Applejack's number were not equal to 0:
Applejack's number got 1 less.
When Rarity's Gems had less than Spike's Hoard:
Rarity's Gems made sum of Rarity's Gems and Spike's Hoard.
I said Rarity's Gems.
Otherwise:
Spike's Hoard made sum of Rarity's Gems and Spike's Hoard.
I said Spike's Hoard.
That's what I would do.
That's what I did.
That's all about The Fibonacci Sequence!
Today I learned about The start.
I remembered The Fibonacci Sequence using the number 10.
That's all about The start!
Your faithful student, Alex Ford.
at the moment it is choking on the Otherwise: and the I remembered line...
What dialect of english is this for?
from fimpp.
I recommend reading the syntax guide: https://github.com/KarolS/fimpp/tree/master/syntax
I think it contains everything that is currently implemented.
Syntax is not that rich, it's in no way as nice as Inform 7. Also, there are differences when compared to all the random snippets of code that circulated on the internet. Neither people from EqD nor DA had an interpreter to test their programs with, so whatever they wrote, most likely won't run on any current FiM++ implementation.
If you have some ideas for language extension, I'm open for suggestions.
from fimpp.
sigh
The main problem I was having was that the syntax guide in the repo didn't work!
from fimpp.
Okay, so I'm gonna explain why the code didn't work. All of the stuff I'm gonna point out is in the syntax guide.
I learned The Fibonacci Sequence using a number Applejack's number.
Also, FiM++ is dynamically typed, so instead of defining a parameter “Applejack's number” of type “number”, you defined a parameter called “number Applejack's number”. Of course this mistake wouldn't stop the interpreter from trying to run the program, but it would crash during runtime. With a weird error message nonetheless.
Otherwise:
Try “In the end, I did this instead:” I might add this one as an alternative in the future.
That's what I would do.
Try “That's what I did.” Most of the program should be written in past tense, and this particular phrase should be used verbatim. As above, I might add more variants as alternatives.
That's all about The Fibonacci Sequence!
Remove “all”.
I remembered The Fibonacci Sequence using the number 10.
Try “did” or “made” instead of “remembered” and “of” instead of “using”.That's all about The start!
C-style Main function shouldn't be closed by “That's about...”, but with “Your faithful student...” Simply remove this line.
After these fixes, the program runs correctly.
from fimpp.
Related Issues (5)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fimpp.