Skip to main content
added 239 characters in body
Source Link
Artes
  • 57.9k
  • 13
  • 159
  • 247

Since your parameter i in Button is outside TableTable (because of the HoldRest attribute of Button), it is not a number anymore. However you could do e.g. this :

Button["Number: " <> ToString @ #, Print @ #] & /@ Range[5]

If there is a need for i parameter one can do this :

Button["Number: " <> ToString @ #, Print @ # ] & /@ Table[i, {i, 5}]

As it was stated the system doesn't evaluate i inside Button because of its HoldRest attribute.

Since your parameter i in Button is outside Table, it is not a number anymore. However you could do e.g. this :

Button["Number: " <> ToString @ #, Print @ #] & /@ Range[5]

If there is a need for i parameter one can do this :

Button["Number: " <> ToString @ #, Print @ # ] & /@ Table[i, {i, 5}]

As it was stated the system doesn't evaluate i inside Button because of its HoldRest attribute.

Since your parameter i in Button is outside Table (because of the HoldRest attribute of Button), it is not a number anymore. However you could do e.g. this :

Button["Number: " <> ToString @ #, Print @ #] & /@ Range[5]

If there is a need for i parameter one can do this :

Button["Number: " <> ToString @ #, Print @ # ] & /@ Table[i, {i, 5}]
added 239 characters in body
Source Link
Artes
  • 57.9k
  • 13
  • 159
  • 247

Since your parameter i in Button is outside Table, it is not a number anymore. However you could do e.g. this :

Button["Number: " <> ToString @ #, Print @ #] & /@ Range[5]

If there is a need for i parameter one can do this :

Button["Number: " <> ToString @ #, Print @ # ] & /@ Table[i, {i, 5}]

As it was stated the system doesn't evaluate i inside Button because of its HoldRest attribute.

Since your parameter i in Button is outside Table, it is not a number anymore. However you could do e.g. this :

Button["Number: " <> ToString @ #, Print @ #] & /@ Range[5]

Since your parameter i in Button is outside Table, it is not a number anymore. However you could do e.g. this :

Button["Number: " <> ToString @ #, Print @ #] & /@ Range[5]

If there is a need for i parameter one can do this :

Button["Number: " <> ToString @ #, Print @ # ] & /@ Table[i, {i, 5}]

As it was stated the system doesn't evaluate i inside Button because of its HoldRest attribute.

Source Link
Artes
  • 57.9k
  • 13
  • 159
  • 247

Since your parameter i in Button is outside Table, it is not a number anymore. However you could do e.g. this :

Button["Number: " <> ToString @ #, Print @ #] & /@ Range[5]