Using polyformism

How to pass an object to a procedure? How to access the properties of this object within the procedure?

Hi @super_adm_lucius!
Welcome to the community!

You can use generic blocks to implement polymorphism in blocks.
Something like this:

blocks

And use it like:
blocks(2)

Generic blocks can be found in the “Any component” section

1 Like

Thanks! What about classes and interfaces?

Blockly (the block-language Kodular blocks are based on) isn’t really an object oriented system, so I don’t think it’s possible to write classes or use other OO features.

1 Like