gitweb on Svarog
projekti pod git sistemom za održavanje verzija -- projects under the git version control system
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0c26324)
raw | patch | inline | side by side (parent: 0c26324)
author | Doni Pracner <quinnuendo@gmail.com> | |
Thu, 12 Jun 2014 14:17:54 +0000 (16:17 +0200) | ||
committer | Doni Pracner <quinnuendo@gmail.com> | |
Thu, 12 Jun 2014 14:17:54 +0000 (16:17 +0200) |
samples/fields.mj | [new file with mode: 0644] | patch | blob |
diff --git a/samples/fields.mj b/samples/fields.mj
--- /dev/null
+++ b/samples/fields.mj
@@ -0,0 +1,44 @@
+program F
+ class HolderClass {
+ int simple;
+ int[] arry;
+ }
+
+ HolderClass holder;
+
+{
+ void main()
+ int i, size;
+ {
+ holder = new HolderClass;
+ holder.simple = 5;
+
+ print(holder.simple,10);
+
+ print(chr(10));
+
+ size = 5;
+ holder.arry = new int[size];
+ holder.arry[0] = size+1;
+ i = 1;
+ while (i < size){
+ holder.arry[i] = holder.arry[i-1]-1;
+ i++;
+ }
+
+ i = 0;
+ while (i < size){
+ print(holder.arry[i],3);
+ i++;
+ }
+ print(chr(10));
+
+ i = 0;
+ while (i < size){
+ holder.arry[i]--;
+ print(holder.arry[i],3);
+ i++;
+ }
+
+ }
+}
\ No newline at end of file