home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: sci.math.symbolic
- Path: sparky!uunet!stanford.edu!EE.Stanford.EDU!siegman
- From: siegman@EE.Stanford.EDU (Anthony E. Siegman)
- Subject: "Subroutines" in Mathematica?
- Message-ID: <1992Jul26.175810.15881@EE.Stanford.EDU>
- Organization: Stanford University
- Date: Sun, 26 Jul 92 17:58:10 GMT
- Lines: 14
-
- I want to collect a bunch of commands (several pages long) into a
- subroutine I can call repeatedly. I could try a Package of course,
- but they're complex and I have only global variables, don't need
- context changes or arguments, and just want the simplest solution. So
- far I've been using
-
- mySub = Hold[expr1, expr2, expr3, ...]
-
- all in one long cell, then later on
-
- x = 1; a = 3; ... ; ReleaseHold[mySub]
-
- to evaluate with global variable values as shown. Is there a simpler
- way?
-