Wikia

FiM++ Community Wiki

Changes: Paragraph Declaration

Edit

Back to page

(Created page with "Paragraphs are declared with the text "{{code|keyword|I learned}}", followed by the name of the paragraph and a punctuation. Mane paragraphs start wit...")
 
(corrected some errors)
 
Line 13: Line 13:
 
Parameters ([[values]] that are sent to the paragraph) follow the return type and the word "{{code|keyword|using}}" and are separated from each other with "{{code|keyword|and}}".
 
Parameters ([[values]] that are sent to the paragraph) follow the return type and the word "{{code|keyword|using}}" and are separated from each other with "{{code|keyword|and}}".
   
* {{codeblock|{{code|keyword|I learned}}{{tag|whitespace}}{{tag|paragraph|paragraph name}}{{tag|whitespace}}{{tag|keyword|using}}{{tag|whitespace}}{{tag|type}}{{tag|whitespace}}{{tag|value}}{{tag|punctuation}}}}
+
* {{codeblock|{{code|keyword|I learned}}{{tag|whitespace}}{{tag|paragraph|paragraph name}}{{tag|whitespace}}{{tag|keyword|using}}{{tag|whitespace}}{{tag|type}}{{tag|whitespace}}{{tag|variable}}{{tag|punctuation}}}}
* {{codeblock|{{code|keyword|<strong>Today</strong> I learned}}{{tag|whitespace}}{{tag|paragraph|paragraph name}}{{tag|whitespace}}{{tag|keyword|using}}{{tag|whitespace}}{{tag|type}}{{tag|punctuation}}}}
+
* {{codeblock|{{code|keyword|<strong>Today</strong> I learned}}{{tag|whitespace}}{{tag|paragraph|paragraph name}}{{tag|whitespace}}{{tag|keyword|using}}{{tag|whitespace}}{{tag|type}}{{tag|whitespace}}{{tag|variable}}{{tag|punctuation}}}}
   
 
=== Examples ===
 
=== Examples ===
 
Plain declaration (no return, no parameters):
 
Plain declaration (no return, no parameters):
: {{codeblock|{{code|keyword|I learned}}{{code|whitespace|&nbsp;}}{{code|paragraph|how to multiply}}{{code|punctuation|.}}}}
+
: {{codeblock|{{code|keyword|I learned}}{{code|whitespace|&nbsp;}}{{code|paragraph|how to greet you}}{{code|punctuation|.}}}}
   
 
Declaration for a paragraph which returns a [[number]]:
 
Declaration for a paragraph which returns a [[number]]:
: {{codeblock|{{code|keyword|I learned}}{{code|whitespace|&nbsp;}}{{code|paragraph|how to multiply}}{{code|whitespace|&nbsp;}}{{code|keyword|with}}{{code|whitespace|&nbsp;}}{{code|type|a number}}{{code|punctuation|.}}}}
+
: {{codeblock|{{code|keyword|I learned}}{{code|whitespace|&nbsp;}}{{code|paragraph|to randomize}}{{code|whitespace|&nbsp;}}{{code|keyword|with}}{{code|whitespace|&nbsp;}}{{code|type|a number}}{{code|punctuation|.}}}}
   
 
Declaration for a paragraph which takes in an [[arrays|array]] of numbers called "{{code|variable|Fibonacci}}":
 
Declaration for a paragraph which takes in an [[arrays|array]] of numbers called "{{code|variable|Fibonacci}}":

Latest revision as of 02:20, January 8, 2016

Paragraphs are declared with the text "I learned", followed by the name of the paragraph and a punctuation. Mane paragraphs start with "Today I learned".

Return types can be left blank for a void return type, or will follow the paragraph name and the word "with" or "as.

Parameters (values that are sent to the paragraph) follow the return type and the word "using" and are separated from each other with "and".

Examples Edit

Plain declaration (no return, no parameters):

I learned how to greet you.

Declaration for a paragraph which returns a number:

I learned to randomize with a number.

Declaration for a paragraph which takes in an array of numbers called "Fibonacci":

I learned how to multiply as a number using the numbers Fibonacci.

Around Wikia's network

Random Wiki