Timeline for Full programs, functions, and snippets in Mathematica
Current License: CC BY-SA 3.0
4 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jun 23, 2017 at 0:07 | comment | added | user61980 |
@MartinEnder So it seems that you're right that if you do wolframscript -file code.wl , it won't output anything unless you use something like Print , and there doesn't seem to be any way to get the returned expression. However, you can do wolframscript -code $SystemWordLength and it will output the result. Also, since we define languages by their implementations, this is only a drawback of wolframscript, not Mathematica. You can run a Mathematica program by entering the code into a notebook, using Get , or opening the .wl file and clicking Run All Code , all with the same result.
|
|
Jun 22, 2017 at 18:25 | comment | added | Martin Ender Mod |
I think that a "full program" should be something that can be invoked (and used) from the command line, not something that can be imported in some other program of the same language. The "return value" you're talking about is not accessible when invoking a file containing $SystemWordLength as a script from the command line.
|
|
Jun 22, 2017 at 16:52 | history | edited | user61980 | CC BY-SA 3.0 |
added 11 characters in body
|
Jun 22, 2017 at 16:47 | history | answered | user61980 | CC BY-SA 3.0 |