Skip to main content
edited body
Source Link
πρόσεχε
  • 4.5k
  • 1
  • 14
  • 28

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!

Writing:

CreateDialog[{TextCell["Enter number: "], 
              InputField[Dynamic[nm], String], 
              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!

Writing:

CreateDialog[{TextCell["Enter number: "], 
              InputField[Dynamic[nm], 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!

Source Link
πρόσεχε
  • 4.5k
  • 1
  • 14
  • 28

Error about CreateDialog

Writing:

CreateDialog[{TextCell["Enter number: "], 
              InputField[Dynamic[nm], String], 
              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!