module string_l();
string a;
initial
begin
a="Hello";
$display ("@%gns a=%s", $time, a);
end
endmodule
Your problem is a string
is a SystemVerilog datatype and you compiled with a Verilog .v
file extension. Change the file extension to .sv
.