Re: Package File for Different Mathematica Versions
- To: mathgroup at smc.vnet.net
- Subject: [mg89984] Re: Package File for Different Mathematica Versions
- From: Oliver Ruebenkoenig <ruebenko at uni-freiburg.de>
- Date: Wed, 25 Jun 2008 06:31:54 -0400 (EDT)
- References: <g3q7sh$arq$1@smc.vnet.net>
Hi Andrew one way would be: myFunction[ args_ ] /; $VersionNumber >= 6 := Module[ {}, args + 1 ] You can refine that by using the $ReleaseNumber Oliver On Tue, 24 Jun 2008, Andrew Beveridge wrote: > I am writing a package file for Mathematica. I have two versions of > Mathematica targeted: 5.2 and 6.0.x. > > It would be nice to use some of the improvements in Version 6.0.x > without losing backwards compatibility with Version 5.2. > > I imagine one way to implement this would be the following: > > If $VersionNumber >= 6 then ... else ... > > However, I would prefer not to put a bunch of If statements into my > code; multiple lines would have to be modified. Is there are more > elegant way around this problem? Can a function be defined for a > particular versions of Mathematica in a package file? > > Thanks again for all of your help. > > Regards, > Andrew > > Andrew C Beveridge > MS M888 > Los Alamos National Laboratory > Los Alamos, NM 87545 > > 505-665-2092 > e-mail: acbev at lanl.gov > Oliver Ruebenkoenig, <ruebenko AT uni-freiburg.de>
- Follow-Ups:
- Re: Package File for Different Mathematica Versions
- From: Oliver Ruebenkoenig <ruebenko@uni-freiburg.de>
- Re: Re: Package File for Different Mathematica Versions
- From: Murray Eisenberg <murray@math.umass.edu>
- Re: Package File for Different Mathematica Versions