Re: Function parameters, using : and ?
- To: mathgroup at smc.vnet.net
- Subject: [mg2831] Re: [mg2813] Function parameters, using : and ?
- From: Allan Hayes <hay at haystack.demon.co.uk>
- Date: Sat, 23 Dec 1995 03:18:24 -0500
rmarimon at leland.stanford.edu (Ricardo Marimon) >Subject: [mg2813] Function parameters, using : and ? Finds that the following does not work Func[x_List, y_List, epsilon_(?NumberQ):10^-6] := Module[{},...] Ricardo: The following variants work Func[x_List, y_List, epsilon:_?(NumberQ):10^-6] := Module[{},...] Func[x_List, y_List, epsilon:(_?NumberQ):10^-6] := Module[{},...] Using HoldForm[FullForm[....]] each of the third entries gives the form Optional[ Pattern[epsilon, PatternTest[Blank[], NumberQ]], Power[10, -6] ] The abbreviation x_ for x:_ does not parse properly. Allan Hayes hay at haystack.demon.co.uk