(SystemVerilog) The ' operator -> please list all the usages

Hi All,

Could you please list all the usages of the operator?

I know it’s used for the static casting (for matching the data types).
Ex1: int’(2.0 * 3.0)

It’s also used for the data values replication.
Ex2: int A[2]; A='{0,1,2};

Is there another usage?

As for Ex2, can I rewrite it as following?
int A[2]; A=int’{0,1,2};
or this way as shown below?
int A[2]; A=3’{0,1,2}

Thank you!

In reply to dmitryl:

A cast '(expr) with parenthesis may look similar to an assignment pattern '{operands} with curly braces, but they have very different sets of rules.

A cast must always have an explicit target type prefix. int’(2.0 * 3.0). The expression inside the parentheses gets evaluated with a self-determined type, then the result gets assigned to a temporary variable of the target type, and that variable is the result of the cast.

An assignment pattern is used with array and struct types. It can have an implicit or explicit type. The implicit type is taken from the context where it appears in an assignment, or you can have an explicit type prefix. The operands of an assignment pattern get evaluated in the context of the type of array element or struct member in the pattern.