Created
January 20, 2011 18:28
-
-
Save woodie/788331 to your computer and use it in GitHub Desktop.
Hello Mirah
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ mirah test.mirah | |
Hello 1 | |
Hello 2 | |
Hello 3 | |
Hello 4 | |
Hello 5 | |
$ mirahc --java test.mirah |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Generated from test.mirah | |
public class Test extends java.lang.Object { | |
public static void main(java.lang.String[] argv) { | |
int __xform_tmp_1 = 0; | |
int __xform_tmp_2 = 0; | |
int i = 0; | |
__xform_tmp_1 = 1; | |
__xform_tmp_2 = 5; | |
label1: | |
while ((__xform_tmp_1 <= __xform_tmp_2)) { | |
i = __xform_tmp_1; | |
label2: | |
{ | |
java.io.PrintStream temp$3 = java.lang.System.out; | |
temp$3.println("Hello " + i); | |
} | |
__xform_tmp_1 = (__xform_tmp_1 + 1); | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1.upto(5) { |i| puts "Hello #{i}" } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment