Re: Argument typing in Compile
- To: mathgroup at smc.vnet.net
- Subject: [mg9381] Re: Argument typing in Compile
- From: "Xah" <xah at best.com>
- Date: Sun, 2 Nov 1997 01:02:15 -0500
- Organization: smtp.best.com
- Sender: owner-wri-mathgroup at wolfram.com
At 12:34 AM -0800 1997.11.01, Sean Ross wrote: >Does anyone know of a way to define a symbol that will execute one bit >of compiled code for certain types of arguments and another bit of >compiled code for other arguments without resorting to an explicit If >or Case structure? Hi Sean, You could use the same technique to define functions that uses Compile. f[x_Integer]=Compile[...]; f[x_Real]=Compile[...]; The commands Set and SetDelayed are permament versions of Rule and RuleDelayed. (with the condition that Rule and RuleDelayed needs to be used in conjunction with Replace or similar commands) Xah, xah at best.com http://www.best.com/~xah/Wallpaper_dir/c0_WallPaper.html Mountain View, CA, USA