Joel Imbergamo
Joel Imbergamo

Reputation: 369

Can I define my own binary operators in Ada?

I am creating a package in Ada and I am wondering if it's possible to create my own binary operators not define standard ones. Like

function "sim"(L,R : matrix) returns boolean;

which checks if the two matrices are similar.

Thanks in advance for your help!!

Upvotes: 1

Views: 148

Answers (1)

Jim Rogers
Jim Rogers

Reputation: 5021

Ada allows you to override operators but you cannot invent new operators. On the other hand you can create new functions as you like.

Upvotes: 8

Related Questions