Writing:
CreateDialog[{TextCell["Enter number: "],
InputField[Dynamic[nm], String]Number],
DefaultButton[DialogReturn[ret = nm]]}];
ConstantArray[0, nm];
I get:
ConstantArray::ilsmn: Single or list of non-negative machine-sized integers expected at position 2 of ConstantArray[0,1].
and I do not know how to correct. Some idea? Thank you!