Timeline for Define a delayed function depending on a global variable as though the variable's contents was pasted
Current License: CC BY-SA 4.0
16 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Nov 4, 2022 at 19:32 | history | edited | userrandrand | CC BY-SA 4.0 | Added tags and changed the title to include the use case and make the purpose of the the question easier to understand. |
| Nov 3, 2022 at 13:24 | comment | added | userrandrand | As the question is a common issue it might be helpful for other people searching for this problem to include the use case in the title. For example "define function using SetDelayed with a global variable as though it was pasted" | |
| Nov 2, 2022 at 12:00 | history | tweeted | twitter.com/StackMma/status/1587776585804947458 | ||
| Nov 2, 2022 at 8:15 | history | edited | ions me | CC BY-SA 4.0 | addded underscores to fix typo. |
| Nov 2, 2022 at 8:14 | comment | added | ions me | @user293787 yes I meant with underscores. I'll fix that right now. | |
| Nov 2, 2022 at 7:15 | history | became hot network question | |||
| Nov 2, 2022 at 6:16 | answer | added | lericr | timeline score: 3 | |
| Nov 2, 2022 at 6:02 | comment | added | lericr | @userrandrand reading through the post again, I think maybe you're right. I'll make it an answer. | |
| Nov 2, 2022 at 5:10 | comment | added | userrandrand | @lericr that looks like a pretty good answer | |
| Nov 2, 2022 at 5:08 | answer | added | att | timeline score: 3 | |
| Nov 2, 2022 at 2:54 | answer | added | userrandrand | timeline score: 4 | |
| Nov 2, 2022 at 0:32 | comment | added | lericr | So, for examle, execute Iconize[(a + x) y, "thing"]. Now you can copy/paste that icon into your NIntegrate expression. It'll look like a little gray thing labeled "thing", but it will really be the expression (a+x)y. | |
| Nov 2, 2022 at 0:21 | comment | added | lericr | Just in case this might be what you want, there is an Iconize feature. If you select your (a+x) y expression and bring up the context menu, you can choose to iconize it. There is also the Iconize symbol. You can copy/paste this thing around the notebook. | |
| Nov 2, 2022 at 0:19 | comment | added | lericr | If I'm understanding what you're asking for, the answer is "no". Variables don't really hold any contents. The Set (=) construct creates a rewrite rule in the environment. thing doesn't really have a value, it's not a reference to a memory location, for example. It's just something that the evaluator will replace according to the rewrite rule. Having said that, if the evaluator is running and encounters thing, it will immediately replace it, which is effectively "pasting its contents". However... | |
| Nov 1, 2022 at 23:24 | answer | added | RoberRM | timeline score: 2 | |
| Nov 1, 2022 at 23:14 | history | asked | ions me | CC BY-SA 4.0 |