Wikia

FiM++ Community Wiki

For

Revision as of 21:00, January 11, 2013 by Supuhstar (wall | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
58pages on
this wiki
Comment1

Syntax

Counting

Iterating

Examples

Add all the numbers from 1 to 100

Did you know that Spike likes the number 0?
For every number x from 1 to 100...
Spike now likes Spike plus x.
That's what I did!

Java Equivalent

double Spike = 0;
for(double x = 1; x < 100; x++){;;
Spike = Spike + x;
}

Iterate through an array

Did you know that Berry Punch likes the phrase “Cheerwine”?
For every character c in Berry Punch ...
I said c.
That's what I did!

Java Equivalent

char[] BerryPunch = new char[]{'C','h','e','e','r','w','i','n','e'};
for(char c : BerryPunch){;;
System.out.println(c);
}


Icon Info
This article is a stub. You can help FiM++ Wiki by expanding it.

Around Wikia's network

Random Wiki