Timeline for How to return unevaluated variable?
Current License: CC BY-SA 4.0
8 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Apr 10, 2022 at 8:57 | answer | added | Sjoerd Smit | timeline score: 3 | |
| Apr 9, 2022 at 21:48 | answer | added | Nate | timeline score: 3 | |
| Apr 9, 2022 at 21:21 | answer | added | Kenric | timeline score: 4 | |
| Apr 9, 2022 at 16:25 | comment | added | hana | @bills I did that too but I wondered if there is a better way as I used too many variables so I'm kind of lacking names. | |
| Apr 9, 2022 at 16:24 | comment | added | hana | @MarcoB I want to have a function that retun an expression with variables that I can replace later to get the value if needed. If I make b local then I cannot return b but something like $1000 and it's hard to replace for value later. ut | |
| Apr 9, 2022 at 15:26 | comment | added | bill s | One workaround would be to use Clear[b] just before you call myfunction. Or to add Clear[b] into the function: myfunction[a_] := Module[{}, Clear[b]; 1 + (2 a - 1) b]. | |
| Apr 9, 2022 at 14:25 | comment | added | MarcoB | You are trying to subvert a pretty fundamental part of the language. Try to describe the problem you are trying to solve, rather than the solution you are attempting to implement. I suspect there might be another way to achieve your original goal. | |
| Apr 9, 2022 at 13:47 | history | asked | hana | CC BY-SA 4.0 |