Re: Programming language difficulties.
- To: mathgroup at smc.vnet.net
- Subject: [mg38430] Re: Programming language difficulties.
- From: wolframmath at netscape.net (mikhalna)
- Date: Sat, 14 Dec 2002 03:20:59 -0500 (EST)
- References: <atc9f8$3hs$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Hi Oliver, Your example works fine if you remove "Evaluate": In[1]:= secondWithdraw[ initBalance_ ] := Module[ { balance = initBalance }, Function[ amount, If[ balance >= amount, balance -= amount; balance, Print[ "Insufficient Funds" ] ] ] ] In[4]:= W1:=secondWithdraw[100] In[5]:=W1[60] Out[5]=40 Cheers.