Κυριακή 19 Ιουλίου 2020

Revision 49, Version 9.9

Revision 49:
A bug from last 2 revisions fixed.

Revision 48:
Now we can use  This with dots to get the opened object in a For object structure.

Here is the version with pointers

class beta {
      x=500000
      module beta {
            Module Check (&z) {
                  Print z.x
            }
            class alfa {
                  x=10
            }
            dim k(10)<<pointer(alfa())
            K(1).x=500
            For K(1), k(3) {
                  Print this.x, .x, ..x
                  Check &.This
                  Check &..This
            }
      }
}
m=beta()
m.beta

Or this version

class beta {
      x=500000
      module beta {
            Module Check (&z) {
                  Print z.x
            }
            class alfa {
                  x=10
            }
            dim k(10)<<pointer(alfa())
            K(1).x=500
            For K(1), k(3), this {
                  Print ...x, .x, ..x
                  Check &.This
                  Check &..This
            }
      }
}
m=beta()
m.beta

And for normal objects (not pointers used, these are just unnamed groups, or float groups)

class beta {
      x=500000
      module beta {
            Module Check (&z) {
                  Print z.x
            }
            class alfa {
                  x=10
            }
            dim k(10)=alfa()
            K(1).x=500
            For K(1), k(3) {
                  Print this.x, .x, ..x
                  Check &.This
                  Check &..This
            }
      }
}
m=beta()
m.beta

And another version

class beta {
      x=500000
      module beta {
            Module Check (&z) {
                  Print z.x
            }
            class alfa {
                  x=10
            }
            dim k(10)=alfa()
            K(1).x=500
            For K(1), k(3), this {
                  Print ...x, .x, ..x
                  Check &.This
                  Check &..This
            }
      }
}
m=beta()
m.beta

And two versions using a module which isn't member of a group (object)

with pointers

module beta {
      x=6000
      Module Check (&z) {
            Print z.x
      }
      class alfa {
            x=10
      }
      dim k(10)<<pointer(alfa())
      K(1).x=500
      For K(1), k(3), this {
            Print ...x, .x, ..x
            Check &.This
            Check &..This
      }
}
beta



and without pointers

module beta {
      X=6000
      Module Check (&z) {
            Print z.x
      }
      class alfa {
            x=10
      }
      dim k(10)=alfa()
      K(1).x=500
      For K(1), k(3), this {
            Print ...x, .x, ..x
            Check &.This
            Check &..This
      }
}
beta




Δεν υπάρχουν σχόλια:

Δημοσίευση σχολίου

You can feel free to write any suggestion, or idea on the subject.