MathGroup Archive 1997

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

Search the Archive

Re: Integer


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