MathGroup Archive 1997

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Integer

  • To: mathgroup at smc.vnet.net
  • Subject: [mg6444] Re: [mg6435] Integer
  • From: seanross at worldnet.att.net
  • Date: Fri, 21 Mar 1997 22:59:39 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

A.G.Karavayev wrote:
> 
> Hi!
> Does anyone know how to
> set that the variable n  is an Integer or Real number?
> 
> Thank you in advance!
> 
> Yours,
> A.G.Karavayev,
> karavayev at phtd.tpu.edu.ru


If it is just a local or global variable, 

Head[symbol]=Integer;
Head[symbol]=Real;  

If it is a function argument and you want to restrict input

f[symbol_Integer]:=blah blahh blah
f[symbol_Real]:=etc. etc. etc.


  • Prev by Date: Re: Curve Fitting
  • Next by Date: Re: Fourier Help!!
  • Previous by thread: Integer
  • Next by thread: Fourier Transform