I am almost sure you cannot do that directly.
But you can do an evaluation of "A"
If there is only a fixed number of "lengths"... values for "A", you can to a inverse comparison:
(something like that...) not positive about the syntax but you get the idea. Just remember the "else" statement in case you run into an anomaly.
...and if the variety of "lengths" is too great, you can just build the if statements using one digit at a time and sum the value as multiples. Through 999, you would only have 27 if statements; 9999 would be 36 if statements. I trust they are always whole numbers?
...if A^1= 2 then L^1=200 if A^2=9 then L^2=90 if A^3=5 then L^3=5 L=L^1+L^2+L^3
Of course, you also have to evaluate the length of A to determine the multiplier.