Editing Reports 1 You are editing an old version of this page. If you save it, any changes made since this version will be lost. You are editing an old version of this page. If you save it, any changes made since this version will be lost. You are not logged in. The rich text editor does not work with JavaScript switched off. Please either enable it in your browser options, or visit your preferences to switch to the old MediaWiki editor '''Reports''' are collections of code in FiM++. A report contains all the code that will be run, as well as basic information about the program. == Contents == A report must have the following: * A name * A addressee (another report from which it gets basic [[paragraphs]]) * A beginning * An end * The programmer's name == Related [[Phrases]] == * [[Addressee]] specification ** {{code|keyword|Dear}} * [[Interface]] listing ** {{code|keyword|and}} * Report Ending ** {{code|keyword|Your faithful student}} == Name == === Restrictions === Each report name has the following restrictions: * Must '''not''' contain any [[keywords]] (However, [[operators]] and [[literals]] are okay) * Must '''not''' contain any [[punctuation]] * Must begin with one non-[[whitespace]], non-[[literal]] character * Must end with one non-whitespace character character === Freedoms === Each report name also has the following freedoms: * There is no hard limit on the length * May have any whitespace character in them * May contain [[literals]], as long as they are not at the beginning of the name * May contain apostrophes * Encoded in [[Wikipedia:UTF-8|UTF-8]] === Examples === Here are some examples of '''good''' report names: * {{codeblock|{{code|report|Princess Celestia}}}} * {{codeblock|{{code|report|Fancy Mathematics}}}} ** Report names don't have to start with "Princess", or even be a character's name. * {{codeblock|{{code|report|Applejack's Drinking Song}}}} ** Even though {{code|apostrophe|'}} is used to declare character literals, it is used in the middle of a name, so it is okay. * {{codeblock|{{code|report|True Facts}}}} ** Even though {{code|literal|true}} is a literal, FiM++ is '''case-sensitive''', so {{code|not a literal|True}} is valid for report naming. * {{codeblock|{{code|report|Lesson 0}}}} ** Even though {{code|literal|0}} is always a literal, it is not the at the beginning of the name, so it's okay. Here are some examples of '''bad''' report names: * {{codeblock|{{code|report|A story}}{{code|whitespace| }}{{code|keyword|{{codeerror|I learned}}}}}} ** {{code|keyword|I learned}} is ''always'' a keyword, so this will not compile. ** The compiler sees that a keyword has been used and ends the report name, then does not see a punctuation mark and, furthermore, does not know what to do with the {{code|keyword|I learned}} phrase. ** The compiler would throw an [[Unexpected Token Error]] * {{codeblock|{{code|report|Hay}}{{code|punctuation|,}}{{code|whitespace| }}{{codeerror|Celly}}{{code|punctuation|!}}}} ** compiler thinks "{{code|punctuation|,}}" is the end of the report name "Hay", and doesn't know what to do with the word "Celly" ** The compiler would throw a [[Malformed Sentence Error]], because "Celly" is not a complete [[sentence]] * {{codeblock|{{code|literal|{{codeerror|'}}Sup}}}} ** {{code|apostrophe|'}} is used to start a character literal, so the compiler sees this as an unclosed character literal. ** The compiler would throw both an [[Unexpected Token Error]] an [[Unclosed Character Literal Error]] * {{codeblock|{{code|literal|{{codeerror|99}}}}{{code|whitespace| }}{{codeerror|Jugs of Cider}}}} ** {{code|literal|99}} is ''always'' a literal, so it cannot be the beginning of a report name. ** The compiler would throw an [[Unexpected Token Error]] == The Addressee == {{See Also/small|Princess Celestia}} Every report must have an addressee. If a report does not explicitly define an addressee, then it will not compile. The only report that does not have an addressee is the base report [[Princess Celestia|{{code|report|Princess Celestia}}]]. If you don't want to define a new addressee, use {{code|report|Princess Celestia}}. == Structure == Reports must be written in the following structure: (Optional imports; any amount) Addressee specification; exactly one (Optional interfaces) Report declaration; exactly one (Optional [[paragraphs]]; any amount) Report closing; exactly one Author name [[comment]]; exactly one === [[Imports]] === {{mane/small|Imports}} : {{codeblock|{{code|keyword|Remember when I wrote about}}{{tag|whitespace}}{{tag|report|Imported Report Name}}{{tag|punctuation}}}} === Declaration === ==== [[FDS]] ==== : {{codeblock|{{code|keyword|Dear}}{{tag|whitespace}}{{tag|report|Addressee name}}[‍{{tag|nothing}}/{{tag|whitespace}}{{code|keyword|and}}{{tag|whitespace}}{{tag|report|Interface name}}...]{{tag|punctuation}}{{tag|report|Report name}}{{tag|punctuation}}}} === Global [[variables]] === {{mane/small|variables}} Any variable declared inside the report that is not declared in a paragraph is a global variable. That is to say, it can be accessed form any report paragraph at any time === [[Paragraphs]] === {{mane/small|Paragraphs}} Paragraphs contain most of the code inside a report that runs === Closing === Reports must be closed using the text {{code|keyword|Your faithful student}}, followed by a [[punctuation]], followed by the programmer's name, followed by another punctuation. The programmer's name is a special comment, in that it is automatically started, ended with punctuation, and can be inserted into the final compiled file unchanged. : {{codeblock|{{code|keyword|Your faithful student}}{{tag|punctuation}}{{code|comment| Programmer's name}}{{tag|punctuation}}}} == See Also == * [[Paragraphs]] * [[Variables]] {{Navbox/Phrases}} Loading editor Below are some commonly used wiki markup codes. Simply click on what you want to use and it will appear in the edit box above. Insert: – — … ° ≈ ≠ ≤ ≥ ± − × ÷ ← → · § Sign your username: ~~~~ Wiki markup: {{}} | [] [[]] [[Category:]] #REDIRECT [[]] <s></s> <sup></sup> <sub></sub> <code></code> <blockquote></blockquote> <ref></ref> {{Reflist}} <references/> <includeonly></includeonly> <noinclude></noinclude> {{DEFAULTSORT:}} <nowiki></nowiki> <!-- --> <span class="plainlinks"></span> Symbols: ~ | ¡ ¿ † ‡ ↔ ↑ ↓ • ¶ # ¹ ² ³ ½ ⅓ ⅔ ¼ ¾ ⅛ ⅜ ⅝ ⅞ ∞ ‘ “ ’ ” «» ¤ ₳ ฿ ₵ ¢ ₡ ₢ $ ₫ ₯ € ₠ ₣ ƒ ₴ ₭ ₤ ℳ ₥ ₦ № ₧ ₰ £ ៛ ₨ ₪ ৳ ₮ ₩ ¥ ♠ ♣ ♥ ♦ View this template This field is a spam trap. DO NOT fill it in! Edit summary Preview Mobile Desktop Show changes