Error while initializing dynamic array in System Verilog

In reply to sharvil111:

I rectified the points mentioned by you but I have couple of more doubts.

1.In the 2nd Point I am trying to shift temp_i_b by (k+d_zero) times to the left and store it in tempor. I did updated the code as

tempor[tempor.size()-1:0]=temp_i_b << (k+d_zero)

but it’s throwing me an error The range in array slice is illegal:. CAn you help me with ?

  1. I am not able to convert my ASCII string to its binary equivalent using
atobin()

. IS there any other way,I can achieve it? The input string I give,I need to convert it into binary and do certain operation on it.