you are viewing a single comment's thread
view the rest of the comments

In Horse64:

import horses from horses.horse64.org

func main {
    var my_horse = horses.Horse(color="brown")
}

And in Horse64 Root:

import horses from horses.horse64.org

func main -> bool {
    var my_horse <- horses.Horse
    my_horse.init("brown")
    if failed(my_horse.init) {
        return no
    }

    defer my_horse.destroy()

    my_horse.run()
    if failed(my_horse.run) {
        my_horse.stop()
        return no
    }

    my_horse.stop()
    if failed(my_horse.stop) {
        return no
    }

    my_horse.eat("hay")
    if failed(my_horse.eat) {
        return no
    }

    return yes
}
  • source